SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Trajectory properties: Finally, we investigate the coherence at the trajectory property level. As depicted in Figure 4, we examine the similarities between the synthetic and original trajectories, specifically considering travel distance, travel time, speed, and relative distance. From our visualization results, it is evident that the synthetic dataset manifests a substantial concordance with the real-world data. To further quantify this consistency, we applied the Kolmogorov-Smirnov (K-S) test [21], a non-parametric method of comparing two one-dimensional distributions. The K-S statistics, a similarity measure, are reported as 0.92, 0.93, 0.94, and 0.90 for travel distance, travel time, speed, and relative distance, respectively. These results suggest that the distributions of these key attributes in the synthetic data closely match those in the original data, with the similarity exceeding  $90\%$  in all cases. Such high K-S statistics highlight the robustness of the synthetic data generation process, with the synthetic dataset showing a strong adherence to the trajectory-level properties observed in the original data. This conclusion underscores the utility of the synthetic dataset, its suitability for a range of research applications, and its potential to facilitate future studies in urban mobility.
5 Use Cases of Synthetic Dataset
To further demonstrate the practical utility and applicability of our synthetic dataset, we explore its use in two critical urban mobility tasks: traffic demand prediction and travel time estimation. These tasks hold significant importance in the field of urban mobility, with the former offering insights into future traffic conditions and the latter providing crucial information for trip planning. Through these applications, we aim to illustrate the versatility of our synthetic dataset and its capacity to synthesize reliable results in comparison with real-world data. We trust that the following analysis and case studies will validate the robustness of the synthetic dataset and provide further guidance for its use. All simulations are implemented in PyTorch and performed on computing servers with one NVIDIA RTX 2080Ti GPU.
5.1 Traffic Demand Prediction
Problem definition: Traffic Demand Prediction (TDP) is a cornerstone of urban mobility analysis, aiming to predict origin-destination demand in various areas within the city [42]. Specifically, the purpose of TDP is to predict the vehicle inflow or outflow  $a_{d}^{t}$  for a given area  $d$  at time  $t$ .
Setup: To predict traffic demand, we first preprocess the trajectory dataset (both original and synthetic) by grouping it into different time intervals and areas and then aggregating the traffic
Table 3: Data utility comparison by traffic demand prediction. Results are expressed as (original / synthetic / difference ratio).
Methods	AGCRN	GWNet	DCRNN	MTGNN
RMSE	6.91 / 6.50 / 5.93%	6.90 / 6.53 / 5.36%	7.29 / 6.48 / 11.11%	6.81 / 6.41 / 5.87%
MAE	4.64 / 4.43 / 4.53%	4.65 / 4.47 / 3.87%	4.88 / 4.45 / 8.81%	4.58 / 4.39 / 4.15%
MAPE	30.47 / 30.97 / 1.64%	30.57 / 30.74 / 0.56%	32.40 / 30.40 / 6.17%	29.61 / 29.88 / 0.91%
Table 4: Data utility comparison by travel time estimation. Results are expressed as (original / synthetic / difference ratio)
Methods	TEMP	XGBoost	WDR	DeepTTE
RMSE	290.32 / 282.33 / 2.75%	271.56 / 256.19 / 5.66%	258.64 / 247.29 / 4.39%	216.93 / 193.34 / 10.87%
MAE	182.74 / 174.42 / 4.55%	175.20 / 167.75 / 4.25%	149.81 / 140.05 / 6.51%	132.95 / 121.31 / 8.76%
MAPE	18.62 / 17.81 / 4.30%	17.97 / 16.94 / 5.73%	14.06 / 13.17 / 6.33%	13.07 / 12.29 / 5.97%
demand for each area and interval. In this case study, a time interval of 15 minutes is utilized, while the road network is partitioned by default into 144 areas, consisting of a  $12 \times 12$  grids. To demonstrate the applicability of SYN-CHENGDU across a range of data-driven TDP tasks, we utilize four representative DNN-based models, namely, AGCRN [2], GWNet [35], DCRNN [17], and MTGNN [34]. These models cover different variants of advance neural network, which have been widely used in the literature [16]. The performance metrics used for their comparison are Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE). For cross-validation, we partition the dataset (original / synthetic) into training, validation and test sets in a 7:1:2 ratio. The input and output steps of the model are both set to 12, i.e., we use traffic demand from the past 3 hours to forecast traffic demand for the next 3 hours. Further details and implementation specifics of these methods are provided in Appendix B.
Result analysis: Table 3 presents a comparison of the data utility in traffic demand prediction for both original and synthetic datasets using various neural network models. Each metric is reported for both original  $\mathcal{M}_o$  and synthetic datasets  $\mathcal{M}_s$ , and the difference ratio  $|\mathcal{M}_s - \mathcal{M}_o|$  (lower is better) is computed to assess the consistency performance. Overall, these models demonstrate similar performances when trained on both datasets, indicating the high fidelity of the synthetic dataset. Specifically, the difference ratio in performance metrics typically remains within a modest range (the maximum difference ratio is  $11.11\%$ ), confirming that our synthetic dataset can effectively mirror the real-world scenario in traffic demand prediction tasks. It is worth noting that the DCRNN model exhibits a slightly higher difference ratio, particularly in RMSE and MAE. The minor divergence under this model serves as a reminder of the challenges faced when synthesizing data with intricate spatial-temporal dynamics. In conclusion, these results corroborate the suitability and practical utility of our synthetic dataset for traffic demand prediction, thereby reinforcing its potential for advancing research in urban mobility analysis.
5.2 Travel Time Estimation
Problem definition: Travel Time Estimation (TTE) is a pivotal aspect of urban mobility analysis. Its primary objective is to estimate the travel time between a pair of origins and destinations based on a comprehensive profile of historical trajectories. Given a travel time query  $[o, d, t]$ , the goal of TTE is to predict the travel time from origin  $o$  to destination  $d$  utilizing historical trip and external attributes such as departure time, average speed, and so on.
Setup: Before comparing the utility of two datasets for travel time estimation tasks, we first project the trajectory onto the road network using map-matching methods [36], which is well-established in relevant studies [33, 38]. Thus, the trip trajectory can be represented as a sequence of road segment information, which includes the number of paths covered by the trajectory, and the average speed on each path, among other details. We adopt four representative travel time estimators covering machine learning and state-of-the-art deep learning methods, including TEMP [30], XGBoost [7], WDR [33], and DeepTTE [11]. For experimental integrity, we divide both the original and synthetic datasets into training, validation and test sets in a 7:1:2 ratio for cross-validation. Detailed descriptions and implementations of these methods can be found in Appendix B.
Result analysis: Table 4 illustrates the performance of the original and synthetic datasets in the context of travel time estimation. Across all metrics, the synthetic dataset exhibits similar performance to the original dataset, highlighting its viability for TTE task. The difference ratios are generally low, with the highest observed difference being  $10.87\%$  in the RMSE metric for the DeepTTE model. This suggests that the synthetic dataset maintains a high degree of similarity to the original dataset, even when complex models is applied. Notably, DeepTTE shows the highest difference ratio among all models, especially in RMSE and MAE. This may indicate that more sophisticated deep learning methods, tend to be more sensitive to complex relationships and potential noise in the data. As a result, synthetic data, despite its high fidelity, may not fully recapitulate some subtle features present in the original dataset. This difference may result in the DeepTTE model appearing overfitted on the dataset and thus showing a large variation. Nevertheless, the performance on the synthetic dataset remains robust and competitive. In general, these results demonstrate the utility and validity of our synthetic datasets in the field of travel time estimation. They support the premise that such synthetic datasets can actively contribute to the progress of urban traffic analysis research.
While our work represents a significant stride in synthesizing GPS trajectory data for urban traffic mobility analysis, it is not without limitations. Firstly, the generation process necessitates raw data as the foundation for synthesis, meaning it cannot be generated from scratch. Consequently, the quality and characteristics of the raw data can influence the synthesized data. Secondly, the generation process is computationally demanding, requiring substantial computational resources. However, it is worth noting that the computational cost is still less than the expenses associated with actual data collection, rendering it a practical option for many researchers. In future work, we plan to further refine our trajectory synthesizer to mitigate these limitations. We aim to explore methods for reducing the computational cost of data generation and investigate ways to enhance the quality and utility of synthetic data. We are confident that our work lays a solid groundwork for future research in this area and holds the potential to significantly advance the field of urban mobility analysis.
This paper introduces a high-fidelity synthetic trajectory dataset for urban mobility analysis, capable of generating data with spatial-temporal properties highly consistent with real-world datasets. It addresses the prevalent limitations related to data availability, privacy issues, and data quality in existing GPS trajectory datasets. We provide a detailed and comprehensive description of this dataset and rigorously analyze it in comparison to its real-world counterpart. The validation results attest to the high-fidelity of the synthetic dataset and its substantial potential for urban traffic analysis. Furthermore, use cases indicate that synthetic trajectory datasets hold great promise for specific applications in urban mobility analysis, such as traffic demand prediction and travel time estimation. By providing a reliable source of synthetic trajectory data, we hope to facilitate further research and innovation in these areas. In conclusion, the synthetic trajectory dataset presented in this paper constitutes a significant contribution to the field of urban mobility analysis. We encourage researchers and practitioners to utilize it in their work and eagerly anticipate the advancements it will catalyze.
This research was partially supported by Research Impact Fund (No. R1015-23), APRC - CityU New Research Initiatives (No.9610565, Start-up Grant for New Faculty of City University of Hong Kong), CityU - HKIDS Early Career Research Grant (No.9360163), Hong Kong ITC Innovation and Technology Fund Midstream Research Programme for Universities Project (No.ITS/034/22MS), Hong Kong Environmental and Conservation Fund (No.88/2022), SIRG - CityU Strategic Interdisciplinary Research Grant (No.7020046, No.7020074), Tencent (CCF-Tencent Open Fund, Tencent Rhino-Bird Focused Research Fund), Huawei (Huawei Innovation Research Program), Ant Group (CCF-Ant Research Fund, Ant Group Research Fund) and Kuaishou.
[37] D. Yang, B. Qu, J. Yang, and P. Cudre-Mauroux. Revisiting user mobility and social relationships in lbsns: a hypergraph embedding approach. In The world wide web conference, pages 2147-2157, 2019.
[38] Y. Ye, Y. Zhu, C. Markos, and J. J. Q. Yu. Cateta: A categorical approximate approach for estimating time of arrival. IEEE Transactions on Intelligent Transportation Systems, 23(12):24389-24400, 2022.
[39] J. Yuan, Y. Zheng, C. Zhang, W. Xie, X. Xie, G. Sun, and Y. Huang. T-drive: Driving directions based on taxi trajectories. In Proceedings of the 18th SIGSPATIAL International Conference on Advances in Geographic Information Systems, GIS '10, page 99–108, New York, NY, USA, 2010. Association for Computing Machinery.
[40] J. Zhang, Q. Huang, Y. Huang, Q. Ding, and P.-W. Tsai. DP-TrajGAN: A privacy-aware trajectory generation model with differential privacy. Future Generation Computer Systems, 2022.
[41] J. Zhang, Y. Zheng, and D. Qi. Deep spatio-temporal residual networks for citywide crowd flows prediction. In Proceedings of the AAAI conference on artificial intelligence, volume 31, 2017.
[42] Z. Zhang, X. Zhao, H. Miao, C. Zhang, H. Zhao, and J. Zhang. Autostl: Automated spatio-temporal multi-task learning. arXiv preprint arXiv:2304.09174, 2023.
[43] X. Zhao, W. Fan, H. Liu, and J. Tang. Multi-type urban crime prediction. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 4388-4396, 2022.
[44] Y. Zhao, S. Shang, Y. Wang, B. Zheng, Q. V. H. Nguyen, and K. Zheng. Rest: A reference-based framework for spatio-temporal trajectory compression. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining, pages 2797-2806, 2018.
[45] Y. Zheng. Trajectory data mining: an overview. ACM Transactions on Intelligent Systems and Technology (TIST), 6(3):1-41, 2015.
[46] Y. Zheng, L. Capra, O. Wolfson, and H. Yang. Urban computing: concepts, methodologies, and applications. ACM Transactions on Intelligent Systems and Technology (TIST), 5(3):1-55, 2014.
[47] Y. Zheng, H. Fu, X. Xie, W.-Y. Ma, and Q. Li. Geolife GPS trajectory dataset - User Guide, geolifegps trajectories 1.1 edition, July 2011.
[48] Y. Zheng, L. Zhang, X. Xie, and W.-Y. Ma. Mining interesting locations and travel sequences fromgps trajectories. In Proceedings of the 18th international conference on World wide web, pages 791-800, 2009.
[49] Y. Zhu, Y. Liu, J. J. Q. Yu, and X. Yuan. Semi-supervised federated learning for travel mode identification fromgps trajectories.IEEE Transactions on Intelligent Transportation Systems, 23(3):2380-2391, 2021.
[50] Y. Zhu, Y. Ye, Y. Liu, and J. J. Q. Yu. Cross-area travel time uncertainty estimation from trajectory data: a federated learning approach. IEEE Transactions on Intelligent Transportation Systems, 23(12):24966-24978, 2022.
A Synthetic Dataset Analysis for Syn-Xi'an
In this section, we will perform a detailed analysis of the SYN-XI'AN dataset. By analyzing the trajectory datasets synthesized from totally different cities, we can further verify the capability of the trajectory synthesizer and the feasibility of the trajectory synthesis solution.
A.1 Dataset description
As presented in Table 5, the SYN-XI'AN dataset possessed the same data format as the SYN-CHENGDU dataset. Specifically, the dataset also consists of one million trajectory records, each of which is represented in two parts: attribute information and trip trajectory. For these attribute information, such as departure time  $t_d$ , trip distance (meters), trip time  $t_a$  (seconds), and sampling points  $n$ , the representation and calculation are the same as for the SYN-CHENGDU. This consistent representation of data can save researchers substantial time, and can also support cross-city transfer learning studies.
Table 5: Dataset description of SYN-XI'AN
Type	Description
Format	pickle / geoparquet
Size	4.66 GB
Value type	float64
Time frame	5 min
Sample interval	3 s
Spatial coverage	lat: 34.20° ~ 34.28°
lng: 108.90° ~ 108.99°
A.2 Trajectory geo-distribution insight
Figure 5 shows a trajectory visualization of the synthetic dataset along with a comparison of the original counterpart. Among them, the comparison between the original trajectory (Figure 5(a)) and the generated trajectory (Figure 5(b)) clearly shows that the synthetic dataset can well mirror the trajectory distribution of the original data. Further area zooming results show that there is no remarkable variation between the synthetic trajectory and the urban road network. Finally, the figure 5(c) exhibits the diversity of synthetic trajectories, where trajectories with the same start and end areas cover different paths.
(b) Synthetic trajectories with area zoom.
Figure 5: Comparative visualizations of original and synthetic trajectories. (a) and (b) server as a reference for the quality and accuracy of the synthetic trajectories. (c) depicts the diversity of synthetic trajectories based on the same start and end areas.
A.3 Spatial-temporal distribution
We further analyze the spatial and temporal distributions incorporated in the SYN-XI'AN dataset. As shown in the heatmap of the trajectory distribution plotted by 6(a), the synthetic trajectory dataset maintains the original distribution properties well in terms of spatial distribution. For the temporal distribution of this synthetic dataset, it is clear observe that the variation in speed and trip volume
is consistent with the real world (see Figure 6(b) and Figure 6(c)). These changes in urban traffic activity levels are not only reflected in Xi'an the city, but are also similar to the results presented in the Chengdu dataset, providing confidence in the cross-city urban mobility analysis.
(b) Average speed
Figure 6: Spatial-temporal distribution of the synthetic dataset (SYN-XI'AN). (a) Differences in heatmap of raw-synthetic (calculated by absolute) trajectories distribution. (b) and (c) The average speed and the number of trips throughout the day.
(c) Trip volume
A.4 Trajectory properties
For the analysis at the trajectory properties level, we follow the same way as introduced in Section 4.2. The results are shown in Figure 7, where the K-S statistical similarities for the four aspects of travel distance, travel time, speed and relative distance are 0.99, 0.94, 0.94 and 0.98, respectively. In addition, the visualization results can adequately demonstrate the ability of the synthetic dataset to maintain the statistical characteristics of realistic trajectories with high fidelity. This excellent result is attributed to two aspects, the superior spatial-temporal generation performance of the proposed trajectory synthesizer. Second, the high quality of the original data further enhances the robustness of the synthesized data.
Figure 7: Comparative analysis of trajectory properties in original and SYN-XI'AN datasets.
In summary, we can conclude the following from the above analysis:
- The analysis results on the synthetic dataset of Xi'an city fully validate the feasibility of the proposed trajectory synthesis approach. It breaks a new direction for future urban mobility analytics, solving the problem of restricted use of trajectory data.
- Analytical results from two synthetic datasets demonstrate the powerful ability to employ a diffusion model as a trajectory synthesizer. This provides a novel solution for trajectory synthesis with generative models.
- Since both datasets use the same format and data style, this offers the required dataset for cross-city urban mobility analysis.
B Use Cases of Synthetic Dataset for Syn-Xi'an
In this section, we also use two case studies to test the utility of SYN-XI'AN. All the code was implemented by pytorch and run on a server with an Nvidia 2080 Ti GPU and Intel Silver CPU. All codes for these models follow the public benchmark $^{10}$  shown in the literature [16], and the results were averaged over 3 times. For performance evaluation of these tasks and models, we used the following metrics:
$$
\mathrm {R M S E} = \sqrt {\frac {1}{n} \sum_ {i} ^ {n} \left(y _ {i} - \hat {y} _ {i}\right) ^ {2}}, \tag {1}
$$
$$
\mathrm {M A E} = \frac {1}{n} \sum_ {i} ^ {n} \left| y _ {i} - \hat {y} _ {i} \right|, \tag {2}
$$
$$
\mathrm {M A P E} = \frac {1}{n} \sum_ {i} ^ {n} \left| \frac {y _ {i} - \hat {y} _ {i}}{y _ {i}} \right|, \tag {3}
$$
where  $y_{i}$  and  $\hat{y}_i$  are the ground truth and predicted traffic value, respectively.
B.1 Traffic Demand Prediction
In the experimental setup, we used the following advanced spatial-temporal neural network models:
- AGCRN: This is an adaptive convolutional recurrent neural network which contains a Node Adaptive Parameter Learning (NAPL) module and a Data Adaptive Graph Generation (DAGG) module. Where NAPL is used to capture node-specific patterns and DAGG is used to infer relationships between different traffic series.
- GWNet: This is a traffic prediction model based on graph convolutional network (GCN) and Wavenet structure. Among them, GCN is used to capture the spatial dependency of traffic nodes and Wavenet is used to capture the temporal dependency.
- DCRNN: This is a advanced neural network model based on directed graphs, which models the change of traffic flow as a diffusion process.
- MTGNN: This is a generic graph neural network framework that combines external knowledge and relationships between variables through a graph learning module, and then captures spatial and temporal dependencies using mix-hop propagation layers and inflated inception.
Table 6: Data utility comparison by traffic demand prediction. Results are expressed as (original / synthetic / difference ratio).
Methods	AGCRN	GWNet	DCRNN	MTGNN
RMSE	6.51 / 6.08 / 6.61%	6.52 / 6.39 / 1.99%	6.52 / 6.41 / 1.69%	6.31 / 5.97 / 5.39%
MAE	4.47 / 4.16 / 6.94%	4.47 / 4.38 / 2.01%	4.49 / 4.37 / 2.67%	4.41 / 4.11 / 6.80%
MAPE	30.35 / 30.55 / 0.66%	30.82 / 32.53 / 5.55%	30.83 / 32.65 / 5.90%	29.19 / 29.94 / 2.57%
As presented in Table 6, we extend our evaluation to a different synthetic dataset by gauging the performance of AGCRN, GWNet, DCRNN, and MTGNN models on traffic demand prediction tasks. The metrics employed for performance evaluation include RMSE, MAE, and MAPE. Overall, the performances of these models on both the original and new synthetic datasets are close, endorsing the ability of synthetic datasets to replicate real-world scenarios in traffic demand prediction. To be specific, the difference ratio across performance metrics typically falls within a modest range, highlighting the robustness of our synthetic dataset. It is worth observing that the MAPE for GWNet and DCRNN show a slightly increased difference ratio. Despite these model-specific variances, the synthetic dataset continues to exhibit promising utility. In summary, these findings confirm the usability of our SYN-XI'AN dataset for traffic demand prediction tasks, and also expand its potential applicability in different urban traffic scenarios.
$^{10}$ https://github.com/deepkashiwa20/DL-Traff-Graph
B.2 Travel Time Estiamtion
For the travel time estimation task, we used the following methods to evaluate the utility of the dataset:
- TEMP: The method counts trips with the same or nearby origin and destination areas and then estimates the travel time by averaging all related trips.
- XGBoost: The method takes travel information (e.g., distance, departure time, etc.) for each trip as input, and then estimates the travel time using an ensemble learning approach.
- WDR: This is a popular travel time estimation method, which estimate travel time through a combination of wide network, depth network, and recurrent network.
- DepTTE: This is one of the representative travel time estimation methods. It first converts the original GPS trajectory into a series of high-dimensional features, and then applies RNN to capture the spatial-temporal dependence.
Table 7: Data utility comparison by travel time estimation. Results are expressed as (original / synthetic / difference ratio)
Methods	TEMP	XGBoost	WDR	DeepTTE
RMSE	345.35 / 325.44 / 5.77%	282.11 / 266.57 / 5.51%	221.90 / 244.16 / 10.03%	169.26 / 172.51 / 1.92%
MAE	230.34 / 215.86 / 6.29%	190.42 / 179.46 / 5.76%	130.51 / 137.82 / 5.60%	108.25 / 112.71 / 4.12%
MAPE	22.21 / 21.14 / 4.82%	18.95 / 18.09 / 4.54%	12.12 / 12.60 / 3.96%	10.94 / 11.10 / 1.46%