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 .
Singapore-MIT Alliance for Research and Technology Centre, MIT · Nanyang Technological University · Hong Kong University of Science and Technology (Guangzhou) +3