Papers
Topics
Authors
Recent
Search
2000 character limit reached

LogiCity: Urban Simulation in NeSy AI

Updated 6 May 2026
  • LogiCity is a configurable simulation platform that simulates abstract urban environments using first-order logic and multi-agent dynamics.
  • It enables long-horizon reasoning, multi-agent path planning, and perception integration by decoupling logical rules from concrete agents.
  • LogiCity supports scalable evaluation of NeSy methods with customizable predicate libraries and benchmarks such as Safe Path Following and Visual Action Prediction.

LogiCity is a configurable simulation platform designed for advancing research in Neuro-Symbolic (NeSy) AI through abstract urban environments governed by first-order logic (FOL). It addresses critical limitations of prior NeSy benchmarks by enabling long-horizon, multi-agent, and perception-in-the-loop reasoning tasks with user-configurable logical abstractions over dynamic agent populations. LogiCity explicitly decouples logical rule specification from concrete entities, supporting compositional generalization and the scalable evaluation of NeSy methods under urban reasoning challenges (Li et al., 2024).

1. System Architecture and Simulation Pipeline

LogiCity models urban environments via a layered architecture:

  • Static Semantic Grid: Ms{0,1}W×H×BM_s \in \{0,1\}^{W \times H \times B} encodes BB base categories (streets, sidewalks, intersections, buildings).
  • Agents: Global agent set A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}, each annotated with type (e.g., Car, Pedestrian, Ambulance), demographic attributes (IsOld, IsYoung), right-of-way priority pRp \in \mathbb{R}, and dynamic state (position, heading, goal).
  • Global Pathing: For each start/goal sample, agents compute collision-free trajectories: A* (pedestrian trajectories) or Dijkstra (vehicle/road network).
  • Dynamic Semantic Map: Mt{0,1}W×H×(B+N)M^t \in \{0,1\}^{W \times H \times (B + N)} overlays per-agent heatmaps.
  • Local Observation & Grounding: Each agent AnA_n receives a cropped percept MntM^t_n and filtered agent list Ant\mathcal{A}^t_n. Grounding functions {Gi}\{\mathcal{G}_i\} parse these to a grounding vector gnt{0,1}Dg^t_n \in \{0,1\}^D (BB0 grows with predicate/agent arity).
  • Logical Inference: A Z3 SAT/SMT solver instantiates BB1 FOL rules BB2 over BB3, computing truth values for action predicates {Slow, Normal, Fast, Stop}, yielding BB4.
  • State Update and Rendering: Agents execute actions and update states; GPT-4-generated semantic icons are fused into BB5 for RGB frame output BB6.

This simulation loop produces rich, multi-modal traces for both symbolic and neuro-perceptual evaluation settings (Li et al., 2024).

2. First-Order Logic Abstractions

LogiCity's core innovation is its decoupled, customizable FOL abstraction:

  • Predicates: Arbitrary set BB7, comprising unary “semantic” (e.g., IsAmbulance(X), IsPedestrian(X), IsYoung(X)) and binary “spatial/relational” predicates (e.g., IsClose(X, Y), HigherPri(X, Y), CollidingClose(X, Y)), with formally specified arity and boolean outputs.
  • Clause Syntax: Each FOL clause BB8 takes the form

BB9

Example: A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}0 corresponds to A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}1.

  • Compositional Generalization: Rules are defined on abstract variables (A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}2), not fixed agent sets. Predicate and clause libraries are reusable across instantiations (“cities”) with varying agent rosters A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}3, ensuring logical structures remain invariant under different entity permutations.

This yields a benchmark setting for robust evaluation of rule-based, neural, and hybrid approaches on compositional abstraction tasks (Li et al., 2024).

3. User-Configurable Abstraction Space

LogiCity exposes several axes of expressivity control:

  • Predicate Count (A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}4) and Rule Count (A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}5): Directly affect the grounding vector size and logical inference (SMT) complexity, scaling up combinatorial reasoning challenges.
  • Rule Depth and Breadth: Users can specify literal count per body (rule depth) and the maximal multi-entity (arity) interactions (breadth).
  • Predicate Types: Selection of semantic, spatial, or both predicate classes; toggling these shifts the balance between perception and logical complexity.

Example configurations include:

  • Easy SPF mode: 7 unary + 2 binary predicates, A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}6 “Stop” rules.
  • Medium/Hard: Increased predicate vocabulary, more complex constraints.
  • Expert mode: 12 mixed clauses, governing all four action predicates (Slow/Normal/Fast/Stop), with nested negation and multi-agent relationships (Li et al., 2024).

4. Task Definitions: Safe Path Following and Visual Action Prediction

LogiCity specifies two central benchmarks:

4.1 Safe Path Following (SPF)

  • Formulation: Partially-observable Markov decision process (POMDP) with state A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}7, action set A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}8, and observation A={A1,...,AN}\mathcal{A} = \{A_1, ..., A_N\}9 for the controlled agent.
  • Reward:

pRp \in \mathbb{R}0

where pRp \in \mathbb{R}1 penalizes rule violations, pRp \in \mathbb{R}2 is action cost, and pRp \in \mathbb{R}3 penalizes overtime.

  • Objective: Maximize expected cumulative reward over pRp \in \mathbb{R}440-step horizons.

4.2 Visual Action Prediction (VAP)

  • Task: From RGB observation pRp \in \mathbb{R}5 and agent metadata pRp \in \mathbb{R}6, predict actions pRp \in \mathbb{R}7 for all agents.
  • Pipeline: ResNet50+FPN encoder yields regional features; ROIAlign computes unary predicate scores, pairwise concatenation evaluates binary predicates to construct a scene graph; graph reasoning (GNN or NLM) produces agent action logits.
  • Supervision: Supports modular (predicate/action) and end-to-end (action-only) learning (Li et al., 2024).

5. Scenario and City Generation

Multiple urban “cities” are procedurally instantiated:

  • Agent compositions pRp \in \mathbb{R}8 and start/goal samples are randomized across runs.
  • The constant rule/predicate definitions mean each city's instantiation shifts only the grounding, not the logical structure—facilitating systematic evaluation of compositional generalization.
  • Example: One city may instantiate 2 ambulances + 3 pedestrians; another, 1 police + 2 tiro + 4 cars, but both use identical logical tables (Li et al., 2024).

6. Experimental Results and Benchmarks

6.1 Safe Path Following (SPF)

  • Baselines: Include symbolic learners (Popper, MaxSynth, HRI), neural (GNN, MLP, NLM), and RL variants (DQN, A2C, PPO, DreamerV2, NLM-DQN).
  • Metrics: Trajectory Success Rate (TSR), Decision Success Rate (DSR), normalized return.
  • Findings:
    • Easy: Symbolic rule learners achieve TSR pRp \in \mathbb{R}9.
    • Medium/Hard: NLM and NLM-DQN surpass pure neural (GNN, MLP), indicating superior abstraction learning.
    • Compositional shift: Transfer to new agent mixes halves DQN’s TSR but reduces NLM-DQN’s only by Mt{0,1}W×H×(B+N)M^t \in \{0,1\}^{W \times H \times (B + N)}020%.
    • Continual: NLM recovers expert-mode with 30% of new-rule data vs. 100% for MLP (Li et al., 2024).

6.2 Visual Action Prediction (VAP)

  • Metrics: Per-action recall, average accuracy (aAcc), weighted accuracy (wAcc).
  • Findings:
    • End-to-end GNN/NLM reach aAcc Mt{0,1}W×H×(B+N)M^t \in \{0,1\}^{W \times H \times (B + N)}1 (Easy); modular variants drop to 0.60 due to perceptual noise.
    • Hard mode: modular NLM yields wAcc Mt{0,1}W×H×(B+N)M^t \in \{0,1\}^{W \times H \times (B + N)}2 (vs. GNN 0.28), evidencing more robust logical generalization.
    • Perceptual noise: unary predicate recall 55%, binary 89%, emphasizing the challenge for vision-only systems (Li et al., 2024).

6.3 LLM and Human Benchmarking

  • In-context LLMs (GPT-4o/GPT-4/GPT-3.5) evaluated on VAP: GPT-4o reaches 59% accuracy, below human performance (81%), especially on hard “Stop” rules, indicating the gap remaining for in-context symbolic generalization (Li et al., 2024).

7. Implications, Challenges, and Research Frontiers

LogiCity provides a scalable, FOL-driven urban simulation supporting complex, abstract NeSy reasoning tasks, high-dimensional vision, and multi-agent planning. Benchmark results reveal NLMs and related NeSy frameworks excel in abstraction and continual learning, but face significant limitations under combinatorial and perceptual complexity.

Key open challenges:

  • Inducing compact, conflict-free rule sets in combinatorial spaces.
  • Integrating noisy perception (sub-60% unary predicate recall) with reliable logical inference.
  • Extending beyond FOL to temporal logics (e.g., LTL), fuzzy SMT, and differentiable reasoning.
  • Leveraging real-world urban/traffic data for rule auto-generation and sim-to-real transfer.

Future directions:

  • Bi-level planners learning abstract actions atop grounded sub-policies.
  • LLM-assisted rule induction, with symbolic verifiers.
  • Cross-domain transfer of abstractions to platforms such as CARLA, SCENIC, and PDDL-based planners (Li et al., 2024).

LogiCity, as a fully open-source platform, establishes itself as a pivotal resource for evaluating and advancing the state-of-the-art in Neuro-Symbolic AI with a focus on real-world-relevant complexity.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to LogiCity.