The importance of mobile phone GPS trajectory data is widely recognized across many fields, yet the use of real data is often hindered by privacy concerns, limited accessibility, and high acquisition costs. As a result, generating pseudo-GPS trajectory data has become an active area of research. Recent diffusion-based approaches have achieved strong fidelity but remain limited in spatial scale (small urban areas), transportation-mode diversity, and efficiency (requiring numerous sampling steps). To address these challenges, we introduce TrajFlow, which to the best of our knowledge is the first flow-matching-based generative model for GPS trajectory generation. TrajFlow leverages the flow-matching paradigm to improve robustness and efficiency across multiple geospatial scales, and incorporates a trajectory harmonization and reconstruction strategy to jointly address scalability, diversity, and efficiency. Using a nationwide mobile phone GPS dataset with millions of trajectories across Japan, we show that TrajFlow or its variants consistently outperform diffusion-based and deep generative baselines at urban, metropolitan, and nationwide levels. As the first nationwide, multi-scale GPS trajectory generation model, TrajFlow demonstrates strong potential to support inter-region urban planning, traffic management, and disaster response, thereby advancing the resilience and intelligence of future mobility systems.
Figures & tables
Figure 1: In pseudo-human mobility generation, three key challenges remain to be addressed: multi-scale capability, transportation-mode diversity, and training & inference efficiency.
Figure 2: (a) shows the accuracy degradation of DiffTraj at increasing spatial scales. (b) shows the SNR collapses when applying a fixed noising parameter across scales.
Figure 3: The overview of the proposed TrajFlow.
Method
Density JS ↓
DTW med↓
Fr med↓
DTW IQR↓
DTW P10↓
DTW P90↓
Fr IQR↓
Fr P10↓
Fr P90↓
Central Tokyo
TrajFlow (ours)
0.0674
20.350
0.304
13.392
10.574
39.119
0.174
0.200
0.674
TrajFlow-w/o-OD
0.3560
916.436
13.862
708.183
432.567
1,740.890
7.313
7.064
20.858
TrajFlow-w/o-RDP
0.0642
22.088
0.340
16.491
11.149
47.959
0.238
0.209
0.873
TrajFlow-w/o RDP & OD
0.0323
8.179
0.184
4.586
4.994
14.159
0.118
0.110
0.363
DiffTraj
0.1340
44.321
0.651
40.713
19.399
109.349
0.544
0.341
1.774
Table 1: Evaluation grouped by region (unit = km). Best metric in bold .
Figure 4: Visualization of trajectory samples. Ground-truth and generated nationwide trajectories are shown with zoomed views highlighting three representative regions: (A) Tokyo Metropolis, (B) Tohoku Area, and (C) Kansai Area, across all generative models.
Figure 5: Per-mode average trip distance in Tokyo: ground truth vs. generated.
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Param 5
Param 10
Param 20
Param 30
DTW
Fréchet
DTW
Fréchet
DTW
Fréchet
DTW
Fréchet
direct_k
3.78
0.0908
1.54
0.0430
0.79
0.0205
0.66
0.0155
dct
3.23
0.0814
1.24
0.0326
0.69
0.0150
0.61
0.0137
rdp_k
2.77
0.0580
0.95
0.0219
0.61
0.0143
0.59
0.0150
anchor
16.42
0.3333
1.75
0.0405
0.76
0.0191
0.61
0.0138
spline_lsq
3.11
0.0665
1.22
0.0271
0.68
0.0150
0.61
0.0136
Appendix
Table 2: Reconstruction Performance (Avg DTW/Fréchet, unit=km). Best (lowest) values in bold .
Figure 6: Parameter Number = 5
Figure 7: Parameter Number = 10
Figure 8: Parameter Number = 20
Figure 9: Parameter Number = 30
Method
Density JS ↓
DTW med↓
Fr med↓
DTW IQR↓
DTW P10↓
DTW P90↓
Fr IQR↓
Fr P10↓
Fr P90↓
Central Tokyo
TrajFlow (ours)
0.0674
20.350
0.304
13.392
10.574
39.119
0.174
0.200
0.674
TrajFlow-w/o-FM (steps=10)
0.3213
362.611
5.844
794.886
86.305
2096.804
14.045
1.149
37.590
TrajFlow-w/o-FM (steps=50)
0.2923
263.889
4.390
694.411
64.512
1827.793
12.156
0.855
32.903
TrajFlow-w/o-FM (steps=100)
0.2269
142.836
2.363
303.280
38.252
749.346
5.244
0.519
12.811
TrajFlow-w/o-FM (steps=200)
0.1208
36.434
0.583
49.489
15.035
130.881
0.975
0.247
2.437
Appendix
Table 3: TrajFlow-w/o-FM performance with different training/sampling steps (unit: km). Best metric in bold .
Figure 10: Bar plot for time cost comparison in inference stage.
Region
Method
Steps
Sec/Sample
Sampling Sec
Total Sec
Central Tokyo
TrajFlow
10
0.0097
0.9696
4.8912
Central Tokyo
TrajFlow-w/o-FM (steps=10)
10
0.0100
1.0039
4.9646
Central Tokyo
TrajFlow-w/o-FM (steps=50)
50
0.0382
3.8235
7.7105
Central Tokyo
TrajFlow-w/o-FM (steps=100)
100
0.0761
7.6105
11.5326
Central Tokyo
TrajFlow-w/o-FM (steps=200)
200
0.1585
15.8546
19.8442
Central Tokyo
TrajFlow-w/o-FM (steps=300)
300
0.2237
22.3682
26.3010
Appendix
Table 4: Comparison table for time cost in inference stage.
Figure 11: Transportation-mode diversity visualization: GT vs. Gen in Tokyo.
Figure 12: The capability to generate GPS trajectories under given transportation mode conditions. Ground-truth nation-wide trajectories shown with zoomed views highlighting three representative regions: (A) Tokyo Metropolis, (B) Tokaido Area, and (C) Kansai Area, across various transportation modes: Train, Car, Walk, Bike (a) shows the ground-truth trajectories. (b) shows the generated.
uid
segment_id
trans_mode1
trans_mode2
time
lat
lon
…
1
STAY
STAY
2023/2/6 0:00
35.9497
139.5576
…
1
STAY
STAY
2023/2/6 0:15
35.9497
139.5576
…
…
…
…
…
…
…
…
2
MOVE
TRAIN
2023/2/6 0:36
36.2269
114.1721
…
…
…
…
…
…
…
…
3
MOVE
WALK
2023/2/6 0:59
36.7236
114.4598
Appendix
Table 5: Example rows of the dataset we used. (Note: this example data is only for showing data format without real lat/lon values.)
Method
Density JS ↓
DTW med↓
Fr med↓
DTW IQR↓
DTW P10↓
DTW P90↓
Fr IQR↓
Fr P10↓
Fr P90↓
Chengdu
TrajFlow (ours)
0.211
35.911
0.547
29.418
15.839
72.048
0.392
0.279
0.959
TrajFlow-w/o-OD
0.0809
3.696
0.123
2.847
2.180
8.904
0.117
0.0614
0.362
TrajFlow-w/o RDP
0.206
34.687
0.540
30.020
14.650
69.999
0.383
0.266
0.957
TrajFlow-w/o RDP & OD
0.0140
2.158
0.0525
0.896
1.519
3.278
0.0243
0.0354
0.0880
TrajFlow-w/o Flow
0.208
36.457
0.561
30.017
15.948
73.523
0.397
0.278
0.975
Appendix
Table 6: Evaluation grouped by region (unit = km). Best metric in bold .
Generating high-fidelity synthetic GPS trajectories is increasingly important for applications in transportation, urban planning, and what-if scenario simulation, especially as privacy concerns limit access to real-world mobility data. Existing trajectory generation models face a trade-off between efficiency and faithfulness to road network topology: continuous-space methods enable fast generation but ignore the road network, while topology-aware approaches rely on search-based autoregressive decoding that limits generation speed. We propose TrajDLM, a topology-aware trajectory generation framework based on block diffusion language models that bridges this gap. TrajDLM models trajectories as sequences of discrete road segments, combining a block diffusion backbone for efficient denoising, topology-aware embeddings from a road network encoder, and topology-constrained sampling to ensure coherent and realistic trajectories. Across three city-scale datasets, TrajDLM achieves strong performance on fine-grained local similarity metrics while being up to 2.8× faster than prior work, and demonstrates strong zero-shot transfer across domains, including unseen transportation modes. These results highlight the effectiveness of block-wise discrete diffusion as a scalable approach to accurate and efficient trajectory generation. Our code is available at https://github.com/cruiseresearchgroup/TrajDLM/
Wilson Wongso, Lihuan Li, Arian Prabowo +4
University of New South Wales · Hong Kong University of Science and Technology (Guangzhou)
Urban trajectories play a crucial role in modeling urban dynamics and supporting various smart city applications. However, privacy concerns restrict access to large-scale and high-quality trajectory datasets. Trajectory generation provides a promising alternative by synthesizing realistic data to mitigate privacy risks. However, existing methods fail to explicitly capture travel patterns and can only generate fixed-length trajectories under a single condition. To address these limitations, we propose HTP, which Hierarchically generates Travel patterns first and then generates GPS Points by using large language models (LLMs), rather than directly generating GPS points. We first design a trajectory-specific residual quantization variational autoencoder (RQ-VAE) that quantizes micro-level GPS trajectories into compact, macro-level travel pattern tokens in a coarse-to-fine manner. These tokens capture rich segment spatial irregularities, such as point density variations caused by traffic conditions. Then, we extend the LLM vocabulary with travel pattern tokens to align trajectory representations with the LLM input, and apply supervised fine-tuning (SFT) to align the LLM with the trajectory generation task, enabling generation of travel pattern sequences under various conditions. Extensive experiments on two real-world datasets show that HTP outperforms the strongest baseline by an average of 29.78% in terms of generation quality. Our code is available at https://github.com/slzhou-xy/HTP.
Silin Zhou, Chenhao Wang, Yuntao Wen +3
University of Electronic Science and Technology of China Chengdu, China · King Abdullah University of Science and Technology Thuwal, Saudi Arabia
Human mobility generation aims to synthesize realistic point-of-interest (POI) visitation trajectories and has become an important tool for travel behavior modeling, transportation management, and urban planning. Existing diffusion-based methods achieve high fidelity but require per-city generation, given the inherent heterogeneity of geospatial locations and POI categories, while large language model-based methods generalize across cities but remain too costly at scale, especially for long-horizon trajectory generation. To address this, we propose SeMoFlow, a Semantic human Mobility generation framework based on latent Flow matching. We first encode heterogeneous POIs from different cities into a shared cross-city representation space via hierarchical Semantic IDs, where shared prefixes capture transferable semantics, and successive codes progressively refine the representation toward individual POIs. Building on the semantic IDs, SeMoFlow follows a plan-to-synthesis hierarchical generation paradigm, in which an autoregressive planner generates coarse-grained semantic and recurrence patterns, and a flow matching realizer synthesizes fine-grained suffix latents. The generated latents are subsequently decoded and grounded to concrete POIs. Extensive experiments on large-scale multi-city datasets show that SeMoFlow achieves higher trajectory fidelity than existing baselines, preserves city-specific mobility motifs, and supports both joint multi-city generation and effective cross-city transfer.
Zhoufu Wang, Baoshen Guo, Zhiqing Hong +6
Singapore-MIT Alliance for Research and Technology Centre, MIT · Nanyang Technological University · Hong Kong University of Science & Technology (Guangzhou) +3