Manuscript Offprint
arXiv:2610.28467Beyond Trajectory Statistics: Community-Consistent Human Mobility Generation via Evolving User-Location Graphs
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Bo Liu
National Supercomputing Center in
Changsha
Hunan University
Changsha, China
Zhu Xiao
National Supercomputing Center in
Changsha
Hunan University
Changsha, China
Tong Li
National Supercomputing Center in
Changsha
Hunan University
Changsha, China
Zhuo Tang
National Supercomputing Center in
Changsha
Hunan University
Changsha, China
Jiapeng Zhang
National Supercomputing Center in
Changsha
Hunan University
Changsha, China
Kenli Li
National Supercomputing Center in
Changsha
Hunan University
Changsha, China
ABSTRACT
Human mobility data are fundamental to Web-based location services and broader urban applications, and mobility generation provides synthetic trajectories when real data are costly or inaccessible. Although recent mobility generators have incorporated collective mobility patterns, they primarily focus on individual trajectories and aggregate population dynamics, leaving evolving community structures formed by user-location interactions insufficiently modeled. In this paper, we study community-consistent human mobility generation. To this end, we formulate mobility generation as the generation of dynamic user-location graphs to model community structures and propose MOTION, a Multi-agent framework for cOmmuniTy-consistent human mObility geNeration. MOTION consists of user agents, location agents, and a global manager agent. MOTION first detects coherent communities from historical mobility using the Leiden algorithm and extracts community-conditioned interaction priors to guide the generation process. Guided by these priors, the user agents plan mobility, search destination candidates, and infer user movements from the individual view. In parallel, selectively activated location agents infer likely user arrivals from the community view. The manager coordinates both views, diagnoses interactions causing deviations, and attributes targeted reflection signals to revise user decisions, location attraction, and source-user selection. Experiments on two real-world datasets show that MOTION outperforms baselines by at least 4.05% across reported metrics of individual trajectories, population and flow distributions, and community and graph structures. Further analyses confirm its robustness, privacy preservation, and downstream utility. The code is available at https://anonymous.4open.science/r/MOTION-04C4.
KEYWORDS
Mobility Generation, Multi-Agent, Graph Generation, Community-Consistent.

Figure 1: Human mobility’s three layer patterns and corresponding properties and downstream applications.
planning [25, 48], Web-based location services [17, 45], and land-use optimization. Since collecting and sharing large-scale trajectories is costly and constrained by privacy and access restrictions [1, 38], human mobility generation has become an important way to provide realistic synthetic data [23, 30].
In practice, human mobility can be characterized by three layers of patterns [2, 7, 31, 39]. As illustrated in Fig. 1, at the individual layer, trajectory statistics such as travel distance and stay duration describe the behavioral regularities of a single user, supporting tasks that predict or optimize individual mobility decisions [9, 19]. At the population and flow layer, spatial distributions and origin-destination flows aggregate trajectories into citywide mobility demand, supporting tasks such as traffic flow forecasting, urban planning, and resource allocation [20, 46]. At the community structure layer, community organization and intra- and inter-community interactions capture the mesoscopic relationships among users and locations, supporting the identification and management of socially or functionally connected urban units, including public-service zoning, community governance, and social-interaction discovery [16, 42].
Existing studies have devoted considerable effort to generating human mobility. Mechanism-based methods, such as DRTISA [28], and deep learning methods, such as MoveSim [9] and TrajGDM [5], capture individual routines, transition preferences, and spatiotemporal dependencies. Large Language Model [13, 14, 21]-based methods [10, 34, 36, 40] further model activity semantics and destination choices. Meanwhile, d-EPR [27] exploits population-level location attractiveness, AgentMove [8] extracts shared mobility patterns across users, MobAgent [18] represents heterogeneous population profiles at an urban scale, and CoDiffMob [47] and DeepMobility [43] leverage population distributions and collective flows. Despite these advances, existing methods primarily emphasize individual trajectory realism and aggregate population and flow patterns. Although recent collective-aware generators incorporate interactions between individual and population-level mobility, preserving the evolving community structures formed by user-location interactions remains challenging. These structures capture mesoscopic relationships among users and locations, including shared destinations, co-mobility patterns, and hierarchical organization [11, 16]. Therefore, mobility generation should go beyond matching individual trajectory statistics and population-level distributions to preserve community structures.
In this paper, we aim to study community-consistent human mobility generation. To model community structures, we formulate mobility generation as the problem of generating dynamic user-location graphs, where users and locations are represented as nodes, and their interactions are represented as edges. This unified representation explicitly captures the dependencies among users, locations, and mobility decisions, while tracking how these interactions and the resulting community structures evolve over time [26, 39]. Achieving this objective requires addressing the following three core challenges:
• How to represent dynamic community structures for mobility generation? Community-consistent mobility generation requires priors that characterize dynamic community structures and interaction patterns as user-location interactions evolve over time. These priors should preserve temporal and structural regularities without reproducing exact historical realizations. The first challenge is therefore to construct representations that capture temporally coherent communities and extract interaction patterns that can serve as mobility generation priors.
• How to generate user-location interactions efficiently for large-scale mobility datasets? Under the graph-based formulation, each mobility decision corresponds to the creation of an interaction between a user and a location. Such a decision should reflect both the user's mobility intention and the location's role. However, reasoning over all possible user-location pairs is computationally prohibitive, requiring over one million inferences to generate a single day of hourly mobility for only 100 users. The second challenge is therefore to design an efficient generation process that considers complementary user-side and location-side evidence.
• How to bridge generated user-location graphs with realistic mobility structures? Even when each user-location interaction is individually plausible, their graph-level aggregation may still deviate from realistic community structures. Correcting such deviations requires not only identifying structural discrepancies at the graph level, but also tracing them back to the specific user and location decisions responsible and determining how these decisions should be revised. The third challenge is therefore to bridge generated user-location graphs with realistic mobility structures.
To address these challenges, we propose MOTION, a Multi-agent framework for cOmmuniTy-consIstent human mObility geNeration. MOTION consists of a user agent assigned to each target, a location agent associated with each location, and a global manager agent. Rather than learning previously unknown collective patterns through a trained predictor, we extract community-conditioned priors from historical mobility and use them to guide and iteratively refine generated user-location interactions toward realistic community structures. Specifically, MOTION first extracts community structures and generalizable community-conditioned interaction priors. MOTION transforms historical mobility trajectories into user-location graphs and applies a Leiden-based dynamic community detection algorithm to identify coherent community structures. Within each community, MOTION performs metagraph-based temporal template matching to abstract recurring mobility motifs, population and flow dynamics, and co-mobility patterns. These extracted priors summarize recurring community structures and interaction patterns without reproducing exact historical realizations, and serve as explicit guidance for subsequent multi-agent generation and structural targets for reflection, addressing the first challenge. Based on these priors, the user agents and location agents generate user-location interactions from the individual and community views, respectively. Each user agent constructs a mobility plan based on mobility motifs. For each planned movement, the user agent performs a destination candidate search to narrow the reasoning space and then reasons over the mobility plan, candidate-location contexts, and reflection signals to determine the user's movement, generating an individual-view graph. In parallel, location agents are selectively activated through an active location selection mechanism based on population and flow deviations and moving users in nearby locations. Each activated location agent reasons about which users are likely to arrive based on surrounding user contexts, population and flow dynamics, co-mobility patterns, and reflection signals, generating a community-view graph and addressing the second challenge. The manager agent then coordinates the two views by reasoning over their supporting evidence and constructs an intermediate graph. It further diagnoses which interactions cause deviations from realistic community structures and population and flow patterns, attributes these deviations to the responsible agents, and generates targeted reflection signals to revise user agents' plans and destination preferences, as well as location agents' attraction estimates and source-user selections. Only the affected agents regenerate their proposals, addressing the third challenge.
The main contributions can be summarized as follows:
• We study community-consistent human mobility generation and formulate mobility generation as the generation of dynamic user-location graphs.
• We propose MOTION, a prior-guided multi-agent framework that coordinates individual- and community-view generation through user and location agents, and employs manager-driven targeted reflection to improve structural consistency.
• We conduct extensive experiments on two real-world datasets. MOTION outperforms baselines by at least 4.05% across the reported metrics. Additional experiments evaluate robustness, privacy preservation, and the utility of the generated mobility.

(a) Real Data
(b) CoDiffMob
(c) LLMob
Figure 2: Community structures detected from real and generated mobility. Different colors represent different communities on the same gridded map.
2 PRELIMINARY STUDY
2.1 Community Structure Consistency
A mobility community consists of users and locations connected through shared destinations, synchronized movements, and interdependent population flows [16], providing a mesoscopic view of how individual movements jointly form spatially coherent activity regions and interaction boundaries [11]. Although recent mobility generators have incorporated collective mobility patterns, preserving the community structures emerging from user-location interactions remains challenging. To illustrate this limitation, we compare real mobility with trajectories generated by CoDiffMob [47] and LLMob [36], representing collective-aware and LLM-based mobility generators, respectively. We apply the same dynamic community detection procedure to all datasets and project the detected communities onto the same gridded urban map. As shown in Fig. 2, real mobility forms several large and spatially coherent communities, whereas CoDiffMob recovers some coherent regions but exhibits more fragmented community assignments, while LLMob produces more scattered communities. These observations suggest that modeling individual mobility patterns and aggregate population dynamics does not necessarily ensure the preservation of community-level organization. Therefore, realistic mobility generation should explicitly model and preserve evolving interaction and community structures.
2.2 Problem Definition
Given real-world mobility data and the initial mobility states of a set of target users, human mobility generation aims to generate realistic future mobility trajectories. Mathematically, let and denote the user and location sets. The historical mobility dataset is , where is the trajectory of user . Given a set of target users \hat{\mathcal{U}} = \{\hat{u}_i\}_{i=1}^N^* and their initial states \mathcal{X}_0 = \{(\ell_0^i, t_0^i)\}_{i=1}^N^*, let denote a mobility generation model. The generated trajectories are formulated as:
3 METHODOLOGY
3.1 Framework Overview
The overall framework of MOTION is illustrated in Fig. 3. MOTION consists of a user agent to each target user, a location agent to each location, and a global manager agent. During initialization, MOTION transforms historical trajectories into dynamic user-location graphs and applies temporally smoothed Leiden-based dynamic community detection and metagraph-based prior mining to extract coherent communities and community-conditioned interaction priors. Rather than training a predictor to discover new collective patterns, MOTION uses these extracted priors to guide agent decisions and provide structural reference targets for subsequent reflection. During generation, user agent constructs a mobility plan and performs destination candidate search, and infers the user's movement from the individual-view. Meanwhile, active location selection mechanism activates structurally relevant location agents to infer plausible arriving users from the community view. The manager agent coordinates these complementary proposals, identifies deviations between the generated graph and the extracted structural priors, and traces these deviations to the responsible user and location decisions. Targeted reflection signals are then sent to the affected agents for regeneration, and the refined graph update is used to condition the next time step.
3.2 Mobility Prior Initialization
To represent the interaction and community structures emerging across users, MOTION models historical mobility as dynamic user-location graphs, and then extracts temporally coherent communities and community-conditioned interaction priors.
3.2.1 Dynamic User-Location Graph Construction. MOTION represents human mobility as a sequence of dynamic user-location graph snapshots. In each snapshot, time-varying user-location edges record users' current locations, while the location-location edges capture stable geographic accessibility and historical mobility connectivity. Specifically, let U and L denote the historical user and location sets. After discretizing trajectories into T time intervals, MOTION constructs:
where indicates that user is located at at time . The static edge set connects locations according to geographic proximity and aggregate historical flows, providing a spatial backbone shared across snapshots. Changes from to encode individual movements and jointly determine location populations and inter-location flows. Therefore, human mobility is represented as sequential user-location graphs rather than isolated location transitions. Notably, to protect user privacy, we replace exact location identifiers with semantic POI types and discretize travel distances and stay durations into interval bins.
3.2.2 Community-Conditioned Interaction Prior Mining. To capture community structures and interaction patterns, MOTION applies a temporally smoothed Leiden-based algorithm to detect coherent communities. Let denote the community partition of . For , Leiden optimizes the Constant Potts Model (CPM) [35] objective, initialized with the preceding partition . Temporal smoothness is further encouraged through stochastic retention of each location's previous community assignment. This approach preserves temporal continuity while allowing community memberships to adapt to changing user-location interactions. After each partition is obtained, every user is assigned to the community of its current location. MOTION then employs metagraph-based temporal template matching to extract community-conditioned interaction

Figure 3: Overview of MOTION. MOTION first extracts community structures and interaction priors from real-world mobility. During generation, the user agent and the location agent propose user-location graphs from the individual and receiver-side community views. The manager coordinates these proposals and uses the extracted priors to identify structural deviations and guide targeted reflection.
priors. Individual-level priors include mobility motifs, motif transitions, and activity rhythms, while community-level priors include community memberships and sizes, population and flow dynamics, and co-mobility patterns. Together, these priors describe how individual movements form evolving community structures and guide subsequent mobility generation. Representative examples of the extracted priors are provided in Appendix C.
3.3 User Agent
MOTION assigns one user agent to each target user. Each user agent maintains the user's mobility state, constructs a mobility plan, performs destination candidates search, and proposes the next location from the individual view.
3.3.1 Individual Mobility Planning. To organize mobility decisions over the entire day, the user agent first assigns to a mobility community according to the initial location and the learned affiliation distribution . The user agent then samples a sequence of mobility motifs conditioned on the assigned community, time of day, and motif transition patterns. The transition between consecutive motifs is modeled as follows:
where denotes the current motif, denotes the assigned community, and denotes its activation time. Each motif is instantiated as a sequence of stay and move actions using the extracted activity rhythms, destination semantics, travel-distance ranges, and return patterns. The resulting mobility plan specifies when the user moves, the intended type of destination, and the expected movement structure. Users with compatible plans and community memberships are further associated with co-mobility patterns, providing synchronized-movement evidence for location-side reasoning. During generation, targeted reflection signals may revise the planned action, execution time, travel range, or destination intention.
3.3.2 Individual-view Mobility Reasoning. At each time step, the user agent executes the active segment of its daily mobility plan and determines the next location from the individual view. For a stay action, the current user-location edge is retained. For a return action, the agent revisits the recorded location to preserve the corresponding mobility motif. To reason efficiently and reliably about a non-return movement, MOTION conducts destination candidate search within the planned travel-distance range and evaluates the semantic compatibility, geographic distance, regional attraction, and community flow evidence of the retrieved locations. The user agent then jointly interpret these signals and reflection signal to select the next location. The decisions of all user agents are aggregated into the individual-view graph .
3.4 Location Agent
MOTION associates a location agent with each location to model mobility from a receiver-side community view. MOTION applies active location selection and invokes only the location agents that are most relevant to the current graph update. Each active location agent then infers which users are likely to arrive. This receiver-side reasoning complements the destination decisions of user agents and guides the generation of user-location edges toward realistic collective interaction patterns.
3.4.1 Active Location Selection. To efficiently reason over relevant locations, MOTION first identifies active locations according to deviations between current and expected location populations,

Figure 4: Local-set formation. Locations and their neighborhoods are activated according to population dynamics, nearby moving users, and prior-supported incoming flows and are then merged into a local set.
moving users in nearby or graph-connected source locations, and prior-supported incoming flows and co-mobility patterns. MOTION forms a local set by merging the identified active locations and neighboring locations, as illustrated in Fig. 4. For each local set, MOTION randomly samples at most active_m locations and activates their location agents. The sampled locations from all local sets are then merged to form the active location set. This strategy maintains coverage across different local mobility regions while avoiding repeated activation of only the most popular locations.
3.4.2 Community-view Mobility Reasoning. At each time step, each activated location agent infers user-location interactions from the receiver-side community view. The location agent identifies candidate users from graph-connected source locations and reasons over their current locations, mobility plans, intended activities, community memberships, and co-mobility relations, together with the semantic role, expected population, and characteristic incoming flows of the target location. The location agent then selects users whose arrivals are consistent with plausible graph connections, individual activity intentions, and community-conditioned interaction patterns. Co-mobility evidence further supports synchronized movements toward shared destinations. When multiple active locations select the same user, MOTION retains the proposal that is better supported by the population, flow, and co-mobility priors. The proposals of all active location agents are aggregated into the community-view graph , which is subsequently coordinated with the individual-view graph by the manager agent.
3.5 Manager Agent
The manager agent coordinates the individual- and community-view user-location graphs and evaluates structural deviations to attribute targeted reflection signals to the relevant agents. Through iterative coordination and community-consistency reflection, MOTION preserves individual mobility intentions while bridging the graph with realistic community structures.
3.5.1 Individual-Community Coordination. At each time step, the manager agent coordinates the individual-view graph and the community-view graph . For each user, MOTION jointly considers the mobility plan, movement history, intended activity, proposed destination, and stated rationale provided by the user agent, together with the location attraction, expected population and flow states, community role, co-mobility evidence, and corresponding

Figure 5: Community-consistency reflection. MOTION bridges generated and real communities, diagnoses deviations, attributes them to related decisions, and sends reflection signals to regenerate the affected proposals.
rationale provided by the location agent. When the two views agree, their shared proposal is retained. When they conflict, the manager agent uses LLM reasoning to weigh the proposals and rationales from both views and determine a final decision that balances individual intention and temporal continuity with community-conditioned interaction evidence. The resolved user-location edges form the intermediate graph at coordination round , which is subsequently evaluated through community-consistency reflection.
3.5.2 Community-Consistency Reflection. A single coordination round may produce plausible user-location interactions while still deviating from realistic population, flow, and community structures. Formally, iterative coordinations and reflections can be formed as:
where denotes the interaction priors. To diagnose structural deviations, MOTION applies the same temporally smoothed community detection procedure to the intermediate graph and aligns each generated community with the temporally corresponding real community using location-node Jaccard similarity. Based on the aligned communities, MOTION compares their location memberships and community sizes, together with location populations and intra- and inter-community flows. As illustrated in Fig. 5, MOTION identifies locations with mismatched community memberships or substantial population and flow deviations. For each deviating location, the manager agent collects the related users that stay at, depart from, or arrive at the location, together with the flow-connected source and destination locations. The manager agent then diagnoses which interaction decisions contribute to the deviations. Based on the diagnosis, the manager agent sends targeted reflection signals to the corresponding agents. User agents may revise their planned actions, execution times, travel ranges, or destination intentions, while location agents may increase or decrease their attraction and adjust their preferred source locations or candidate users. Only the affected agents regenerate their proposals, which are coordinated again to obtain .
4 EXPERIMENTS
4.1 Experimental Setup
4.1.1 Datasets and Experimental Settings. We evaluate MOTION on two real-world datasets. Private car dataset [22] consists of two
Table 1: Evaluation metrics of three pattern layers.
| Pattern Layer | Evaluation Metrics |
|---|---|
| Individual Trajectory Statistics | Distance, Radius, LocNum |
| Population and Flow Distributions | Pop-EMD, Flow-EMD, G-Rank |
| Community and Graph-Structural Consistency | Comm-Size, Comm-Mem, Motif, W-Degree |
weeks of GPS traces collected from 2,342 private vehicles. Mobile phone dataset [34] contains two weeks of GPS location traces from 5,352 mobile users. Both datasets are de-identified and were collected with the explicit authorization of individual users and data providers. Train and test users are strictly disjoint, and all pre-test-day trajectories of test users are excluded from prior construction and model training. During generation, each test user is provided only with the initial location on the test day, which is used as the common conditioning state for MOTION and all applicable baselines. We also use an open-source POI database to represent regional functional semantics. Detailed dataset statistics, ethical statement, POI construction, and experimental settings are provided in Appendices A, B, and E.
4.1.2 Baselines and Metrics. We compare MOTION with nine representative mobility generators, including the mechanistic method DRTISA [28], GAN-based generative models SeqGAN [41] and MoveSim [9], the collaborative generator DeepMobility [43], the diffusion-based model CoDiffMob [47], LLM-based methods LL-Mob [36] and LLM-COD [40], and the agent-based models TrajLLM [12] and AgentMove [8]. Detailed descriptions of the baselines are provided in Appendix D. We evaluate MOTION at the three pattern layers summarized in Table 1. Detailed metric definitions are provided in Appendix F.
4.2 Overall Performance
The overall mobility generation performance on the private car and mobile phone datasets is reported in Table 2. MOTION performs best across all metrics, showing that preserving evolving interaction and community structures does not compromise trajectory realism. At the individual trajectory statistics level, MOTION reduces Distance by over LLMob on the private car dataset and by over DeepMobility on the mobile phone dataset, the strongest baselines for this metric. This improvement results from combining community-conditioned interaction patterns with user-agent reasoning over individual intentions and spatial preferences. At the population and flow distributions level, MOTION reduces Flow-EMD by over CoDiffMob on the private car dataset and by over TrajLLM on the mobile phone dataset. Location-agent modeling of regional attraction and population-flow dynamics, together with manager coordination, aligns collective mobility with user intentions. At the community and graph-structural consistency level, MOTION reduces Comm-Size by and improves Comm-Mem by over CoDiffMob on the private car dataset. On the mobile phone dataset, it improves Comm-Mem by over LLMob, reduces Motif by relative to AgentMove, and reduces W-Degree by over DeepMobility. These results confirm that modeling mobility as user-location graph evolution and applying community-consistency reflection better preserve community organization and graph connectivity.
4.3 Ablation Analysis
We evaluate three role-removal variants, w/o user, w/o location, and w/o manager, and two controls supplied with the same information as MOTION. The single-agent variant performs unified reasoning over all available information, while the deterministic generator combines the same decision factors using fixed weights.
As shown in Table 3, MOTION achieves the best result on all five reported metrics in both datasets. Removing the user agent worsens individual spatial statistics and population-community consistency, while removing the location agent weakens population and community consistency. Among the role-removal variants, removing the location agent yields the largest Pop-EMD on both datasets, while removing the manager degrades every metric on both datasets, supporting the importance of location-side reasoning and coordinated refinement. MOTION also outperforms both same-information controls on every reported metric in both datasets, indicating that its gains arise not only from access to collective information but also from role-specific reasoning and coordinated refinement.
4.4 Generalization Analysis
Specifically, user mobility motifs from the source dataset are used to construct daily mobility plans, while interaction priors are extracted from the target dataset to guide generation and evaluation on that target dataset. This setting evaluates the recombination of source mobility motifs and target structural priors, rather than target-prior-free cross-city generalization. As shown in Fig. 15 in Appendix I, Distance and Radius exhibit relatively large discrepancies because of different mobility characteristics and spatial scales. Nevertheless, MOTION closely preserves the community structures and interaction priors.
4.5 Community Structure Visualization
To qualitatively examine whether generated mobility preserves the community structures emerging across users, we apply the community detection procedure to the real and generated user-location graphs and visualize the resulting location communities in Fig 6. CoDiffMob produces scattered communities on the private car dataset, while LLMob yields excessively mixed communities on the mobile phone dataset. In contrast, MOTION recovers spatially coherent communities with geographic extents, relative sizes, and boundaries closely resembling the real structures in both datasets. This result confirms that MOTION preserves mesoscopic community organization beyond individual trajectory statistics.
4.6 LLM Backbone Analysis
We evaluate the impact of LLM backbone choice on MOTION by replacing the default GPT-4o with representative models. Fig. 7 shows that backbone choice affects both individual mobility realism and community consistency, reflecting the importance of semantic understanding and coordination reasoning in MOTION. Overall, MOTION remains effective across LLM models. Considering the generation quality, we use GPT-4o as the default backbone in the
Table 2: Overall performance on the private car and mobile phone datasets (mean ± standard deviation over five runs where available; otherwise, mean only). Higher Comm-Mem and lower values of all other metrics indicate better performance. Bold indicates the best result, and underline denotes the second-best.
| Methods | Individual Trajectory Statistics | Population and Flow Distributions | Community and Graph-Structural Consistency | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Distance↓ | Radius↓ | LocNum↓ | Pop-EMD↓ | Flow-EMD↓ | G-Rank↓ | Comm-Size↓ | Comm-Mem↑ | Motif↓ | W-Degree↓ | |
| Private Car Dataset | ||||||||||
| DRTISA | 0.2645±0.0038 | 0.1951±0.0031 | 0.1518±0.0027 | 0.0534±0.0011 | 0.0511±0.0012 | 0.2741±0.0042 | 0.0876±0.0015 | 0.2661±0.0033 | 0.2744±0.0041 | 0.3637±0.0050 |
| SeqGAN | 0.2680±0.0040 | 0.2050±0.0035 | 0.1896±0.0030 | 0.0597±0.0013 | 0.0590±0.0014 | 0.2889±0.0045 | 0.0725±0.0014 | 0.4388±0.0078 | 0.1517±0.0024 | 0.2898±0.0042 |
| MoveSim | 0.2257±0.0034 | 0.1781±0.0029 | 0.2575±0.0038 | 0.1037±0.0020 | 0.1014±0.0019 | 0.3475±0.0051 | 0.2203±0.0035 | 0.2756±0.0033 | 0.2918±0.0044 | 0.3134±0.0047 |
| DeepMobility | 0.2086±0.0053 | 0.1185±0.0019 | 0.2190±0.0032 | 0.0565±0.0018 | 0.0555±0.0024 | 0.2614±0.0030 | 0.0977±0.0012 | 0.5335±0.0041 | 0.2263±0.0038 | 0.3007±0.0044 |
| CoDiffMob | 0.2106±0.0035 | 0.1176±0.0016 | 0.2494±0.0034 | 0.0422±0.0009 | 0.0420±0.0011 | 0.2851±0.0042 | 0.0676±0.0010 | 0.5365±0.0022 | 0.2180±0.0017 | 0.2773±0.0029 |
| LLMob | 0.1928±0.0018 | 0.1175±0.0017 | 0.1463±0.0018 | 0.0428±0.0005 | 0.0458±0.0009 | 0.2558±0.0037 | 0.0723±0.0010 | 0.4995±0.0041 | 0.1920±0.0030 | 0.2740±0.0034 |
| LLM-COD | 0.2374±0.0029 | 0.2232±0.0034 | 0.1976±0.0030 | 0.0759±0.0015 | 0.0729±0.0015 | 0.2259±0.0034 | 0.0754±0.0013 | 0.4684±0.0055 | 0.1919±0.0029 | 0.3682±0.0052 |
| TrajLLM | 0.2364±0.0031 | 0.1880±0.0030 | 0.2207±0.0033 | 0.0797±0.0016 | 0.0767±0.0017 | 0.2261±0.0032 | 0.0939±0.0017 | 0.3750±0.0018 | 0.2084±0.0032 | 0.3410±0.0048 |
| AgentMove | 0.2611±0.0037 | 0.2257±0.0038 | 0.2479±0.0035 | 0.0436±0.0009 | 0.1753±0.0028 | 0.2233±0.0021 | 0.0680±0.0009 | 0.5194±0.0029 | 0.2933±0.0045 | 0.3069±0.0040 |
| MOTION | 0.1709±0.0015 | 0.0958±0.0014 | 0.1258±0.0015 | 0.0402±0.0004 | 0.0403±0.0007 | 0.2079±0.0018 | 0.0629±0.0007 | 0.5766±0.0012 | 0.1340±0.0018 | 0.2347±0.0025 |
| Improvement | 11.36% | 18.47% | 14.01% | 4.74% | 4.05% | 6.90% | 6.95% | 7.47% | 11.67% | 14.34% |
| Mobile Phone Dataset | ||||||||||
| DRTISA | 0.2915±0.0041 | 0.1995±0.0032 | 0.1593±0.0028 | 0.1602±0.0028 | 0.1600±0.0029 | 0.3917±0.0058 | 0.2057±0.0042 | 0.4522±0.0053 | 0.2872±0.0043 | 0.3905±0.0052 |
| SeqGAN | 0.1636±0.0027 | 0.1626±0.0028 | 0.1509±0.0026 | 0.1196±0.0022 | 0.1194±0.0023 | 0.3449±0.0050 | 0.1992±0.0038 | 0.4247±0.0028 | 0.2706±0.0041 | 0.2932±0.0042 |
| MoveSim | 0.2382±0.0035 | 0.1920±0.0032 | 0.3151±0.0045 | 0.1804±0.0030 | 0.1777±0.0031 | 0.3018±0.0047 | 0.2231±0.0042 | 0.4366±0.0050 | 0.3387±0.0050 | 0.3739±0.0054 |
| DeepMobility | 0.1569±0.0018 | 0.1426±0.0019 | 0.1996±0.0026 | 0.1278±0.0014 | 0.1264±0.0056 | 0.3505±0.0059 | 0.1855±0.0027 | 0.4550±0.0029 | 0.2892±0.0034 | 0.2685±0.0030 |
| CoDiffMob | 0.2635±0.0039 | 0.1496±0.0027 | 0.1911±0.0025 | 0.1165±0.0013 | 0.1163±0.0013 | 0.3478±0.0037 | 0.1320±0.0041 | 0.4591±0.0067 | 0.2669±0.0051 | 0.2731±0.0034 |
| LLMob | 0.1778±0.0029 | 0.1834±0.0030 | 0.1116±0.0018 | 0.1277±0.0025 | 0.1274±0.0026 | 0.3544±0.0052 | 0.2143±0.0045 | 0.4601±0.0062 | 0.2803±0.0043 | 0.2749±0.0032 |
| LLM-COD | 0.1598±0.0026 | 0.1512±0.0025 | 0.2007±0.0031 | 0.1139±0.0022 | 0.1134±0.0022 | 0.2982±0.0043 | 0.1504±0.0032 | 0.4593±0.0041 | 0.2904±0.0045 | 0.2803±0.0036 |
| TrajLLM | 0.1917±0.0031 | 0.1955±0.0033 | 0.1852±0.0030 | 0.1105±0.0020 | 0.1105±0.0020 | 0.2960±0.0028 | 0.2317±0.0048 | 0.4517±0.0049 | 0.2691±0.0038 | 0.3574±0.0049 |
| AgentMove | 0.2257±0.0036 | 0.1443±0.0022 | 0.2818±0.0040 | 0.1297±0.0026 | 0.1295±0.0027 | 0.3508±0.0051 | 0.1921±0.0040 | 0.4367±0.0062 | 0.2426±0.0032 | 0.3270±0.0044 |
| MOTION | 0.1367±0.0020 | 0.1263±0.0018 | 0.0955±0.0014 | 0.0925±0.0015 | 0.0919±0.0015 | 0.2773±0.0022 | 0.1170±0.0025 | 0.4971±0.0025 | 0.2150±0.0024 | 0.2406±0.0026 |
| Improvement | 12.87% | 11.43% | 14.43% | 16.29% | 16.83% | 6.32% | 11.36% | 8.04% | 11.38% | 10.39% |

(a) Real Private Car Dataset(b)
Car Dataset
Dataset
Dataset
Dataset
Phone Dataset
Figure 6: Community structures detected from real and generated mobility on the private car and mobile phone datasets. The panels compare real mobility and MOTION with CoDiffMob on the private car dataset and LLMob on the mobile phone dataset; each color distinguishes a detected community.

(a) Private Car Dataset
(b) Mobile Phone Dataset
Figure 7: Impact of different LLM backbones on the private car and mobile phone datasets.
main experiments, while stronger backbones can provide further gains for particular mobility properties.
4.7 Hyperparameter Analysis
We further analyze how the key hyperparameters controlling individual-view candidate retrieval and community-view reasoning affect the mobility generation performance of OURS. Specifically, top_k determines the number of destination candidates presented to each user agent during destination reasoning, while active_m determines the maximum number of considered neighbors for an activated location agent. As shown in Fig. 8, Distance and Pop-EMD generally improve until both parameters reach 10 but degrade with larger values because weakly relevant evidence introduces reasoning noise. The consistent optimum around 10 indicates that MOTION benefits from balancing evidence coverage with focused agent reasoning rather than activating as many candidates or agents as possible.
4.8 Case Study
We present a representative within-step graph update in Fig. 9. The user agent proposes a move according to the mobility plan, destination semantics, travel range, and candidate attraction. Independently, the corresponding location agent examines whether the arrival is compatible with the region's population, incoming flow,
Table 3: Ablation results on both datasets. The single-agent and deterministic controls use the same information as MOTION. Bold indicates the best result.
| Variants | Dist.↓ | Radius↓ | Pop-EMD↓ | Comm-Size↓ | Comm-Mem↑ |
|---|---|---|---|---|---|
| Private Car Dataset | |||||
| w/o user | 0.1939 | 0.1918 | 0.0459 | 0.0887 | 0.4868 |
| w/o location | 0.1817 | 0.1050 | 0.0524 | 0.0881 | 0.5320 |
| w/o manager | 0.2054 | 0.1331 | 0.0486 | 0.0831 | 0.4677 |
| single-agent | 0.2367 | 0.1174 | 0.0548 | 0.0792 | 0.5247 |
| deterministic | 0.2511 | 0.1219 | 0.0665 | 0.0841 | 0.4925 |
| MOTION | 0.1709 | 0.0958 | 0.0402 | 0.0629 | 0.5766 |
| Mobile Phone Dataset | |||||
|---|---|---|---|---|---|
| w/o user | 0.1767 | 0.2367 | 0.1025 | 0.1608 | 0.4358 |
| w/o location | 0.1678 | 0.1674 | 0.1657 | 0.1975 | 0.4132 |
| w/o manager | 0.1863 | 0.1763 | 0.1327 | 0.1462 | 0.4682 |
| single-agent | 0.1848 | 0.1769 | 0.1246 | 0.1735 | 0.4666 |
| deterministic | 0.2201 | 0.1930 | 0.1903 | 0.1368 | 0.4771 |
| MOTION | 0.1367 | 0.1263 | 0.0925 | 0.1170 | 0.4971 |

Figure 8: Sensitivity of Distance (left) and Pop-EMD (right) to top_k and active_m on the private car and mobile phone datasets.
and community context. The manager agent compares both views, retains mutually supported decisions, and resolves inconsistent proposals and then identifies structurally deviating locations and issues targeted reflection signals to revise only the affected user or location decisions. Detailed prompts are provided in Appendix L.
4.9 Privacy Analysis
We conduct uniqueness testing [4, 44] by comparing each generated with the real trajectories in the training set using normalized Levenshtein similarity [15] and report the cumulative distributions. Fig. 10(a) shows an intermediate median similarity on the private car dataset, with a similar trend on the mobile phone dataset (Appendix G). This indicates that MOTION captures reusable mobility regularities without reproducing specific training trajectories. We further conduct membership inference attack test [4, 44]. We use Random Forest (RF) [3], Multi-Layer Perceptron (MLP) [32], and Logistic Regression (LR) [6] to distinguish training trajectories from held-out samples. As shown in Fig. 10(b), the strongest attack provide only a limited advantage over random guessing, indicating that the generated mobility retains few distinctive signatures of individual training samples.
Table 4: End-to-end token consumption and latency per generated user-day.
| Methods | Private Car Dataset | Mobile Phone Dataset | ||
|---|---|---|---|---|
| Tokens | Latency | Tokens | Latency | |
| MOTION | 40,662 | 229 s | 43,132 | 224 s |
| LLMob | 40,647 | 255 s | 45,023 | 230 s |
| AgentMove | 42,331 | 264 s | 48,159 | 244 s |
4.10 Downstream Task Analysis
We evaluate generated mobility on community-aware CDGP [11] prediction using Average Precision (AP), Normalized Mutual Information (NMI), and Purity. We compare CDGP trained without community information (No-Com), on real data (Real), and with mobility generated by LLMob or MOTION. In the 100% setting, MOTION outperforms LLMob and approaches Real, while community information consistently improves over No-Com. In the 50% setting, LLMob and MOTION augment half of the real data with an equal amount of generated data, whereas Real and No-Com use only the real half. MOTION performs best on all metrics, showing that community-consistent synthetic mobility provides useful interaction structures when observations are scarce.
4.11 Complexity Analysis
We report end-to-end token consumption and latency per generated user-day in Table 5. Compared with LLMob, MOTION achieves lower latency on both datasets while using a similar number of tokens on the private car dataset and fewer tokens on the mobile phone dataset. MOTION also outperforms AgentMove on both measures, showing that preserving community and interaction structures does not incur higher generation costs. The component-level breakdown is provided in Appendix J.
5 RELATED WORK
Human mobility generation has evolved from mechanistic models to deep generators and LLM-based agents. Early rule-based methods such as DRTISA [28] and d-EPR [27] encode routines, exploration, and preferential return but rely on simplified behavioral assumptions. Deep models such as SeqGAN [41] and MoveSim [9] instead learn user preferences and spatiotemporal transitions through adversarial generation. The emergence of large language models (LLMs) introduced strong semantic understanding and contextual reasoning into mobility modeling. LLMob [36] verbalizes trajectory histories and contextual information for autoregressive next-location inference, whereas LLM-COD [40] conditions destination generation on departure time, origin, and regional POI semantics. An LLM-based agent further equips an LLM with memory, planning, tool use, and iterative feedback, enabling interpretable multi-step decisions and the integration of heterogeneous urban knowledge. Ju et al. [12] developed TrajLLM to hierarchically generate personas, activities, and destinations; Feng et al. [8] introduced AgentMove, which combines spatiotemporal memory, world knowledge, and collective patterns for zero-shot next-location reasoning. Future research is expected to leverage multi-agent collaboration to simulate interactions among individuals, uncovering deeper relational structures underlying human mobility [16, 29].
Example of Multi-Agent Reasoning, Coordination and Reflection
User Agent 418: User 418 at 8:00 plans to MOVE to a Science & Education & Culture Area within 1km~1.5km). Candidate Locations are [loc 298, Shopping & Consumer Goods, dist=1.11km, gravity=12.660 flow_out=17.9; loc 317 Science & Education & Culture dist=1.11km gravity=6.242 flow_out=9.1, ...]. Agent Decision: {"next_location_id": 317, "reason": "Best match for 'Science & Education & Culture' with good gravity and flow_out, and ideal distance."} User Agent 452: ...
Location Agent 317: Loc 317 is a Science & Education & Culture activity center with 12 users here now. Scaled history population and flow at 8:00 are 12.9 and 16.62. Surrounding Locations with moving users are [Loc 209, Hotels & Accommodations area, moving_user_num: 29, hist_flow_in: 22.46; Loc 306, ...]. Surrounding MOVING Users are [User 418, Daily Plan is..., co-mob users are..., now is in Loc 209, moving to a Science & Education & Culture Area; ...]. Agent Decision: {"users_to_attract": ["418", "220"], "reason": "Population is under-populated, so only attract strong matches. Prioritize users from Hotels & Accommodations (loc 209)."} Location Agent 298: ...
Manager Agent: Scaled history movement at 8:00 is13.8~25.7. [User 418, User Agent Decision and reason are ..., Location Agent Decision and reason are...., User 258, ...]. Agent Decision is {"user_id": 418, "resolved_to_loc": 317, "action": "MOVE", "reason": "Both agents agree on MOVE to 317; loc 317 is under-populated."} {"user_id": 901, "resolved_to_loc": 107, "action": "STAY", "reason": "User agent proposes STAY; no strong real-data signal to override."},....}. Reflections: {"location_signals": [{"loc_id": 106, "signal_type": "decrease attraction", "detail": "Location 106 (Hotels & Accommodations) is over-populated; reduce attraction."},...], [{"user_id": "183", "signal_type": "modify_plan_action", "detail": "Switch planned action to STAY at Shopping & Consumer Good to reduce overpopulation."},...}].
Figure 9: An example of multi-agent reasoning. Colored regions highlight the key inputs and outputs of each agent role.

(a) Uniqueness Testing on Private Car
(b) Membership Inference Attacks
Figure 10: Privacy results: (a) nearest-training-trajectory similarities on the private car dataset and (b) membership inference attack success rates on both datasets.

Figure 11: Downstream prediction performance on the private car dataset under the (left) and (right) training settings. Higher values indicate better performance.

Figure 12: Downstream prediction performance on the private car dataset under the (left) and (right) training settings. Higher values indicate better performance.
Table 5: End-to-end token consumption and latency per generated user-day.
| Methods | Private Car Dataset | Mobile Phone Dataset | ||
|---|---|---|---|---|
| Tokens | Latency | Tokens | Latency | |
| MOTION | 40,662 | 229 s | 43,132 | 224 s |
| LLMob | 40,647 | 255 s | 45,023 | 230 s |
| AgentMove | 42,331 | 264 s | 48,159 | 244 s |
6 CONCLUSION
In this paper, we presented MOTION, a Multi-agent framework for cOmmuniTy-consIstent human mObility geNeration. MOTION extracts community-conditioned interaction priors, employs user agents and location agents to propose complementary graph updates, and uses a manager agent for coordination and community-consistency reflection. Experiments on two real-world datasets demonstrate improvements across individual, population, and community levels, while further analyses confirm cross-city generalization, privacy preservation, and downstream utility.
REFERENCES
[1] Aleix Bassolas, Hugo Barbosa-Filho, Brian Dickinson, Xerxes Dotiwalla, Paul Eastham, Riccardo Gallotti, Gourab Ghoshal, Bryant Gipson, Surendra A Hazarie, Henry Kautz, et al. 2019. Hierarchical organization of urban mobility and its connection with city livability. Nature communications 10, 1 (2019), 4817.
[2] Aleksandar Bojchevski, Oleksandr Shchur, Daniel Zügner, and Stephan Günnemann. 2018. Netgan: Generating graphs via random walks. In International conference on machine learning. PMLR, 610–619.
[3] Leo Breiman. 2001. Random forests. Machine learning 45, 1 (2001), 5–32.
[4] Zhongcai Cao, Kang Liu, Xin Jin, Li Ning, Ling Yin, and Feng Lu. 2025. Stage: a spatiotemporal-knowledge enhanced multi-task generative adversarial network (gan) for trajectory generation. International Journal of Geographical Information Science 39, 5 (2025), 1100–1127.
[5] Chen Chu, Hengcai Zhang, Peixiao Wang, and Feng Lu. 2024. Simulating human mobility with a trajectory generation framework based on diffusion model. International Journal of Geographical Information Science 38, 5 (2024), 847–878.
[6] David R Cox. 1958. The regression analysis of binary sequences. Journal of the Royal Statistical Society Series B: Statistical Methodology 20, 2 (1958), 215–232.
[7] Bangchao Deng, Xin Jing, Tianyue Yang, Bingqing Qu, Dingqi Yang, and Philippe Cudre-Mauroux. 2025. Revisiting synthetic human trajectories: Imitative generation and benchmarks beyond datasaurus. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 1. 201–212.
[8] Jie Feng, Yuwei Du, Jie Zhao, and Yong Li. 2025. Agentmove: A large language model based agentic framework for zero-shot next location prediction. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers). 1322–1338.
[9] Jie Feng, Zeyu Yang, Fengli Xu, Haisu Yu, Mudan Wang, and Yong Li. 2020. Learning to simulate human mobility. In Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining. 3426–3433.
[10] Letian Gong, Yan Lin, Xinyue Zhang, Yiwen Lu, Xuedi Han, Yichen Liu, Shennan Guo, Youfang Lin, and Huaiyu Wan. 2024. Mobility-llm: Learning visiting intentions and travel preference from human mobility data with large language models. Advances in Neural Information Processing Systems 37 (2024), 36185–36217.
[11] Shuo Ji, Xiaodong Lu, Mingzhe Liu, Leilei Sun, Chuanren Liu, Bowen Du, and Hui Xiong. 2023. Community-based dynamic graph learning for popularity prediction. In Proceedings of the 29th ACM SIGKDD conference on knowledge discovery and data mining. 930–940.
[12] Chenlu Ju, Jiaxin Liu, Shobhit Sinha, Hao Xue, and Flora Salim. 2025. Trajllm: A modular llm-enhanced agent-based framework for realistic human trajectory simulation. In Companion Proceedings of the ACM on Web Conference 2025. 2847–2850.
[13] Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. Advances in neural information processing systems 35 (2022), 22199–22213.
[14] Xiaochong Lan, Jie Feng, Yizhou Sun, Chen Gao, Jiahuan Lei, Xinleishi Xinleishi, Hengliang Luo, and Yong Li. 2025. Open-set living need prediction with large language models. In Findings of the Association for Computational Linguistics: ACL 2025. 5454–5472.
[15] Vladimir I Levenshtein et al. 1966. Binary codes capable of correcting deletions, insertions, and reversals. In Soviet physics doklady, Vol. 10. Soviet Union, 707–710.
[16] Jiachen Li, Fan Yang, Masayoshi Tomizuka, and Chiho Choi. 2020. Evolvegraph: Multi-agent trajectory prediction with dynamic relational reasoning. Advances in neural information processing systems 33 (2020), 19783–19794.
[17] Tong Li and Yong Li. 2023. Artificial intelligence for reducing the carbon emissions of 5G networks in China. 1522–1523 pages.
[18] Xuchuan Li, Fei Huang, Jianrong Lv, Zhixiong Xiao, Guolong Li, and Yang Yue. 2024. Be more real: Travel diary generation using llm agents and individual profiles. arXiv preprint arXiv:2407.18932 (2024).
[19] Defu Lian, Yongji Wu, Yong Ge, Xing Xie, and Enhong Chen. 2020. Geography-aware sequential location recommendation. In Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining. 2009–2019.
[20] Yuxuan Liang, Kun Ouyang, Lin Jing, Sijie Ruan, Ye Liu, Junbo Zhang, David S Rosenblum, and Yu Zheng. 2019. Urbanfm: Inferring fine-grained urban flows. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining. 3132–3142.
[21] Jianghao Lin, Rong Shan, Chenxu Zhu, Kounianhua Du, Bo Chen, Shigang Quan, Ruiming Tang, Yong Yu, and Weinan Zhang. 2024. Rella: Retrieval-enhanced large language models for lifelong sequential behavior comprehension in recommendation. In Proceedings of the ACM Web Conference 2024. 3497–3508.
[22] Bo Liu, Tong Li, Zhu Xiao, Wenjie Chen, Yongqiang Hei, Jingtao Ding, and Guo Chen. 2026. A multi-granularity self-guiding graph diffusion model for predicting private car activity. IEEE Transactions on Intelligent Transportation Systems (2026).
[23] Chenxi Liu, Zhu Xiao, Wangchen Long, Tong Li, Hongbo Jiang, and Keqin Li. 2025. Vehicle trajectory data processing, analytics, and applications: A survey. Comput. Surveys 57, 9 (2025), 1–36.
[24] Hao Liu, Ying Li, Yanjie Fu, Huaibo Mei, Jingbo Zhou, Xu Ma, and Hui Xiong. 2020. Polestar: An intelligent, efficient and national-wide public transportation routing engine. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. 2321–2329.
[25] Massimiliano Luca, Gianni Barlacchi, Bruno Lepri, and Luca Pappalardo. 2021. A survey on deep learning for human mobility. ACM Computing Surveys (CSUR) 55, 1 (2021), 1–44.
[26] Giovanni Mauro, Massimiliano Luca, Antonio Longa, Bruno Lepri, and Luca Pappalardo. 2022. Generating mobility networks with generative adversarial networks. EPJ data science 11, 1 (2022), 58.
[27] Luca Pappalardo, Salvatore Rinzivillo, and Filippo Simini. 2016. Human mobility modelling: exploration and preferential return meet the gravity model. Procedia Computer Science 83 (2016), 934–939.
[28] Luca Pappalardo and Filippo Simini. 2018. Data-driven generation of spatiotemporal routines in human mobility. Data Mining and Knowledge Discovery 32, 3 (2018), 787–829.
[29] Joon Sung Park, Joseph O'Brien, Carrie Jun Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein. 2023. Generative agents: Interactive simulacra of human behavior. In Proceedings of the 36th annual acm symposium on user interface software and technology. 1–22.
[30] Roberto Pellungrini, Luca Pappalardo, Francesca Pratesi, and Anna Monreale. 2017. A data mining approach to assess privacy risk in human mobility data. ACM Transactions on Intelligent Systems and Technology (TIST) 9, 3 (2017), 1–27.
[31] Can Rong, Jingtao Ding, and Yong Li. 2024. An interdisciplinary survey on origin-destination flows modeling: Theory and techniques. Comput. Surveys 57, 1 (2024), 1–49.
[32] Frank Rosenblatt. 1958. The perceptron: a probabilistic model for information storage and organization in the brain. Psychological review 65, 6 (1958), 386.
[33] Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. 1998. A metric for distributions with applications to image databases. In Sixth international conference on computer vision (IEEE Cat. No. 98CH36271). IEEE, 59–66.
[34] Chenyang Shao, Fengli Xu, Bingbing Fan, Jingtao Ding, Yuan Yuan, Meng Wang, and Yong Li. 2024. Chain-of-planned-behaviour workflow elicits few-shot mobility generation in llms. arXiv preprint arXiv:2402.09836 (2024).
[35] Vincent A Traag, Ludo Waltman, and Nees Jan Van Eck. 2019. From Louvain to Leiden: guaranteeing well-connected communities. Scientific reports 9, 1 (2019), 5233.
[36] 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. Advances in Neural Information Processing Systems 37 (2024), 124547–124574.
[37] Hua Wei, Guanjie Zheng, Huaxiu Yao, and Zhenhui Li. 2018. Intellilight: A reinforcement learning approach for intelligent traffic light control. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining. 2496–2505.
[38] Yanyan Xu, Luis E Olmos, David Mateo, Alberto Hernando, Xiaokang Yang, and Marta C González. 2023. Urban dynamics through the lens of human mobility. Nature computational science 3, 7 (2023), 611–620.
[39] Jiaxuan You, Rex Ying, Xiang Ren, William Hamilton, and Jure Leskovec. 2018. Graphrnn: Generating realistic graphs with deep auto-regressive models. In International conference on machine learning. PMLR, 5708–5717.
[40] Chenyang Yu, Xinpeng Xie, Yan Huang, and Chenxi Qiu. 2024. Harnessing llms for cross-city od flow prediction. In Proceedings of the 32nd ACM International Conference on Advances in Geographic Information Systems. 384–395.
[41] Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. 2017. Seggan: Sequence generative adversarial nets with policy gradient. In Proceedings of the AAAI conference on artificial intelligence, Vol. 31.
[42] Jing Yuan, Yu Zheng, and Xing Xie. 2012. Discovering regions of different functions in a city using human mobility and POIs. In Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining. 186–194.
[43] Yuan Yuan, Jingtao Ding, Depeng Jin, and Yong Li. 2025. Learning the complexity of urban mobility with deep generative network. PNAS nexus 4, 5 (2025), pgaf081.
[44] Yuan Yuan, Jingtao Ding, Huandong Wang, and Depeng Jin. 2024. Generating daily activities with need dynamics. ACM Transactions on Intelligent Systems and Technology 15, 2 (2024), 1–28.
[45] Shiyuan Zhang, Tong Li, Shuodi Hui, Guangyu Li, Yanping Liang, Li Yu, Depeng Jin, and Yong Li. 2023. Deep transfer learning for city-scale cellular traffic generation through urban knowledge graph. In Proceedings of the 29th ACM SIGKDD conference on knowledge discovery and data mining. 4842–4851.
[46] Tianlong Zhang, Xiaoxi He, Yuxiang Wang, Yi Xu, Rendi Wu, Zhifei Wang, and Yongxin Tong. 2025. FedMetro: Efficient Metro Passenger Flow Prediction via Federated Graph Learning. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 2. 5215–5224.
[47] Yuheng Zhang, Yuan Yuan, Jingtao Ding, Jian Yuan, and Yong Li. 2025. Noise matters: Diffusion model-based urban mobility generation with collaborative noise priors. In Proceedings of the ACM on Web Conference 2025. 5352–5363.
[48] Yu Zheng, Licia Capra, Ouri Wolfson, and Hai Yang. 2014. Urban computing: concepts, methodologies, and applications. ACM Transactions on Intelligent Systems and Technology (TIST) 5, 3 (2014), 1–55.
SUPPLEMENTARY MATERIAL
A DATASET STATISTICS AND ETHICAL STATEMENT
The private car dataset consists of two weeks of GPS traces collected from 2,342 private vehicles. The mobile phone dataset contains two weeks of GPS-based location traces collected from 5,352 mobile users. To protect user privacy, coordinate-level locations are mapped to region-level identifiers, and each mobility record contains only a de-identified user or vehicle identifier, a timestamp, and the corresponding region identifier. All data used in this study were collected with the explicit authorization of the individual users and data providers and were anonymized before we accessed them. Table 6 summarizes the resulting dataset statistics.
B POI PROFILES
To capture the functional semantics of each region, we construct a POI profile using an open-source POI database containing geographic coordinates, category labels, and place names. As shown in Table 7, there are 14 top-level POI categories, while the underlying POI database contains finer-grained subcategories. For each region, we compute the proportion of POIs belonging to each category, resulting in a 14-dimensional distribution vector that represents its functional semantics. These regional POI profiles are associated with the mobility records and are used by MOTION for semantic mobility planning, destination retrieval, and location-side reasoning.
C DETAILS OF MOTIFS MINING
This section defines the mobility motifs extracted through metagraph-based prior mining and provides representative examples using POI semantics and discretized travel distances. STAY represents a continuous period during which a user remains at the same location without an inter-location movement. MOVE_AB represents a one-way movement from a source location to a different destination without a return within the motif. ROUND_ABA describes a visit to another location followed by a return to the original source. CHAIN_ABC captures a sequence of visits to three distinct locations without revisiting an earlier location. RETURN_ABCB describes a movement through three locations followed by a return to the intermediate location rather than the original source. FULL_ABCBA captures a nested return pattern in which a user revisits the intermediate location and subsequently returns to the original source. Each movement is represented by its source and destination POI semantics together with one of seven travel-distance bins: 0–1 km, 1–2 km, 2–3 km, 3–5 km, 5–8 km, 8–12 km, and >12 km. Table 8 provides concrete examples, where a repeated POI label within an example denotes a revisit to the same location instance; STAY has no distance bin because it contains no movement.
D BASELINE DESCRIPTIONS
DRTISA. [28] DRTISA is a mechanistic mobility generator that decouples temporal routines from spatial movements. It first learns a diary model from real trajectories to determine when a user follows or departs from a recurrent routine, and then translates the
Table 6: Statistics of the private car and mobile phone datasets.
| Dataset | Period | # Locations | # Users | # POIs | # POI Categories | # Records | Avg. Moves per User | Avg. Daily Moves per User |
|---|---|---|---|---|---|---|---|---|
| Private car dataset | 2 weeks | 500 | 2,342 | 717,461 | 14 | 678,341 | 8.75 | 0.88 |
| Mobile phone dataset | 2 weeks | 500 | 5,352 | 679,413 | 14 | 1,235,619 | 18.60 | 1.28 |
Table 7: The 14 high-level POI semantic categories.
| POI Semantic Categories | |
|---|---|
| Transportation Facilities | Leisure & Entertainment |
| Companies & Enterprises | Healthcare |
| Commercial & Residential | Tourist Attractions |
| Automotive | Life Services |
| Science & Education & Culture | Shopping & Consumer Goods |
| Sports & Fitness | Hotels & Accommodations |
| Financial Institutions | Dining & Cuisine |
diary into physical locations through exploration and preferential-return mechanisms. This design allows DRTISA to reproduce both regular activity schedules and occasional visits to new locations.
SeqGAN. [41] SeqGAN is a general adversarial sequence-generation model that treats trajectory construction as a sequential decision-making process. Its recurrent generator produces one location at a time as a stochastic policy, while a discriminator evaluates whether complete sequences resemble real observations. Policy-gradient learning propagates the discriminator reward to intermediate generation steps, enabling adversarial optimization over discrete mobility sequences.
MoveSim. [9] MoveSim is a mobility-specific generative adversarial network that conditions trajectory generation on user identity and historical movements. It learns latent representations of users and trajectories to capture semantic similarities among mobility behaviors, allowing generated sequences to reflect individual destination preferences and spatial transition patterns. Domain-specific mobility regularities are incorporated into the adversarial generation process to improve trajectory realism.
DeepMobility. [43] DeepMobility is a deep generative collaboration network that jointly models individual mobility behaviors and population-level flows. It employs a generative adversarial imitation learning framework with two collaborative mechanisms: bottom-up interaction modeling and top-down feedback refinement. The former incorporates population movement information into individual mobility decisions, while the latter uses aggregated flow patterns to guide the learning of individual behaviors. Through this bidirectional collaboration, DeepMobility generates individual trajectories that reproduce collective mobility dynamics.
CoDiffMob. [47] CoDiffMob is a diffusion-based urban mobility generation model that incorporates collaborative noise priors to capture both individual movement characteristics and collective mobility patterns. It first constructs location transition sequences using population-level mobility flows and individual movement preferences. These sequences are then mapped into the noise space and combined with Gaussian noise to guide the diffusion process, enabling the generation of realistic individual trajectories while preserving collective flow patterns.
LLMob. [36] LLMob formulates human mobility generation as an instruction-guided language modeling task. It converts a user's historical trajectory and contextual information, such as time and location semantics, into textual prompts and autoregressively predicts subsequent movements. This formulation exploits the sequential modeling and semantic reasoning capabilities of large language models to generate personalized mobility trajectories.
LLM-COD. LLM-COD formulates destination prediction as a conditional language generation problem. Its prompts encode the departure location, travel time, and regional point-of-interest context, enabling the language model to infer the semantic type of a plausible destination. The predicted destination semantics are subsequently matched to candidate regions, allowing the model to use functional urban knowledge when generating origin–destination movements.
TrajLLM. [12] TrajLLM is a modular large-language-model-enhanced agent framework for daily trajectory simulation. It organizes mobility generation into hierarchical stages that construct user personas, select activities, and determine corresponding destinations. By incorporating demographic and behavioral context into these stages, TrajLLM generates interpretable daily routines that connect individual characteristics with activity and location choices.
AgentMove. [8] AgentMove is a large-language-model-based agentic framework for next-location prediction. It decomposes mobility reasoning into a spatiotemporal memory module for individual patterns, a world-knowledge module for multi-scale urban structure, and a collective-knowledge module for shared population patterns. The outputs of these modules are jointly interpreted by the language model to produce the final destination decision.
E DETAILED EXPERIMENTAL SETTINGS
We implement MOTION in Python and use LangGraph to orchestrate the three agent types. Mobility records are discretized hourly over 500 POI-enriched regions. We split users into training and test sets at a ratio of 8:2, use the days preceding the final day to construct mobility priors, and evaluate 24-step generation from each test user's location at 00:00 on the final day. We use GPT-4o with top_k=10, active_m=10, and at most 5 reflection rounds. The LLM temperature is set to 0.2, and all experiments use a random seed of 42. The same target users and initial locations are supplied to all methods whenever a baseline supports conditional initialization.
For dynamic graph construction, the spatial decay scale is set to 3 km, location edges longer than 10 km are removed, and the top 20% of the remaining location-location edges are retained according to their combined spatial-flow weights. For dynamic community detection, the Leiden resolution is set to 0.2; the initial graph is optimized for 20 iterations, subsequent snapshots are warm-started for 5 iterations, and the temporal smoothing coefficient is set to 0.4.
Table 8: Representative mobility motif examples using POI semantics and discretized travel distances.
| Motif | Representative Examples |
|---|---|
| STAY | Commercial & Residential (no movement); Companies & Enterprises (no movement). |
| MOVE_AB | Commercial & Residential Companies & Enterprises; Science & Education & Culture Tourist Attractions. |
| ROUND_ABA | Commercial & Residential Shopping & Consumer Goods Commercial & Residential. |
| CHAIN_ABC | Commercial & Residential Transportation Facilities Companies & Enterprises. |
| RETURN_ABCB | Hotels & Accommodations Dining & Cuisine Leisure & Entertainment Dining & Cuisine. |
| FULL_ABCBA | Commercial & Residential Transportation Facilities Tourist Attractions Transportation Facilities Commercial & Residential. |
For destination retrieval, the population exponent is set to 1.0, the POI compatibility multiplier to 2.0, the minimum distance used by the gravity score to 0.1 km, and the long-distance exploration probability to 0.05. Location agents prioritize locations with high incoming activity. The co-mobility threshold is set to 0.6. The manager agent compares intermediate graphs with priors extracted only from the training data and restricts each reflection round to affected users and locations within the current time step.
F DETAILS OF EVALUATION METRICS
Let and denote the real and generated trajectory sets, respectively, and let denote geographic distance. Following prior mobility-generation evaluations [9, 26], we organize the metrics into individual trajectory statistics, population and flow distributions, and community and graph-structural consistency. For distributional comparisons, we use the square root of the base-2 Jensen-Shannon Divergence (JSD), defined using the base-2 Kullback-Leibler (KL) divergence as
where .
F.1 Individual Trajectory Statistics
This level evaluates whether each generated trajectory preserves realistic spatial ranges and visitation diversity, using mobility statistics commonly adopted in trajectory generation [9, 28].
Distance. Distance measures the average geographic displacement between consecutive time steps in a trajectory :
We compute JSD between the empirical distributions of in and .
Radius. Radius measures the spatial extent of an individual's movements using the radius of gyration. Let be the coordinate of and be the trajectory center; then
Radius is the JSD between the real and generated distributions of .
Number of Locations (LocNum). LocNum measures the number of distinct locations visited by a user:
We compare the distributions of using JSD to evaluate the diversity of visited locations.
F.2 Population and Flow Distributions
This level aggregates users and movements to evaluate whether generated mobility recovers the spatial organization of regional populations and origin–destination flows [31]. We use Earth Mover's Distance (EMD) [33] because it accounts for the geographic cost of transporting probability mass between spatially different regions.
Population Earth Mover's Distance (Pop-EMD). Pop-EMD evaluates whether users are distributed over geographically similar locations at each time step. For two discrete spatial distributions and , Earth Mover's Distance (EMD) under geographic ground distance is
where denotes the set of transport plans whose marginals are and . Let and denote the real and generated population distributions at time ; Pop-EMD is
Flow Earth Mover's Distance (Flow-EMD). Flow-EMD measures whether generated origin–destination movements reproduce the spatial organization of real population flows. Each mobility event is represented by , including a stay event when , and the distance between two events is
Let and denote the corresponding event distributions; Flow-EMD is
G-Rank. G-Rank evaluates whether generated mobility preserves the popularity distribution of major locations. Let be the 100 most visited locations in the real data, and let and denote their real and generated visit counts. Their normalized distributions are
G-Rank is defined as JSD(p, ) over the shared set .
F.3 Community and Graph-Structural Consistency
This level evaluates whether the generated graph sequence preserves the mesoscopic community organization and higher-order interaction structures emerging across users [1, 11]. It complements trajectory and aggregate-flow metrics with graph properties that characterize community scale and membership, recurring mobility structures, and local interaction intensity [2, 26].
Comm-Size. Comm-Size evaluates whether generated graph evolution reproduces the scale organization and fragmentation patterns of real mobility communities by comparing their community-size distributions. We independently apply the same dynamic community detection procedure to the real and generated graph sequences, obtaining community partitions and over the shared user-location node set at each time step. Given a shared set of normalized community-size bins , their empirical size distributions are
with defined analogously for . Comm-Size is then computed as
Because the metric compares community sizes rather than community IDs, it does not require label alignment between the two partitions.
Comm-Mem. Comm-Mem measures agreement between real and generated community memberships using normalized mutual information (NMI). At each hour, we independently apply Leiden with weighted modularity (resolution 1.0) to the full user-location graphs, using unit-weight user-location edges and a shared undirected location backbone with reciprocal weights summed. We compare labels only on ID-aligned common users and locations occupied in both graphs, with equal node weights. Let and be these restricted labels from real and generated partitions using seeds and , respectively; then
where I and H denote mutual information and entropy. This score uses arithmetic mean normalization, lies in (higher is better) and excludes the shared initial hour t = 0.
Mobility Motif JSD (Motif). Motif evaluates whether generated trajectories preserve recurring higher-order movement structures. It identifies five non-stay mobility structures—direct movement, round trip, chained visit, intermediate return, and full return—and computes JSD between their normalized occurrence distributions.
Weighted-Degree JSD. W-Degree evaluates whether generated graphs preserve node-level interaction intensity and local connectivity. Let denote the weight of edge in graph snapshot ; the weighted degree of node is
Let and denote the empirical weighted-degree distributions of the real and generated graph snapshots, respectively. The metric is
G ADDITIONAL PRIVACY RESULTS
To complement the private car dataset results in the main text, we repeat the uniqueness test on the mobile phone dataset. For each generated 24-hour trajectory, we compute its normalized Levenshtein similarity [15] to every real trajectory in the training split and retain the Top-1, Top-2, and Top-3 nearest matches, following prior privacy evaluations of generated mobility [4, 44]. Fig. 13 reports the cumulative distributions of these similarities. The Top-1 similarities are concentrated in an intermediate range, showing that generated trajectories retain recognizable daily mobility regularities, while the Top-2 and Top-3 curves shift toward lower similarity. Only a small tail approaches exact matching, and similarity consistently decreases as more neighbors are considered. This pattern agrees with the private car dataset and suggests that MOTION does not repeatedly reproduce a small set of training trajectories. Together with the membership inference results in the main text, the analysis provides empirical evidence that MOTION learns reusable mobility patterns while limiting sample-specific memorization.
H REFLECTION ROUND ANALYSIS
We examine how the maximum number of within-step reflection rounds affects generation quality. Zero rounds disables reflection after the initial individual-community coordination, while each additional round allows the manager agent to diagnose the remaining node-population and edge-flow discrepancies, issue targeted signals to the affected agents, and coordinate their revised proposals again. As shown in Fig. 14, the metrics on the private car dataset consistently decrease during the first five rounds. On the mobile phone dataset, Distance and Motif show the same overall trend, while Radius and Pop-EMD remain comparatively stable around the middle settings. Increasing the limit beyond five rounds provides no consistent benefit and causes several metrics to rebound. This deterioration indicates that excessive revisions may over-adjust already coherent graph updates or introduce compensating movements that disturb previously matched patterns. We therefore set the maximum number of reflection rounds to five, which balances structural refinement with stable individual decisions and avoids unnecessary reasoning cost.
I ADDITIONAL GENERALIZATION RESULTS
Fig. 15 reports cross-dataset generalization when user mobility motifs are transferred from a source dataset and interaction priors are extracted from the target dataset. Rows indicate the source of

Mobile Phone Dataset
Figure 13: Cumulative distributions of the Top-1, Top-2, and Top-3 similarities between generated trajectories and their nearest real trajectories in the training split of the mobile phone dataset.

(a) Private Car Dataset
(b) Mobile Phone Dataset
Figure 14: Impact of the maximum number of within-step reflection rounds on the private car and mobile phone datasets. Lower values indicate better performance.
the mobility motifs used to construct daily plans, whereas columns indicate the target dataset from which the interaction priors are extracted and on which generation is evaluated. The diagonal cells correspond to within-dataset generation, and the off-diagonal cells evaluate recombination across datasets. Distance and Radius show larger cross-dataset gaps, particularly when private-car motifs are transferred to mobile-phone mobility, because the two datasets capture different travel modes, activity ranges, and spatial scales. In contrast, Pop-EMD, Flow-EMD, Comm-Size, and Motif remain substantially more stable. For example, when transferring private-car motifs to the mobile phone dataset, Flow-EMD changes only from 0.0919 to 0.0944 and Comm-Size from 0.1170 to 0.1260. These results show that target-specific interaction priors can anchor population-flow organization and community structure even when the transferred individual mobility scale differs from that of the target dataset.



Figure 15: Cross-dataset generalization between the private car dataset (P) and mobile phone dataset (M). Rows indicate the source dataset, while columns indicate the target dataset.
Table 9: Component-level token consumption and latency per reasoning call.
| Component | Private Car Dataset | Mobile Phone Dataset | ||
|---|---|---|---|---|
| Tokens | Latency | Tokens | Latency | |
| user agent | 436.1 | 1.57 s | 372.3 | 2.21 s |
| location agent | 1,345.0 | 2.15 s | 1,462.0 | 1.98 s |
| coordination | 720.5 | 2.07 s | 806.3 | 2.06 s |
| reflection | 866.4 | 3.77 s | 981.0 | 3.11 s |
J COMPONENT-LEVEL COMPLEXITY ANALYSIS
Table 9 reports the average token consumption and latency of each reasoning component per call under the same LLM backbone and experimental configuration. The user agent has the lightest context because it selects among a compact destination set conditioned on one user's mobility plan, requiring 372–436 tokens and 1.57–2.21 seconds per call. The location agent consumes the most tokens because it jointly reasons over regional semantics, expected population and flow states, nearby users, and co-mobility evidence. Coordination uses a moderate context containing only the conflicting individual- and community-view proposals and therefore maintains a latency of approximately two seconds on both datasets. Reflection has the highest latency despite using fewer tokens than location reasoning because it diagnoses several node and edge discrepancies and converts them into structured, agent-specific correction signals. The component costs are similar across the two datasets, indicating that the reasoning burden is determined mainly by agent roles rather than a particular mobility source. These per-call costs do not directly sum to the end-to-end user-day cost: active location selection limits location-agent invocations, and targeted reflection reactivates only agents associated with detected discrepancies. This selective execution keeps the overall complexity comparable to user-centric LLM generators, as reported in the main text.

Radius
Flow-EMD
Comm-Size
Motifs
Figure 16: Additional sensitivity results of top_k and active_m on the private car and mobile phone datasets. Lower values indicate better performance.
K ADDITIONAL HYPERPARAMETER RESULTS
We further evaluate top_k and active_m using Radius, Flow-EMD, Comm-Size, and Motif, complementing the Distance and Pop-EMD results in the main text. The former controls how many destination candidates are provided to each user agent, while the latter limits the number of locations sampled from each structurally relevant local set for location-agent activation. We vary one parameter at a time and keep all other settings fixed. As shown in Fig. 16, most curves follow a U-shaped trend and reach their minimum near 10 on both datasets. Small values provide insufficient coverage of plausible destinations or receiver-side community evidence, which is particularly visible for Radius and Flow-EMD. Conversely, increasing either parameter to 15 or 20 introduces weakly relevant candidates and locations, degrading Comm-Size and Motif consistency and increasing reasoning cost. The similar behavior across individual, aggregate, and structural metrics indicates that focused evidence is more useful than an unrestricted reasoning context. We therefore use top_k=10 and active_m=10 in all main experiments.
L AGENT PROMPT TEMPLATES
Figs. 17–20 present the complete prompt templates used by the three agent roles. All templates follow a shared structure consisting of a role definition, time-step context, structured mobility evidence, decision constraints, and a JSON-only output schema. Bracketed fields are instantiated at runtime using the current mobility state and community-conditioned interaction priors, ensuring that agents receive only evidence relevant to the current graph update.
The user-agent prompt specifies the user's current location, planned POI semantics and distance range, community profile, and retrieved destination candidates with attraction and flow evidence. The location-agent prompt provides the target location's semantic function, population status, historical and simulated incoming flows, connected source locations, nearby users, and active co-mobility groups. These two prompts generate complementary destination-side and receiver-side proposals rather than asking a single agent to reason over the entire evolving graph.
The manager-agent coordination prompt presents only records for which the two views require resolution, together with expected movement volume and deviations from historical population-flow patterns. The reflection prompt summarizes node-population and edge-flow discrepancies, affected users' daily plans, and temporal movement conditions, and requests bounded correction signals for the implicated user and location agents. Reflection signals are appended to subsequent agent prompts as explicit corrections rather than unconstrained additional context. Restricting every response to a predefined JSON schema enables deterministic parsing, validates identifiers against the supplied candidate sets, and prevents free-form outputs from directly modifying the graph state.
User Agent Reasoning Prompt Example
Instruction: You are simulating a mobility agent (<USER_LABEL>) in <CITY> at hour <CURRENT_HOUR>. Your agent background is that you are typically active in <COMMUNITY_PROFILE> areas. Your current action is departing from <FROM_POI>, heading toward a <TO_POI> area at approximately <DIST_LABEL>. You are given a list of candidate destinations <CANDIDATE_LIST>, sorted by gravity score, where flow_out represents each candidate's total historical outbound traffic. Choose the best destination by holistically balancing three factors: a POI match combined with decent gravity and flow is better than the highest gravity alone; a zero-flow_out location should only be chosen as a last resort when no active alternative exists; and you should not fixate on a single dimension, but consider each candidate's combined profile. Reply with a JSON object only, specifying the next location id chosen from the candidate list above and a reason of no more than 25 words.
Instructions (continued): <REFLECTION_SIGNAL> is appended verbatim after the base prompt above, with no additional framing.
Figure 17: Prompt template for individual-view destination reasoning by a user agent.
Location Agent Reasoning Prompt Example
Instruction: You are location <LOC_ID> (<POI_TYPES>) in <CITY> at hour <CURRENT_HOUR>. Your role is to decide which nearby <USER_LABEL> are likely to move to your location this hour. Your location profile is as follows: POI types <POI_TYPES> (ranked by POI density), current population status <POP_STATUS>, a simulated inbound flow of <SIM_FLOW_IN> <USER_LABEL> currently waiting at source locations, and a historical inbound flow of approximately <HIST_FLOW_IN> <USER_LABEL> per hour at this time of day, which serves as a rough ceiling on how many you can realistically attract. Your main historical source locations, ranked by importance, are <SOURCE_LOCATIONS>. The <USER_LABEL> currently at those source locations in the previous timestep are <NEARBY_USERS>, and the co-mobility groups active in this neighborhood — pairs of <USER_LABEL> who tend to travel together—are <CO MOBILITY_GROUPS>. When deciding whom to attract, respect the population signal above for whether to attract at all this hour; among those you do consider, prioritize <USER_LABEL> whose planned destination POI matches your own POI types, then <USER_LABEL> coming from higher-ranked source locations with more people currently present, and try to keep co-mobile pairs together when both are moving. <USER_LABEL> currently planning to stay are equally valid attraction targets, not just those already planning to move. Please analyze the situation and return your decision as a JSON object, listing only user ids drawn from the nearby <USER_LABEL> list above together with a brief reasoning of no more than 25 words.
Instructions (continued): This round, a reflection correction from the previous round is provided as <REFLECTION_SIGNAL>. Note that this is a correction to what you already decided last round, not merely additional context — your selection must actually change the outcome rather than repeat the same choice.
Figure 18: Prompt template for receiver-side community reasoning by a location agent.
Manager Agent Coordination Prompt Example
Instruction: You are coordinating mobility decisions for <USER_LABEL> in <CITY> at hour <CURRENT_HOUR>. Two independently-reflected mobility views — a user-intent view and a location-attraction view — each propose a decision for every record in <CONFLICT_RECORDS>; some records agree between the two views and some conflict. For each record, decide the single final outcome by weighing both views' stated reasons against two real-data signals: this hour's expected total move count, given as <MOVE_COUNT_RANGE>, and each candidate destination's own deviation from the real historical population and flow, shown inline as <VS_REAL_HINTS> next to each candidate. Preserve the user agent's own MOVE proposals — when a record's user view proposes MOVE, keep it as a MOVE toward the user's proposed destination, or redirect it to the location view's proposed destination only if that alternative is clearly better supported by the real-data signal. If the total MOVE resolutions would clearly overshoot or undershoot the expected range, favor whichever candidate per record brings the total closer to that range, subject to the rule above; otherwise, prefer the candidate closer to the real historical headcount, avoiding over-populated destinations when an alternative exists. Reply with a JSON object only, listing for every record the user id, the resolved destination location id (must be one of that record's listed candidates), the resulting action (MOVE when the resolved destination differs from the origin, otherwise STAY), and a reason of no more than 20 words.
Instructions (continued): This round, a reflection correction from the previous round is provided as <REFLECTION_SIGNAL>. Note that this is a correction to what you already decided last round, not merely additional context — your selection must actually change the outcome rather than repeat the same choice.
Figure 19: Prompt template for individual-community coordination by the manager agent.
Manage Agent Reflection Prompt Example
Instruction: You are a mobility simulation quality analyst for <CITY>, reflecting hour by hour. Each round you are shown the simulation's remaining deviations from the real historical pattern — node population differences <NODE_DIFFS>, edge flow differences <EDGE_DIFFS>, and the daily plans of affected users <USER_DAILY_PLANS> — for that round's hour, together with the real move-volume reference by hour <PEAK_OFFPEAK_HOURS> and this hour's own expected move-volume status <HOUR_MOVE_STATUS>. Your task is to generate targeted reflection signals that correct the worst discrepancies for this round, following these interpretation rules.
-
An EDGE_MISSING diff (generated flow approximately zero, real flow positive) means the real data has a flow from source A to destination B that the simulation fails to generate.
-
An EDGE_SPURIOUS diff (generated flow positive, real flow approximately zero) means the simulation over-generates a flow that does not exist in real data.
-
EDGE_FLOW_OVER and EDGE_FLOW_UNDER diffs, where a flow between A and B exists in both real and simulated data but their shares diverge.
-
A NODE_POP_UNDER diff (a location with fewer simulated users than real data).
-
A NODE_POP_OVER diff (more simulated users than real data).
Generate up to <MAX_USER_SIGNALS> user signals and up to <MAX_LOCATION_SIGNALS> location signals for this round, referencing only user ids and location ids that appear in this round's diffs, and reply with a JSON object only, containing a user_signals list and a location_signals list in the format <SIGNAL_JSON_TEMPLATE>..
Figure 20: Prompt template for community-consistency reflection by the manager agent.