Paper deep dive
CityBehavEx: A Scalable and Empirically Validated LLM-Assisted Urban Simulation Platform
Gustavo H. Santos, Aline Viana, Thiago H Silva
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 92%
Last extracted: 7/15/2026, 1:56:39 AM
Summary
CityBehavEx is an interactive, LLM-assisted urban simulation platform that scales to city-size populations by combining established human mobility models with fine-tuned cross-encoders. It avoids costly per-action LLM inference, enabling large-scale simulations (e.g., 100k agents over 75 days in under an hour on a consumer GPU) while generating mobility patterns that empirically match real-world spatial, temporal, and semantic distributions. The platform supports agent inspection, empirical validation, and iterative calibration.
Entities (15)
Relation Signals (14)
Gustavo H. Santos â authored â CityBehavEx
confidence 95% · Gustavo H. Santos1,2, Aline Carneiro Viana2, Thiago H. Silva1,3
CityBehavEx â evaluateson â YJMOB
confidence 95% · We evaluate CityBehavEx on three real-world mobility datasets... YJMOB
CityBehavEx â evaluateson â GreaterParis
confidence 95% · We evaluate CityBehavEx on three real-world mobility datasets... GreaterParis
CityBehavEx â evaluateson â Shanghai
confidence 95% · We evaluate CityBehavEx on three real-world mobility datasets... Shanghai
CityBehavEx â uses â ModernBERT
confidence 95% · CityBehavEx combines established human mobility models with fine-tuned cross-encoders... fine-tuned ModernBERT model
CityBehavEx â uses â SW-CRP
confidence 92% · CityBehavEx uses a semantically weighted Chinese Restaurant Process (SW-CRP)
University of Toronto â affiliatedwith â Thiago H. Silva
confidence 90% · 3University of Toronto, Canada
UTFPR â affiliatedwith â Gustavo H. Santos
confidence 90% · 1UTFPR, Brazil
Inria â â
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Recent LLM-based multi-agent urban simulators can generate semantically rich city routines, but they remain costly to scale and are often weakly validated against empirical mobility patterns. We present CityBehavEx, an interactive LLM-assisted urban simulation platform that scales to city-size populations, exposes agent behavior for inspection, supports empirical validation, and generates mobility patterns that better match real-world spatial, temporal, and semantic distributions. Instead of invoking large language models for every agent action, CityBehavEx combines established human mobility models with fine-tuned cross-encoders that estimate semantic alignment between agent profiles, schedules, and activity transitions. This design enables large-scale simulations, as demonstrated in a case study of 100,000 agents over 75 days in under one hour on a single consumer GPU. The platform allows users to define simulation regions, launch experiments, inspect trajectories and activity traces, debug unrealistic behaviors, and validate generated routines against real-world mobility, time-use, and semantic metrics.
Tags
Links
- Source: https://arxiv.org/abs/2607.12086v1
- Canonical: https://arxiv.org/abs/2607.12086v1
PDF not stored locally. Use the link above to view on the source site.
Full Text
45,682 characters extracted from source content.
Expand or collapse full text
CityBehavEx: A Scalable and Empirically Validated LLM-Assisted Urban Simulation Platform Gustavo H. Santos1,2, Aline Carneiro Viana2, Thiago H. Silva1,3 1UTFPR, Brazil, 2Inria, France, 3University of Toronto, Canada Corresponding author: gustavohenriquesantos@alunos.utfpr.edu.br. Abstract Recent LLM-based multi-agent urban simulators can generate semantically rich city routines, but they remain costly to scale and are often weakly validated against empirical mobility patterns. We present CityBehavEx, an interactive LLM-assisted urban simulation platform that scales to city-size populations, exposes agent behavior for inspection, supports empirical validation, and generates mobility patterns that better match real-world spatial, temporal, and semantic distributions. Instead of invoking large language models for every agent action, CityBehavEx combines established human mobility models with fine-tuned cross-encoders that estimate semantic alignment between agent profiles, schedules, and activity transitions. This design enables large-scale simulations, as demonstrated in a case study of 100,000 agents over 75 days in under one hour on a single consumer GPU. The platform allows users to define simulation regions, launch experiments, inspect trajectories and activity traces, debug unrealistic behaviors, and validate generated routines against real-world mobility, time-use, and semantic metrics. CityBehavEx: A Scalable and Empirically Validated LLM-Assisted Urban Simulation Platform Gustavo H. Santos1,2â thanks: Corresponding author: gustavohenriquesantos@alunos.utfpr.edu.br., Aline Carneiro Viana2, Thiago H. Silva1,3 1UTFPR, Brazil, 2Inria, France, 3University of Toronto, Canada 1 Introduction Recent LLM-based multi-agent urban simulators can generate city routines with semantic richness, sociodemographic awareness, and contextual adaptability Piao et al. (2025); Bougie and Watanabe (2025); Ye et al. (2026); Wang et al. (2024). However, they often rely on repeated LLM inference to generate or revise individual actions, making them costly to scale. Their evaluation is also frequently limited to plausibility checks, LLM-as-a-judge assessments, or coarse aggregate distributions, leaving open questions about whether generated behaviors reproduce empirical patterns of human mobility Santos et al. (2026). At the same time, human mobility research offers well-established regularities and validation metrics, including daily activity motifs, explorationâreturn dynamics, visitation patterns, predictability, and spatial displacement laws GonzĂĄlez et al. (2008); Song et al. (2010b); Schneider et al. (2013); Pappalardo and Simini (2017); SchlĂ€pfer et al. (2021). These findings provide useful building blocks for constraining and evaluating generative urban simulations. In this paper, we present CityBehavEx, an interactive LLM-assisted urban simulation platform that scales to city-size populations, exposes agent behavior for inspection, supports empirical validation, and generates mobility patterns that better match real-world spatial, temporal, and semantic distributions. Rather than using LLMs to generate every action of every agent, CityBehavEx decouples semantic reasoning from trajectory generation. It uses established mobility models to guide daily schedules and explorationâreturn dynamics, while fine-tuned cross-encoders estimate semantic alignment between agent profiles, schedules, POI choices, and activity transitions. These scores are integrated into efficient stochastic modules for schedule selection, micro-activity generation, social encounters, and transport decisions. CityBehavEx is designed as an end-to-end platform for building, inspecting, and validating urban simulations. Accessible via a web interface or CLI, the system enables users to define geographic regions, configure agent populations, launch simulations, and visually replay map trajectories. Post-simulation, users can deeply inspect individual profiles and activity traces, identify unrealistic behaviors, and evaluate generated routines against empirical mobility, time-use, semantic, and social-network metrics. A built-in feedback loop further allows researchers to iteratively adjust parameters and semantic-alignment modules for specific target cities or scenarios. To ensure continuous public access and prevent closed-source hosting (unlike CitySim), the platform is released under the AGPLv3 license111https://github.com/gefgu/citybehavex. The repository includes source code, documentation, a video demonstration, and reproducible configurations. Designed to be lightweight, the default setup runs on a single workstation requiring only a 4GB VRAM GPU for cross-encoder operations, as LLMs can be accessed via API. While larger scenarios are memory-bounded (Appendix C), we provide a public 1,000-sample YJMOB-based synthetic dataset for out-of-the-box testing without proprietary data. CityBehavEx also bridges the gap between scale and realism. A single RTX 5090 simulates 100,000 agents for 75 days in under an hour. For a 500-agent, 7-day scenario, CityBehavEx takes a few minutes compared to the multi-day runtimes of recent LLM-based baselines. Because it also produces superior spatial, temporal, and semantic mobility patterns, the system shows that efficient language processing can make urban simulation more scalable, inspectable, and empirically realistic. 2 CityBehavEx System This section describes the main modules of CityBehavEx; Fig. 1 summarizes the architecture. Figure 1: Overview of the CityBehavEx architecture. 2.1 Profile Creation Agent profiles provide the demographic and behavioral context used by CityBehavEx to assign schedules, activities, transport modes, and locations. Profiles are fully configurable, and the system includes a default synthetic population generator for running simulations across cities and scenarios Dyer et al. (2024). We adapt the SimPaths profile-generation pipeline Bronka et al. (2025), sampling attributes such as age, education, household composition, occupation, transport resources, and home/work locations; the full schema is provided in Appendix A. For scalability, the default generator samples attributes independently. To reduce incoherent profiles, such as a 16-year-old agent with a masterâs degree, a fine-tuned ModernBERT model Warner et al. (2025) flags inconsistent profiles for resampling. Users can also add or redefine attributes by updating the profile schema and the narrative template used by semantic-alignment modules. Home and work locations receive special treatment because they shape commuting distances and access to nearby opportunities. CityBehavEx samples home tiles from residential building density and inverse POI density, then samples work tiles from an attractiveness score based on non-residential building density, POI density, and distance decay. By default, homeâwork distances follow a configurable log-normal distribution estimated from the analyzed datasets (Section 3.1). Building and POI data come from Overture Maps Overture Maps Foundation (2026). 2.2 Diary Generation Generation. A diary defines an agentâs daily structure as a sequence of activity blocks at 15-minute granularity. CityBehavEx generates a pool of candidate diaries with an LLM constrained by empirical mobility regularities, including the daily visits law Schneider et al. (2013). Adapting DITRAS Pappalardo and Simini (2017), locations are represented as Home, Work, or Other. The generator incorporates mobility motifs to produce weekday and weekend routines adapted to the target city, and supports scenario-specific overrides such as holidays, disruptions, or disasters. Semantic alignment and clustering. Recognizing that human mobility largely follows a limited set of predictable daily motifs Schneider et al. (2013), CityBehavEx avoids the prohibitive cost of per-agent LLM inference during diary assignment. Instead, we estimate semantic compatibility between textualized agent profiles and candidate diaries using a fine-tuned ModernBERT cross-encoder Warner et al. (2025). To train this model, we prompt an LLM to generate 1,000 diverse profileâdiary pairs scored for compatibility. These pairs serve as the supervision signal, fine-tuning the cross-encoder to map new profileâdiary combinations to an alignment score sks_k. To further ensure performance scaling, agents are clustered by profile similarity, and alignment scores are computed at the cluster level. Finally, stochastic assignment based on these scores introduces natural behavioral variation among agents within the same cluster. Semantically weighted CRP. To balance routine with exploration, CityBehavEx uses a semantically weighted Chinese Restaurant Process (SW-CRP) Blei and Frazier (2011). Simulation days are treated as âcustomersâ and candidate diaries as âtables.â Let K denote the set of diaries already selected by the agent in previous days, and U the set of candidate diaries not yet used by that agent. The probability that an agent selects an already-used diary kâKkâ K on day t depends on both prior usage and semantic alignment: Pâ(ct=k)=nkâ esk/TâjâKnjâ esj/T+âjâUαâ esj/T,P(c_t=k)= n_k· e^s_k/T _jâ Kn_j· e^s_j/T+ _jâ Uα· e^s_j/T, where nkn_k is the usage count for diary k, sks_k is the semantic alignment score, T is a temperature parameter, and α controls exploration of unused diaries in U. For an unused diary kâUkâ U, the same denominator is used with numerator αâesk/Tα e^s_k/T. To model heterogeneity, T and α are sampled from configurable log-normal distributions. 2.3 Exploration and Preferential Return During diary execution, agents travel to fixed Home and Work tiles, while destinations for Other blocks are selected through an Exploration and Preferential Return (EPR) mechanism Song et al. (2010a). Agent-specific parameters determine whether an agent explores a new POI or returns to a previously visited location. To make exploration semantically aware, CityBehavEx scores POI types with a fine-tuned ModernBERT model and applies the SW-CRP mechanism described in Section 2.2. For each profile cluster and Other block, this process filters POI categories that are compatible with the agent and context. Exploration then samples a new destination from the filtered POI types, while return samples from the agentâs visited locations. 2.4 Micro-Schedule Generation Recent LLM-based urban simulators often generate open-vocabulary micro-activities, such as reading a book or writing an email Piao et al. (2025). Although expressive, such descriptions are difficult to validate against time-use data. CityBehavEx instead grounds micro-schedule generation in the 25 activity classes defined by the Multinational Time Use Study (MTUS) IPUMS MTUS (2026). When an agent enters a macro-schedule block, such as Home, Work, or Other, CityBehavEx samples activities until the block ends. We contextually mask the activity set: sleeping is disabled during Work blocks, while Other activities are restricted by POI types mapped from Overture Maps into 15 categories using an LLM. To vary block transitions, we sample activity durations from activity-specific log-normal distributions. This provides a simple, controllable distribution that is easier for LLMs to adapt, building on classic models Moore et al. (1997); Strum et al. (2000). Activity choices use the same semantically weighted CRP mechanism as diary selection. The semantic weights are conditioned on the profile cluster (Section 2.2), day period, block or POI type, and previous activity. This lets CityBehavEx encode temporal common sense: an agent arriving home at midnight is more likely to sleep, whereas an evening home block assigns higher probability to preparing and eating food. 2.5 Social Module CityBehavEx models social network formation through spatial proximity, semantic similarity, and co-location. The initial network samples each agentâs expected number of friends from a configurable log-normal degree distribution, with candidates drawn from the agentâs home and work H3 cells. Higher profile-embedding similarity increases the probability of forming a tie. During the simulation, casual friendships emerge from repeated co-location: agents who visit the same places may connect based on encounter regularity and neighborhood overlap, following RECAST Olmo Vaz de Melo et al. (2015). Friendship strength is updated at configurable intervals, increasing after repeated encounters and decaying when no encounters occur. 2.6 Transportation Module CityBehavEx uses a multimodal transportation module to assign transportation modes and estimate movement between locations. Each agent has walking and cycling distance thresholds sampled from log-normal distributions. Trips below the walking threshold are assigned to walking; otherwise, mode choice depends on the agentâs transport resources from profile creation (Section 2.1). Agents with bicycle access cycle when the trip is within their cycling threshold, agents with car access use the road network, and remaining trips use rail when available or car/taxi travel as a fallback. Road and rail are obtained from Overture Maps Overture Maps Foundation (2026), including speed-limit information when available, constraining routes and travel times to real infrastructure. To keep routing efficient, CityBehavEx uses a cacheable contraction-hierarchies method Geisberger et al. (2008), which computes shortest paths and reuses routes across agents and repeated trips. 2.7 Feedback and Calibration Loop Because CityBehavEx relies on configurable parameters and semantic-alignment models, users can iteratively calibrate simulations after inspecting the outputs. The feedback loop supports two validation settings: comparing generated behavior against mobility laws from the literature, or, when empirical mobility or time-use data are available, comparing simulations against the full evaluation suite. CityBehavEx supports both manual and automated calibration. Through the web interface, users can inspect trajectories, diagnose unrealistic behaviors, and adjust parameters. Through the CLI, users or coding agents can launch simulations, retrieve evaluation results, modify configuration files or semantic-alignment prompts, and rerun experiments. Optionally, users can configure a fixed number of automated update rounds, in which the simulation LLM proposes parameter or prompt updates. This process helps adapt simulations to specific cities, cultures, or special-event scenarios while keeping calibration inspectable and reproducible. 2.8 User Interface CityBehavEx provides a web interface for configuring, running, inspecting, and validating urban behavior simulations. Users can select a geographic bounding box, configure the agent population, run pre-simulation steps, launch the full simulation, and replay trajectories on a Mapbox basemap. During replay, users can inspect each agentâs profile, macro-schedule, micro-activities, transport choices, and social graph, allowing unexpected behaviors to be traced back to specific simulation components. The validation dashboard, illustrated in Appendix D, supports interactive comparison across simulation runs, empirical datasets, and mobility laws from the literature. It includes mobility, temporal, topological, behavioral, semantic, and social metrics, with the full list in Appendix B. Metrics can be filtered by day type, such as weekdays, weekends, and special days, and by day period. Figure 2: Timeline View. This interactive interface allows users to inspect the ongoing simulation and replay agent trajectories. Through the side panel, users can examine detailed agent profiles, daily schedules, and micro-activities. Additionally, the map utilizes AI-generated sprites to ease the visualization of agents, their states, and transportation modes across the city. To keep the dashboard responsive, the visual analytics use a custom PythonâRust implementation of Scikit-Mobility functionality Pappalardo et al. (2022), computing the evaluation suite in seconds. Simulated distributions are compared against empirical data using metric-specific distances. JensenâShannon Divergence (JSD) is used for categorical distributions, including visit purposes, activity transitions, daily routines, spatio-temporal visits, motifs, and profile distributions. The Common Part of Commuters (CPC) Pappalardo et al. (2022) measures overlap between empirical and simulated originâdestination matrices. For numerical or ordinal distributions, such as travel distance, trip duration, radius of gyration, dwell time, and visitation frequency, CityBehavEx uses Wasserstein distance (W1W_1). All metric values can be visualized in the dashboard and exported for offline analysis. In addition to the web interface, CityBehavEx provides a CLI for batch execution, automated calibration, and integration with coding agents that can run simulations, retrieve evaluation results, and modify configuration files. 3 Evaluation 3.1 Datasets We evaluate CityBehavEx on three real-world mobility datasets that vary in scale, duration, spatial resolution, and semantic annotation: âą GreaterParis dataset Chasse et al. (2025): A non-public 7-day anonymized GNSS dataset from the Ăle-de-France region, with trajectories for 3,337 individuals mapped to H3 level-10 cells and annotated with trip purpose and transportation mode. âą Shanghai Esper et al. (2024): A non-public 10-day CDR dataset with hourly movements of 58,502 users across 10,396 grid cells of 200m Ă 200m, providing broad population coverage but limited semantic annotation. âą YJMOB Yabe et al. (2024): A public smartphone-location dataset tracking 100,000 users in Nagoya, Japan, over 75 days at 30-minute granularity across 40,000 grid cells of 500m Ă 500m. We also use its 25,000-user disaster subset, with 60 regular days followed by 15 disaster days. 3.2 Simulator Comparison We compare CityBehavEx (CBX) with two recent LLM-based urban simulators, AgentSociety (AG) and CitySim (CS), using spatial, temporal, and semantic realism metrics computed against the datasets in Section 3.1. The comparison follows prior work showing that plausible LLM-generated narratives can still diverge from observed mobility patterns Santos et al. (2026). Additional full-scale results and ablations are provided in Appendix C. 3.2.1 Mobility Realism Table 1: Spatial, temporal, and semantic realism of simulated trajectories. Lower W1W_1, VPD, ATM, and DARD values indicate closer agreement with empirical data. GP=GreaterParis, SH=Shanghai, AG=AgentSociety, CS=CitySim, and CBX=CityBehavEx. Semantic metrics are reported only for datasets with purpose labels. Dataset Source Îâr r (W1W_1) rgr_g (W1W_1) TD (min) (W1W_1) DT (h) (W1W_1) Vf (W1W_1) VPD (10â210^-2) ATM (10â210^-2) DARD (10â210^-2) GP AG 14.8±0.414.8± 0.4 7.3±0.37.3± 0.3 24.4±0.224.4± 0.2 4.0±0.14.0± 0.1 9.6±0.29.6± 0.2 3.0±0.13.0± 0.1 11.3±0.311.3± 0.3 1.1±0.01.1± 0.0 GP CS 7.5±1.77.5± 1.7 3.5±0.23.5± 0.2 24.3±18.924.3± 18.9 30.2±29.630.2± 29.6 19.5±3.619.5± 3.6 8.8±2.68.8± 2.6 24.1±5.624.1± 5.6 15.7±21.615.7± 21.6 GP CBX 1.32±0.231.32± 0.23 0.93±0.160.93± 0.16 5.33±0.455.33± 0.45 1.15±0.011.15± 0.01 4.09±0.044.09± 0.04 0.10±0.020.10± 0.02 7.16±0.427.16± 0.42 3.69±0.793.69± 0.79 SH AG 8.7±0.58.7± 0.5 4.3±0.74.3± 0.7 9.3±0.29.3± 0.2 4.8±0.44.8± 0.4 12.3±4.212.3± 4.2 â â â SH CS 4.0±0.14.0± 0.1 4.9±0.14.9± 0.1 19.3±0.319.3± 0.3 36.4±4.936.4± 4.9 25.0±0.725.0± 0.7 â â â SH CBX 2.03±0.012.03± 0.01 1.48±0.021.48± 0.02 4.96±0.054.96± 0.05 2.56±0.012.56± 0.01 13.87±0.0413.87± 0.04 â â â SH Ref. 0.50.5 1.01.0 0.30.3 0.30.3 2.12.1 â â â Table 1 reports results for 500-agent samples averaged over three runs; larger direct comparisons were infeasible because each baseline run required approximately two to three days. The âRef.â row compares two disjoint empirical samples from the same dataset, providing a lower-bound reference for the expected distance between real mobility samples. Across both datasets, CityBehavEx obtains lower distances for spatial metricsâtravel distance (Îâr r) and radius of gyration (rgr_g)âand temporal metrics, including trip duration (TD), dwell time (DT), and visitation frequency (Vf). For semantic realism, we report Visit Purpose Distribution (VPD), Activity Transition Matrix (ATM), and Daily Activity Routine Distribution (DARD) only for GreaterParis, which provides trip-purpose labels. Across both datasets, CityBehavEx achieves the lowest distances for all evaluated spatial and temporal metrics except visitation frequency in Shanghai, for which AgentSociety obtains a slightly lower distance (12.3 versus 13.87). For the GreaterParis semantic metrics, CityBehavEx achieves the lowest VPD and ATM distances, while AgentSociety achieves the lowest DARD distance. 3.2.2 Runtime and Scalability For a 500-agent, 7-day scenario, CityBehavEx completes execution in 2.49±1.72.49± 1.7 minutes, while AgentSociety and CitySim require 78.28±8.2178.28± 8.21 and 83.9±4.5083.9± 4.50 hours, respectively. These runtimes exclude map-building caches, which are also required by the baselines, and model fine-tuning, which takes approximately 5â20 minutes per model. CityBehavEx also simulates 100,000 agents over 75 days in 29.2±0.629.2± 0.6 minutes on YJMOB, demonstrating scalability beyond the small scenarios feasible for direct comparison. LLMs and ModernBERT calls can be cached independently, further speeding up iterative calibration, which makes the same scenario run in less than 10 minutes. Together, these results show that CityBehavEx supports interactive experimentation while producing mobility patterns that more closely match empirical data than recent LLM urban simulators. 3.3 Scenario and Module-Level Evaluation Beyond direct simulator comparison, we evaluate CityBehavEx on capabilities that are explicit in our system but absent, implicit, or not evaluated in the baselines: social network formation, special-event adaptation, transport choice, and time-use realism. Social network realism. To distinguish between random encounters and true friendships within the Shanghai and YJMOB mobility datasets, we apply the RECAST framework Olmo Vaz de Melo et al. (2015). We evaluate how well our simulated networks mirror real-world inferred social networks by comparing the distributions of degree, clustering coefficients, edge regularity, and topological overlap, quantifying the similarity using the Wasserstein (W1W_1) distance (full results in Appendix C). Focusing specifically on the clustering coefficient, the distributions produced by CityBehavEx closely align with real-world data (W1=0.0284W_1=0.0284). This substantially outperforms the comparison with the degree-preserving random network baseline generated by the RECAST framework (W1=0.2211W_1=0.2211). Overall, this demonstrates that CityBehavEx agents successfully cluster and engage in joint activities in a manner that strongly reflects real-world human behavior. Disaster scenario. We evaluate special-event adaptation using the YJMOB disaster subset, which contains 60 regular days and 15 disaster days. We compare pre/during-event mobility using travel distance, visitation frequency, radius of gyration, activity routines, and spatio-temporal visit distributions. The validation interface lets users inspect these changes separately for regular and special-event days. As shown in more detail in Appendix C, the mobility metrics still show strong alignment even under a disaster scenario. Transport mode choices. We study transport mode choice using GreaterParis, the only one with mode annotations. Compared with the empirical mode distribution, CityBehavEx achieves a JSD of 0.039±0.00020.039± 0.0002. The main discrepancy is car versus rail usage: agents use cars in 58.37±1.034%58.37± 1.034\% of trips, compared with 36.9%36.9\% in GreaterParis. Time-use realism. We evaluate micro-schedules against MTUS 2009 time-use distributions for France. CityBehavEx achieves a low mean absolute day-share difference of 2.98±0.0092.98± 0.009, with the largest discrepancies at night, where agents sleep less and engage more in other activities than observed in MTUS. 4 Limitations CityBehavEx has several limitations. First, reproducibility is constrained by dataset access: among the datasets used in our evaluation, only YJMOB is publicly available. Second, because CityBehavEx uses LLMs and fine-tuned language models for semantic alignment and calibration, it may inherit cultural, gender, and socioeconomic biases from these models or from the data used to fine-tune them. Third, our evaluation indicates that spatial allocation remains a challenge. In particular, STVD and CPC results suggest that agents may choose semantically appropriate activities and POIs, but allocate them to neighborhoods that differ from those observed in empirical data. Future work will incorporate neighborhood-level characteristics more directly into mobility and POI choice. 5 Conclusion We presented CityBehavEx, an interactive LLM-assisted platform for scalable and empirically validated urban behavior simulation. By combining mobility models, fine-tuned semantic alignment, and a parallelized Rust core, CityBehavEx avoids costly per-action LLM inference while preserving context-aware behavioral variation. Our evaluation shows that CityBehavEx runs orders of magnitude faster than recent LLM-based urban simulators and produces trajectories that more closely match empirical spatial, temporal, and semantic mobility distributions. The web interface further supports inspection, validation, and iterative calibration, making CityBehavEx a practical tool for realistic city-scale mobility generation. Acknowledgments This study was supported by CNPq (processes 314603/2023-9, 441444/2023-7, 444724/2024-9, and INCT TILD-IAR 408490/2024-1) - and the PEPR MOBIDEC Mob Sci-Dat Factory project. Ethics Statement This paper introduces CityBehavEx, a scalable and inspectable platform for language-model-assisted urban behavior simulation. While our framework offers significant advantages for reproducing empirically grounded human mobility and studying urban dynamics at scale, it raises important ethical considerations that must be responsibly addressed. A primary concern is the potential for bias amplification. CityBehavEx relies on default synthetic population generators that sample attributes such as age, gender, education, and occupation, alongside fine-tuned cross-encoders and LLM constraints for semantic alignment. Any societal biases inherent in the foundation language models or the empirical mobility training datasets may propagate through the simulation. This risks generating skewed or stereotypical representations of population behaviors. If these simulated outcomes are used to inform real-world urban policies or infrastructure design, they could inadvertently reinforce existing socioeconomic or demographic inequities. Furthermore, the platformâs capacity to model highly realistic, context-aware trajectories, transportation choices, and dynamic social network formation introduces risks regarding the potential misuse of simulation insights. Predicting detailed mobility trends and individual routines could theoretically be leveraged for unethical surveillance, behavioral manipulation, or commercial exploitation without public consent. Additionally, while the systemâs evaluation utilizes anonymized real-world mobility records (such as the Greater Paris, Shanghai, and YJMOB datasets), generating semantically rich, city-scale routines necessitates ongoing safeguards to ensure synthetic behaviors do not expose or target vulnerable real-world communities. To mitigate these risks, CityBehavEx is intentionally designed with an interactive feedback loop and a visual validation dashboard, explicitly supporting human oversight, inspectability, and debugging of unrealistic behaviors. We strongly advocate that synthetic urban agents should be employed to complement, rather than replace, the essential involvement of actual residents, domain experts, and stakeholders in urban planning processes. By prioritizing transparency and iterative human validation, we aim to ensure the responsible and ethical deployment of generative agents in social and urban studies. References Amichi et al. (2021) Licia Amichi, Aline Carneiro Viana, Mark Crovella, and Antonio A.F. Loureiro. 2021. From movement purpose to perceptive spatial mobility prediction. In Proc. of SIGSPATIAL, page 500â511, New York, NY, USA. Association for Computing Machinery. Blei and Frazier (2011) David M. Blei and Peter I. Frazier. 2011. Distance dependent chinese restaurant processes. Journal of Machine Learning Research, 12(74):2461â2488. Bougie and Watanabe (2025) Nicolas Bougie and Narimawa Watanabe. 2025. CitySim: Modeling urban behaviors and city dynamics with large-scale LLM-driven agent simulation. In Proc. of EMNLP, pages 215â229. Bronka et al. (2025) Piotr Bronka, Justin van de Ven, Daniel Kopasker, Srinivasa Vittal Katikireddi, and Matteo Richiardi. 2025. Simpaths: An open-source microsimulation model for life course analysis. International Journal of Microsimulation, 18(1):95â133. Chasse et al. (2025) Alexandre Chasse, Anne J. Kouam, Aline C. Viana, Razvan Stanica, Wellington V. Lobato, Geymerson Ramos, Geoffrey Deperle, Abdelmounaim Bouroudi, Suzanne Bussod, and Fernando Molano. 2025. The netmob25 dataset: A high-resolution multi-layered view of individual mobility in greater paris region. Preprint, arXiv:2506.05903. Dyer et al. (2024) Joel Dyer, Arnau Quera-Bofarull, Nicholas Bishop, J. Doyne Farmer, Anisoara Calinescu, and Michael Wooldridge. 2024. Population synthesis as scenario generation for simulation-based planning under uncertainty. In Proc. of AAMAS, page 490â498, Auckland, New Zealand. Esper et al. (2024) JoĂŁo Paulo Esper, Aline Carneiro Viana, and Jussara M. Almeida. 2024. Beauty or beast: Human behavioral insights and learning power of federated mobility prediction. In Proc. of SIGSPATIAL, page 325â337, Atlanta, USA. Association for Computing Machinery. Geisberger et al. (2008) Robert Geisberger, Peter Sanders, Dominik Schultes, and Daniel Delling. 2008. Contraction hierarchies: Faster and simpler hierarchical routing in road networks. In Experimental Algorithms, pages 319â333, Berlin, Heidelberg. Springer Berlin Heidelberg. GonzĂĄlez et al. (2008) Marta C. GonzĂĄlez, CĂ©sar A. Hidalgo, and Albert-LĂĄszlĂł BarabĂĄsi. 2008. Understanding individual human mobility patterns. Nature, 453(7196):779â782. Gupta and Nadarajah (2004) Arjun K Gupta and Saralees Nadarajah. 2004. Handbook of Beta Distribution and Its Applications. Marcel Dekker, New York. International Labour Organization (2026) International Labour Organization. 2026. Ilo modelled estimates database. IPUMS MTUS (2026) IPUMS MTUS. 2026. Ipums mtus. Moore et al. (1997) James E Moore, Chandra R Bhat, S Sivakumar, and 1 others. 1997. Generation of synthetic daily individual activity-travel patterns. Transportation Research Record, 1607(1):162â170. Olmo Vaz de Melo et al. (2015) Pedro Olmo Vaz de Melo, Aline Carneiro Viana, Marco Fiore, Katia JaffrĂšs-Runser, FrĂ©dĂ©ric Le MouĂ«l, Antonio A. F. Loureiro, Lavanya Addepalli, and Guangshuo Chen. 2015. RECAST: Telling Apart Social and Random Relationships in Dynamic Networks. Performance Evaluation, 87:19â36. Overture Maps Foundation (2026) Overture Maps Foundation. 2026. Overture Maps Foundation Data Release. Pappalardo and Simini (2017) Luca Pappalardo and Filippo Simini. 2017. Data-driven generation of spatio-temporal routines in human mobility. Data Mining and Knowledge Discovery, 32(3):787â829. Pappalardo et al. (2022) Luca Pappalardo, Filippo Simini, Gianni Barlacchi, and Roberto Pellungrini. 2022. scikit-mobility: A python library for the analysis, generation, and risk assessment of mobility data. Journal of Statistical Software, 103(4):1â38. Piao et al. (2025) Jinghua Piao and 1 others. 2025. Agentsociety: Large-scale simulation of llm-driven generative agents advances understanding of human behaviors and society. Preprint, arXiv:2502.08691. Santos et al. (2026) Gustavo H. Santos, Aline Carneiro Viana, and Thiago H. Silva. 2026. When plausible is not realistic: Evaluating human mobility in llm-based urban simulation. Preprint, arXiv:2606.13835. SchlĂ€pfer et al. (2021) Markus SchlĂ€pfer, Lei Dong, Kevin OâKeeffe, Paolo Santi, Michael Szell, Hadrien Salat, Samuel Anklesaria, Mohammad Vazifeh, Carlo Ratti, and Geoffrey B West. 2021. The universal visitation law of human mobility. Nature, 593(7860):522â527. Schneider et al. (2013) Christian M. Schneider, Vitaly Belik, Thomas CouronnĂ©, Zbigniew Smoreda, and Marta C. GonzĂĄlez. 2013. Unravelling daily human mobility motifs. Journal of The Royal Society Interface, 10(84):20130246. Senefonte et al. (2020) Helen Senefonte and 1 others. 2020. Regional Influences on Tourists Mobility Through the Lens of Social Sensing. In Proc. of SocInfo, Pisa, Italy. Song et al. (2010a) Chaoming Song, Tal Koren, Pu Wang, and Albert-LĂĄszlĂł BarabĂĄsi. 2010a. Modelling the scaling properties of human mobility. Nature physics, 6(10):818â823. Song et al. (2010b) Chaoming Song, Zehui Qu, Nicholas Blumm, and Albert-LĂĄszlĂł BarabĂĄsi. 2010b. Limits of predictability in human mobility. Science, 327(5968):1018â1021. Strum et al. (2000) Ralph G Strum, James H May, and Luis G Vargas. 2000. Modeling the uncertainty of surgical procedure times. Anesthesiology, 92(4):1160â1169. Teixeira et al. (2021) Douglas do Couto Teixeira, Jussara M. Almeida, and Aline Carneiro Viana. 2021. On estimating the predictability of human mobility: the role of routine. EPJ Data Science, 10(1). Wang et al. (2024) Jiawei Wang, Renhe Jiang, Chuang Yang, Zengqing Wu, Makoto Onizuka, Ryosuke Shibasaki, Noboru Koshizuka, and Chuan Xiao. 2024. Large language models as urban residents: An llm agent framework for personal mobility generation. Preprint, arXiv:2402.14744. Warner et al. (2025) Benjamin Warner, Antoine Chaffin, Benjamin ClaviĂ©, Orion Weller, Oskar Hallström, Said Taghadouini, Alexis Gallagher, Raja Biswas, Faisal Ladhak, Tom Aarsen, Griffin Thomas Adams, Jeremy Howard, and Iacopo Poli. 2025. Smarter, better, faster, longer: A modern bidirectional encoder for fast, memory efficient, and long context finetuning and inference. In Proc. of ACL (Volume 1: Long Papers), pages 2526â2547, Vienna, Austria. Association for Computational Linguistics. Yabe et al. (2024) Takahiro Yabe, Kota Tsubouchi, Toru Shimizu, Yoshihide Sekimoto, Kaoru Sezaki, Esteban Moro, and Alex Pentland. 2024. Yjmob100k: City-scale and longitudinal dataset of anonymized human mobility trajectories. Scientific Data, 11(1). Ye et al. (2026) Xiaotong Ye, Nicolas Bougie, Toshihiko Yamasaki, and Narimawa Watanabe. 2026. MobileCity: An efficient framework for large-scale urban behavior simulation. In Proc. of EACL (Volume 5: Industry Track), pages 287â303, Rabat, Morocco. Association for Computational Linguistics. Table 2: Metrics and empirical laws supported by the CityBehavEx validation dashboard. Type Metrics Spatial laws and metrics Travel distance (Îâr r) GonzĂĄlez et al. (2008), Radius of Gyration (rgr_g) GonzĂĄlez et al. (2008), Daily visits Schneider et al. (2013), Predictability Song et al. (2010b), Distance-frequency SchlĂ€pfer et al. (2021), OD matrix Pappalardo et al. (2022) Temporal metrics Trip duration (TD), Dwell time (DT), Visitation frequency (Vf) Schneider et al. (2013) Topological laws Mobility motifs Schneider et al. (2013) Behavioral metrics Mobility profiles Amichi et al. (2021), Regularity, Stationarity and Diversity Teixeira et al. (2021), Entropy Teixeira et al. (2021) Semantic metrics Visit Purpose Distribution (VPD), Activity Transition Matrix (ATM) Senefonte et al. (2020), Daily Activity Routine Distribution (DARD) Wang et al. (2024), Spatio-Temporal Visit Distribution (STVD) Wang et al. (2024) Social Metrics Node Degree, Clustering Coefficient, Edge Regularity and Topological Overlap Olmo Vaz de Melo et al. (2015) Time-Use Metrics Mean Absolute day-share difference Transport Metrics Transport Choice Distribution (TCD) Table 3: Comprehensive spatial and temporal mobility realism metrics, including an ablation study. The evaluation uses four datasets: GreaterParis dataset (1,500 agents, 7 days), Shanghai (29,251 agents, 10 days), YJMOB (50,000 agents, 75 days), and YJMOB disaster (25,000 agents, 75 days: 60 normal, 15 disaster). The ablation columns demonstrate the impact of independently removing the Profile, Micro-schedule, Social, and Transport modules. Dataset populations are split equally between the reference sample and the CityBehavEx simulation. RT is runtime. Ref.: distance between two disjoint, equally sized empirical samples from the same dataset. Dataset Metric (W1W_1) CityBehavEx - Profile - Micro-sched. - Social - Transport Ref. GreaterParis dataset Îâr r 1.0±0.01.0± 0.0 4.0±0.04.0± 0.0 1.9±0.21.9± 0.2 1.1±0.11.1± 0.1 1.0±0.11.0± 0.1 0.20.2 rgr_g 0.6±0.10.6± 0.1 1.2±0.11.2± 0.1 2.4±0.22.4± 0.2 0.6±0.10.6± 0.1 0.6±0.20.6± 0.2 0.20.2 TD. (min) 4.8±0.44.8± 0.4 4.8±0.14.8± 0.1 2.2±0.22.2± 0.2 4.6±0.34.6± 0.3 1.7±0.31.7± 0.3 46.446.4 DT. (h) 1.3±0.31.3± 0.3 1.1±0.41.1± 0.4 1.3±0.21.3± 0.2 1.3±0.31.3± 0.3 1.3±0.31.3± 0.3 0.80.8 Vf. 12.1±3.812.1± 3.8 7.6±2.57.6± 2.5 8.5±2.98.5± 2.9 12.1±3.812.1± 3.8 12.1±3.812.1± 3.8 0.30.3 RT. (min) 8.8±3.98.8± 3.9 0.3±0.00.3± 0.0 1.3±0.11.3± 0.1 3.5±0.33.5± 0.3 3.4±1.23.4± 1.2 â- Mem. (GB) 8.0±0.08.0± 0.0 8.1±0.28.1± 0.2 7.7±0.17.7± 0.1 8.0±0.18.0± 0.1 7.3±0.17.3± 0.1 â- VPD (10â210^-2) 0.5±0.20.5± 0.2 0.7±0.20.7± 0.2 0.8±0.30.8± 0.3 0.5±0.20.5± 0.2 0.5±0.20.5± 0.2 0.00.0 DARD (10â210^-2) 2.7±0.72.7± 0.7 2.5±0.22.5± 0.2 2.0±0.52.0± 0.5 2.8±0.72.8± 0.7 2.8±0.72.8± 0.7 0.10.1 ATM (10â210^-2) 8.2±0.68.2± 0.6 7.8±0.57.8± 0.5 8.1±1.18.1± 1.1 8.2±0.68.2± 0.6 8.1±0.68.1± 0.6 0.00.0 Shanghai Îâr r 1.9±0.01.9± 0.0 21.3±0.321.3± 0.3 2.0±0.02.0± 0.0 1.9±0.01.9± 0.0 1.9±0.01.9± 0.0 0.00.0 rgr_g 1.8±0.01.8± 0.0 14.5±0.014.5± 0.0 1.8±0.01.8± 0.0 1.8±0.01.8± 0.0 1.8±0.01.8± 0.0 0.00.0 TD. (min) 5.4±0.05.4± 0.0 23.5±0.323.5± 0.3 5.4±0.05.4± 0.0 5.2±0.05.2± 0.0 3.9±0.03.9± 0.0 â- DT. (h) 2.4±0.42.4± 0.4 2.5±0.32.5± 0.3 2.4±0.42.4± 0.4 2.4±0.42.4± 0.4 2.4±0.42.4± 0.4 â- Vf. 18.7±2.418.7± 2.4 20.5±1.220.5± 1.2 18.8±2.418.8± 2.4 18.5±2.418.5± 2.4 18.7±2.418.7± 2.4 0.20.2 RT. (min) 5.0±0.45.0± 0.4 0.8±0.00.8± 0.0 1.5±0.11.5± 0.1 4.4±0.64.4± 0.6 2.9±0.42.9± 0.4 â- Mem. (GB) 8.2±0.48.2± 0.4 10.2±0.410.2± 0.4 5.7±0.45.7± 0.4 8.3±0.48.3± 0.4 8.3±0.38.3± 0.3 â- Degree 1.32±0.021.32± 0.02 2.47±0.012.47± 0.01 1.31±0.011.31± 0.01 â- 1.32±0.021.32± 0.02 17.8317.83 Clustering coeff. 0.09±0.000.09± 0.00 0.47±0.000.47± 0.00 0.09±0.000.09± 0.00 â- 0.09±0.000.09± 0.00 0.000.00 Edge persistence 0.01±0.000.01± 0.00 0.01±0.000.01± 0.00 0.01±0.000.01± 0.00 â- 0.01±0.000.01± 0.00 0.000.00 Topological overlap 0.04±0.000.04± 0.00 0.30±0.000.30± 0.00 0.04±0.000.04± 0.00 â- 0.04±0.000.04± 0.00 0.000.00 YJMOB Îâr r 4.3±0.04.3± 0.0 29.4±0.129.4± 0.1 4.3±0.04.3± 0.0 4.4±0.04.4± 0.0 4.3±0.04.3± 0.0 0.00.0 rgr_g 9.2±0.09.2± 0.0 14.0±0.014.0± 0.0 9.2±0.09.2± 0.0 9.3±0.09.3± 0.0 9.2±0.09.2± 0.0 0.10.1 TD. (min) 2.0±0.02.0± 0.0 29.7±0.129.7± 0.1 2.0±0.02.0± 0.0 2.0±0.02.0± 0.0 2.5±0.02.5± 0.0 â- DT. (h) 1.9±0.31.9± 0.3 1.7±0.01.7± 0.0 1.9±0.31.9± 0.3 2.0±0.32.0± 0.3 2.0±0.32.0± 0.3 0.00.0 Vf. 69.9±19.469.9± 19.4 109.2±0.6109.2± 0.6 70.0±20.270.0± 20.2 73.6±21.773.6± 21.7 70.2±19.370.2± 19.3 1.21.2 RT. (min) 15.2±0.615.2± 0.6 15.0±0.215.0± 0.2 11.4±0.111.4± 0.1 15.1±0.815.1± 0.8 9.1±1.89.1± 1.8 â- Mem. (GB) 57.1±0.857.1± 0.8 16.8±0.016.8± 0.0 56.5±0.856.5± 0.8 57.7±0.657.7± 0.6 56.9±0.656.9± 0.6 â- Degree 1.61±0.001.61± 0.00 2.62±0.022.62± 0.02 1.62±0.011.62± 0.01 â- 1.61±0.011.61± 0.01 16.2716.27 Clustering coeff. 0.09±0.000.09± 0.00 0.29±0.000.29± 0.00 0.09±0.000.09± 0.00 â- 0.09±0.000.09± 0.00 0.000.00 Edge persistence 0.00±0.000.00± 0.00 0.00±0.000.00± 0.00 0.00±0.000.00± 0.00 â- 0.00±0.000.00± 0.00 0.000.00 Topological overlap 0.04±0.000.04± 0.00 0.17±0.000.17± 0.00 0.04±0.000.04± 0.00 â- 0.04±0.000.04± 0.00 0.000.00 YJMOB disaster Îâr r 7.0±0.07.0± 0.0 25.8±0.325.8± 0.3 7.0±0.07.0± 0.0 6.9±0.06.9± 0.0 7.0±0.07.0± 0.0 0.20.2 rgr_g 10.5±0.110.5± 0.1 12.1±0.012.1± 0.0 10.5±0.110.5± 0.1 10.4±0.110.4± 0.1 10.5±0.110.5± 0.1 0.20.2 TD. (min) 4.7±0.04.7± 0.0 25.5±0.325.5± 0.3 4.7±0.04.7± 0.0 4.6±0.04.6± 0.0 5.8±0.05.8± 0.0 â- DT. (h) 2.7±0.12.7± 0.1 2.3±0.02.3± 0.0 2.7±0.12.7± 0.1 2.7±0.12.7± 0.1 2.7±0.12.7± 0.1 0.10.1 Vf. 108.4±6.6108.4± 6.6 93.9±4.293.9± 4.2 106.3±9.6106.3± 9.6 103.2±11.9103.2± 11.9 105.8±10.0105.8± 10.0 3.23.2 RT. (min) 7.5±1.17.5± 1.1 4.3±0.84.3± 0.8 3.4±0.13.4± 0.1 5.2±1.25.2± 1.2 3.9±0.23.9± 0.2 â- Mem. (GB) 8.2±0.38.2± 0.3 5.2±0.15.2± 0.1 5.5±0.35.5± 0.3 8.0±0.38.0± 0.3 8.0±0.28.0± 0.2 â- Degree 1.75±0.011.75± 0.01 2.62±0.012.62± 0.01 1.76±0.011.76± 0.01 â- 1.75±0.011.75± 0.01 20.4120.41 Clustering coeff. 0.10±0.000.10± 0.00 0.29±0.000.29± 0.00 0.10±0.000.10± 0.00 â- 0.10±0.000.10± 0.00 0.000.00 Edge persistence 0.00±0.000.00± 0.00 0.00±0.000.00± 0.00 0.00±0.000.00± 0.00 â- 0.00±0.000.00± 0.00 0.000.00 Topological overlap 0.05±0.000.05± 0.00 0.17±0.000.17± 0.00 0.05±0.000.05± 0.00 â- 0.05±0.000.05± 0.00 0.000.00 Appendix A Default Profile Schema The default CityBehavEx profile generator samples the following attributes: âą Gender. Gender is assigned uniformly at random by default. The distribution can be replaced by user-provided demographic data. âą Age. Age is sampled from a configurable Beta distribution Gupta and Nadarajah (2004), with a default range from 16 to 80 years. Distribution parameters can be manually specified or calibrated with LLM assistance to approximate the demographic profile of the target city. âą Education level. Education is sampled from a multinomial distribution over five categories: no diploma, secondary or less, vocational/technical, bachelorâs degree, and masterâs degree or above. âą Health level. Health is sampled from a multinomial distribution over a five-point Likert scale. âą Household composition. Household structure is sampled from a multinomial distribution over seven categories: shared household, couple with children, couple without children, other family member, single parent, living with parents, and living alone. âą Occupation. Occupation is sampled from high-level ILOSTAT job classifications International Labour Organization (2026). Occupation probabilities can be inferred from the target cityâs spatial structure, including the distribution of points of interest and building categories. âą Transport resources. Car and bicycle availability are estimated from the agent profile. To avoid per-agent inference at large scale, CityBehavEx can cluster similar profiles and assign transport-resource probabilities at the cluster level using either LLM-assisted calibration or a fine-tuned ModernBERT model Warner et al. (2025). âą Home and work locations. Home and work locations are sampled from spatial heuristics based on building density, POI density, and homeâwork distance distributions. Building and POI information is obtained from Overture Maps Overture Maps Foundation (2026). Appendix B Validation Metrics Table 2 summarizes the full set of metrics and empirical laws supported by the CityBehavEx validation dashboard. Appendix C Ablation Study This section evaluates the simulator across four datasets (Table 3), assessing realism via mobility metrics and ablation studies. Note that ablating modules can artificially inflate specific metrics; for instance, deactivating the transport mode superficially improves transport duration while obscuring multi-kilometer deviations in jump lengths. For each dataset, we evenly divide the empirical population: one half configures the simulationâs population size, while the other serves as the evaluation target. The Ref. column reports an empirical-to-empirical baseline computed between these two halves, estimating expected sampling variation. Overall, CityBehavEx successfully reproduces real-world characteristicsâoften achieving agreement comparable to the Ref. baselineâwith the full architecture providing the best balance across all mobility metrics. Appendix D Validation Dashboard Fig. 3 illustrates the platformâs validation dashboard. (a) Comparison Metrics (b) Distributions (c) Mobility Laws (d) Motifs (e) Time-Use Figure 3: CityBehavEx Validation dashboard