SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Yuanshao Zhu $^{1,2*}$ , Yongchao Ye $^{1*}$ , Ying Wu $^{1,3}$ , Xiangyu Zhao $^{2\dagger}$ , James J.Q. Yu $^{4\dagger}$ $^{1}$  Southern University of Science and Technology  
 $^{2}$  City University of Hong Kong  
 $^{3}$  University of Leeds  
 $^{4}$  University of York  
{zhuys2019, 12032868, 12059004}@mail.sustech.edu.cn  
xianzhao@cityu.edu.hk  
james.yu@york.ac.uk
Urban mobility analysis has been extensively studied in the past decade using a vast amount of GPS trajectory data, which reveals hidden patterns in movement and human activity within urban landscapes. Despite its significant value, the availability of such datasets often faces limitations due to privacy concerns, proprietary barriers, and quality inconsistencies. To address these challenges, this paper presents a synthetic trajectory dataset with high fidelity, offering a general solution to these data accessibility issues. Specifically, the proposed dataset adopts a diffusion model as its synthesizer, with the primary aim of accurately emulating the spatial-temporal behavior of the original trajectory data. These synthesized data can retain the geo-distribution and statistical properties characteristic of real-world datasets. Through rigorous analysis and case studies, we validate the high similarity and utility between the proposed synthetic trajectory dataset and real-world counterparts. Such validation underscores the practicality of synthetic datasets for urban mobility analysis and advocates for its wider acceptance within the research community. Finally, we publicly release the trajectory synthesizer and datasets, aiming to enhance the quality and availability of synthetic trajectory datasets and encourage continued contributions to this rapidly evolving field. The dataset is released for public online availability https://github.com/Applied-Machine-Learning-Lab/SynMob.
Urban mobility analysis is an essential aspect of modern urban planning and development [45]. It provides ongoing insight into the movement patterns of individuals and populations within urban environments, informing decisions related to infrastructure design, transportation planning, and policy decisions [46, 48]. Central to the progress of this analysis is the trajectory data, which captures the movement of individuals temporally and spatially. This type of data is invaluable for understanding the social and environmental impacts of urban transportation, as it allows researchers and practitioners to model and predict movement patterns [28, 15], identify congestion points [12], and optimize transportation networks [24].
Despite the undeniable value of trajectory data in urban mobility analysis, several challenges have hindered its widespread utilization. Firstly, there is a noticeable lack of publicly available trajectory
Figure 1: The illustration of using synthesize trajectory dataset for urban mobility analysis. Here, the trajectory synthesizer uses a diffusion model to learn complex spatial-temporal motion patterns, enabling the synthetic trajectory dataset with high-fidelity.
datasets. This scarcity is primarily due to the proprietary nature of such data, which are typically collected and owned by private entities or government agencies [32, 49]. Secondly, strict regulations and data privacy concerns further limit the accessibility of trajectory data. The sensitivity of this data can reveal personal information about personal activities and routines, necessitating strict privacy safeguards [19, 40]. Lastly, even when trajectory data is available, it often suffers from poor format and quality. Inconsistent data collection methods, missing data points, and noise can significantly degrade the utility of these datasets, making them less useful for rigorous, high-quality research in urban mobility analysis [23, 31]. As a result, the lack of publicly available, privacy-free, and high-quality trajectory data presents a significant obstacle to the progress of the urban computing community. Addressing the above challenges calls for creating alternative trajectory data sources that are accessible and available for research.
Figure 1 illustrates a promising solution that resorts to synthetic datasets: synthesizing trajectories by learning real trajectory distributions. Based on the synthesized trajectory, equivalent urban mobility analysis results can be expected while avoiding privacy leakage. However, due to the complex spatial-temporal properties inherent in trajectory, generating the proper dataset is a non-trivial task. Real-world trajectories are characterized by intricate spatial patterns and temporal dependencies, reflecting the variety and dynamics of human mobility [45, 20]. For example, different areas within a city (e.g., commercial, residential) present various functions and population densities, resulting in non-independent and identically trajectory distribution [50]. Moreover, the spatial aspect of trajectory data is often intertwined with the temporal aspect, creating a high-dimensional data structure that is challenging to model accurately [44, 18, 6]. For example, the same location can exhibit different mobility patterns at different times, and the same individual can exhibit different mobility patterns at different locations [15, 28]. In addition, individual location at a given time is influenced by their previous location, as well as by the time of day, traffic conditions, and various other contextual factors [19, 50, 43]. Therefore, successfully synthesizing trajectory datasets advocates a method that accurately captures and integrates these complex spatial-temporal behaviors.
To confront these intricacies, our objective centers on crafting a high-fidelity synthetic trajectory dataset tailored for urban mobility analysis, followed by a thorough evaluation of its practicality. Our research revolves around probing: 1) The feasibility of devising a trajectory generation technique that adeptly captures spatial-temporal characteristics for dataset synthesis. 2) The ability of the synthesized dataset to mirror the intrinsic geo-distribution and statistical attributes while retaining the original utility. To navigate these queries, our work offers the ensuing contributions:
- We introduce a groundbreaking high-fidelity synthetic trajectory dataset, birthed using the diffusion model. This dataset not only bridges the existing chasm in data accessibility and privacy but also propels the creation of synthetic trajectory data. By equipping community researchers with tools for generating premium trajectory datasets, we envision a surge in urban traffic research and its subsequent innovations.
- We embark on exhaustive analyses and empirical studies to authenticate our methodology. By juxtaposing the synthesized datasets with their real-world analogs across diverse aspects, we underscore their striking resemblance. Such validation accentuates the robustness and adaptability
of synthetic datasets in urban mobility studies, thereby fortifying the methodological foundation of this academic domain.
Since our focus is on synthesizing GPS trajectory data for urban mobility analysis, a brief review of the related work on trajectory data in urban mobility analysis and the corresponding trajectory datasets is presented in this section.
Trajectory data in urban mobility analysis: The cornerstone of urban mobility analysis is the well-conceived utilization of trajectory data, which captures the spatial and temporal dimensions of individual movements within these spaces [48, 46]. Based on trajectory data, researchers can investigate movement patterns within urban areas, providing valuable insights to inform various decisions, from infrastructure development and transportation planning to decision-making and resource allocation. One important application of trajectory data is travel mode identification [49], enabling researchers to identify common modes of transportation and travel habits, as well as to detect anomalies and changes in travel behavior over time [32]. This information can be used to optimize transport networks, improve traffic management and enhance urban infrastructure planning. In addition, trajectory data serves for traffic flow forecasting and traffic condition diagnosis [24]. By analyzing historical trajectory data, it can help researchers identify trouble areas and trends in the urban network, enabling them to predict future congestion levels and take proactive measures to alleviate them. Finally, trajectory data can be used for travel time estimation [19, 11, 38]. Analyzing travel times for past trips allows researchers to predict travel times for future trips, which can help commuters plan their trips more efficiently and help transportation providers deliver a favorable user experience. Besides, trajectory data can also be applied to route planning [5], similarity analysis [9], and public health analysis [1], but all of its potential benefits on urban mobility analysis are rooted in the availability of sufficient trajectory data.
Table 1: Summaries of existing trajectory datasets.
Dataset	GPS trajectory	Availability	Data quality	Privacy	# Trajectory
GeoLife3 [47]	✓	✓	✗	✗	17,621
T-drive4 [39]	✓	✓	✗	✗	10,357
Porto5 [22]	✓	✓	✗	✗	1.7 million
Foursquare6 [37]	✗	✓	-	✗	104,478
NYC7	✗	✓	-	✗	1.1 billion
Taxi-Shanghai8	✓	✗	✗	✗	1.2 million
GAIA9	✓	✗	✓	✗	3.1 million
Ours (Synthetic)	✓	✓	✓	✓	unrestricted (customize)
Available Trajectory Dataset: Considering the tremendous value of trajectory data in urban mobility analysis, there are several trajectory datasets available for urban mobility analysis. As concluded in Table 1, these datasets vary in source, coverage, granularity, and quality, and each has unique strengths and limitations. Geolife data is one of the most prestigious trajectory datasets, which was collected over three years (April 2007 to August 2012) by 182 users [47]. The dataset is widely applied in many research areas such as travel mode identification [8], location recommendation [3], and traffic flow analysis [41]. However, the trajectory is recorded by heterogeneous GPS devices, involves multiple sampling rates, and is limited by coverage, as they can only capture the behavior of a tiny population. Additional trajectory data, such as Porto [22], T-drive [39], and Taxi-Shanghai are collected by GPS devices mounted on the taxi. These datasets provide broader coverage and capture
<sup>3</sup>https://www.microsoft.com/en-us/research/publication/geolife-gps-trajectory-dataset-user-guide
<sup>4</sup>https://www.microsoft.com/en-us/research/publication/t-drive-trajectory-data-sample
<sup>5</sup>https://www.kaggle.com/datasets/crailtap/taxi-trajectory
<sup>6</sup>https://sites.google.com/site/yangdingqi/home/foursquare-dataset
<sup>7</sup>https://www.nyc.gov/site/tlc/about/tlc-trip-record-data.page
<sup>8</sup>https://cse.hkust.edu.hk/scrg
<sup>9</sup>https://outreach.didichuxing.com
the activity of many individuals, but they normally provide low-sampling rate data. In addition, the GAIA Initiative at Didi-Chuxing provides a series of high-quality and extensive datasets [10]. However, these datasets are not publicly available due to privacy concerns and proprietary restrictions, which restrict their accessibility and usability. Other datasets, such as Foursquare [37] and NYC, provide a large amount of location-based social network data. Such datasets lack the necessary contextual information to fully understand the mobility pattern, limiting the scope of research that can be conducted using these datasets [45, 49, 50]. As a result, while a range of trajectory data is available, with their availability is often hampered by a variety of challenges, including authorization issues, privacy concerns, and data quality matters. These challenges highlight the aspiration for alternative sources of trajectory data, such as synthetic datasets, which can overcome these limitations and improve the scope and quality of urban traffic analysis.
3 Technical Design
Given that the primary focus of this paper is the synthesized trajectory dataset, our discussion regarding the technical design of the diffusion model-based trajectory synthesizer is intentionally succinct in this section. Comprehensive details about the underlying principles and design intricacies can be found in previously published works, specifically in references [14, 26, 27]. Figure 1 illustrates the foundational distinction of the trajectory synthesizer we propose. Notably, it is the innovative incorporation of a diffusion model into its design. Historically, diffusion models have been predominantly utilized in the realm of nonequilibrium thermodynamics, a fact evidenced by studies such as [26, 14]. However, our approach seeks to repurpose this model for a radically different domain. Translating the concepts into the domain of urban mobility analysis, one can draw parallels between the inherent components of the diffusion model and the urban setting. Here, the term "particles" can be aptly likened to individuals navigating the intricate urban landscape. Meanwhile, the "medium" in which these particles move is analogous to the very fabric of the urban environment – its streets, alleys, and open spaces. The adoption of the diffusion model in trajectory synthesis is not just an academic exercise but brings forth two significant advantages. Firstly, the mechanism by which the diffusion model operates synthesizes data in a granular, incremental manner, starting from mere random noise as indicated by [27]. This intricate process ensures the resulting trajectories are purged of any traces of sensitive personal data, thus fortifying the privacy measures. Secondly, the inherent versatility of the diffusion model facilitates the simulation of an expansive range of spatial-temporal behaviors. This ensures that the synthesized dataset is not a monolithic block but instead, mirrors the multifaceted, heterogeneous nature observed in genuine real-world mobility patterns. Such a rich and comprehensive representation is indispensable, as it affords researchers the latitude to delve into a plethora of scenarios and phenomena. Consequently, it amplifies the scope, generalizability, and relevance of the derived insights and findings. Specifically, the trajectory synthesizer uses the following design:
- Main Processes: Our approach leverages the standard diffusion model process, encompassing both forward noising process and reverse denoising process [4]. As shown in Figure 1, the forward noising process involves iteratively adding noise to the original trajectory, transforming it into a Gaussian noise over a series of diffusion steps. On the other hand, the reverse denoising process works in the opposite direction. Starting from the Gaussian noise, it progressively removes noise to finally generate a high-fidelity trajectory (For more details about these two processes, please refer to [14]). This mechanism ensures that the trajectory synthesizer generates trajectories based on the learned spatial-temporal distribution, rather than directly manipulating real-world data.
- Architecture: Our trajectory synthesizer architecture builds upon the widely recognized denoising neural network, UNet [25], which has been tailored to align with our specific requirements. The architecture is optimized to handle the unique structure of trajectory data, ensuring precise noise level predictions at each diffusion step.
- Quality Ensuring: We employ a classifier-free diffusion guidance method [13] to strike a balance between the quality and diversity of synthesized trajectories. By integrating advances from the literature, notably the non-Markov diffusion process method [27], we enhance computational efficiency and generate high-quality trajectories in a condensed number of steps.
- Training: The training for our trajectory synthesizer draws from two significant trajectory datasets from the GAIA project [10]. While these datasets contain invaluable urban mobility insights, their proprietary nature restricts broad access. Our synthesizer aims to tap into the potential of these
datasets by producing simulated trajectories that are devoid of sensitive information. This approach not only maintains data privacy but also negates risks associated with reverse engineering. Practical adjustments to the dataset, such as length normalization, are also implemented for optimal model training.
4 Synthetic Dataset Analysis
Using the well-trained trajectory synthesizer, we generate two datasets based on the original data, i.e., SYN-CHENGDU and analysis of SYN-XI'AN. In this section, we perform a detailed analysis of the SYN-CHENGDU datasets, including a basic description and an evaluation of their quantities (The analysis of SYN-XI'AN is conclude in the Appendix A). Specifically, this dataset accurately reflects the characteristics and trends of real-world counterpart, making it valuable for downstream tasks and applications. However, it's essential to note that our primary goal of this synthetic dataset is not just to reproduce the original data but to provide an alternative when the original dataset is not available. The slight discrepancies observed also highlight areas for potential improvement in our method, and we are continuously working to refine our approach to narrow this gap further. We hope that this dataset can be used as a benchmark for future research in the field of urban mobility analysis. Compared to the original dataset collected from physical devices such as GPS devices or mobile phones, the synthetic dataset has the following advantages:
- Privacy free: It provides privacy protection by generating trajectories that do not contain any personally identifiable information or sensitive data.
- High fidelity: The synthetic dataset has high fidelity, with similar statistical features as the original dataset, making it a representative sample of real-world data.
- Public availability: The synthetic dataset can be made publicly available, enabling researchers and practitioners to use it for various purposes without violating regulations.
- Scalability: The trajectory synthesizer can generate an arbitrary amount of synthetic trajectories, addressing the problem of insufficient data and making the synthetic dataset highly scalable.
- Enhancing diversity: While the synthetic dataset is derived from real data, the synthesis process introduces variability and diversity, ensuring that the dataset is not just a mere replication but offers varied patterns that can be valuable for different applications.
Table 2: Dataset description of SYN-CHENGDU
Type	Description
Format	pickle / geoparquet
Size	4.39 GB
Value type	float64
Time frame	5 min
Sample interval	3 s
Spatial coverage	lat: 30.65° ~ 30.73°
lng: 104.04° ~ 104.13°
4.1 Dataset Description
As concluded in Table 2, the synthetic trajectory dataset SYN-CHENGDU, stored in pickle format with a float64 value type, is readily accessible and compatible with a variety of data analysis tools. The dataset contains one million records, each representing an individual trajectory, organized into two parts: attribute information and trip trajectory. Among them, the attribute information is used to record the departure time  $t_d$ , trip distance (meters), trip time  $t_a$  (seconds), and sampling points  $n$ . Specifically, the data is sampled at 3-second intervals (same sampling rate as the original trajectory dataset), and the departure time is divided into 288-time frames with a 5-minute duration. Thus, we can derive the timestamp for any point based on the departure time  $(t_i = t_d + i \times 3 \mathrm{~s})$ . For the trip distance, we use the Vincenty [29] formula to calculate the relative distances of two contiguous points and accumulate them. These attributes record the temporal and
(a) Original trajectories.
(b) Synthetic trajectories with area zoom.
(c) Same start-end areas.
(a) Heatmap distribution of difference
Figure 2: 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.
(b) Average speed
(c) Trip volume
Figure 3: Spatial-temporal comparison of the synthetic dataset and original counterpart (SYN-CHENGDU). (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.
motion profiles of the trajectory and provide a wealth of information for analysis. In addition, the trip trajectory part consists of a series of consecutive data points represented by  $\mathcal{P} = \{p_1,\dots ,p_n\}$ , where  $p_i = [\mathrm{lat}_i,\mathrm{lon}_i], i\in \{1,\ldots ,n\}$  represents the latitude and longitude of the location. In terms of spatial coverage, the dataset spans a wide geographical area, encompassing various urban environments. This spatial coverage enables the analysis of spatially-dependent mobility patterns and phenomena.
4.2 Quality Evaluation
In this section, we provide a comprehensive quality evaluation of the synthetic dataset, focusing on its spatial-temporal distribution and its motion characteristics. For a better presentation of the quality of the synthetic dataset, we chose its counterpart in the real world as a reference comparison.
Trajectory geo-distribution insight: Figure 2 provides a comprehensive visualization of synthetic trajectories within the urban road network, reflecting several important characteristics of the synthesized data. In particular, Figure 2(a) and Figure 2(b) offer a side-by-side comparison of original and synthetic trajectories. Notably, the synthetic trajectories successfully adhere to the geo-distribution and sparse properties that are characteristic of the urban road network in the original counterparts. This observation suggests that the synthetic data generation process can effectively mimic real-world data, preserving its key spatial characteristics. This insight is further validated by Figure 2(b), portraying the consistency of synthetic trajectories with real-world valid routes and positional details. This feature suggests that synthetic trajectories hold road segment validity, which can support road-based spatial-temporal tasks, e.g., map matching. Furthermore, Figure 2(c) presents synthetic trajectories that maintain consistent start and end areas. This visualization emphasizes the synthesizer capable of generating trajectories exhibiting a wide range of behavioral profiles, further enhancing the diversity and complexity of the synthetic dataset.
Spatial-temporal distribution: Beyond trajectory visualization, this study offers an analysis of the spatial and temporal distribution embedded within the synthetic dataset, further substantiating its
Figure 4: Comparative analysis of trajectory properties in original and synthetic datasets.
fidelity. Figure 3(a) presents a heatmap depicting the citywide distribution of trajectories, enabling a detailed comparison between the synthetic and original datasets. The results clearly show that the synthesized trajectory dataset can maintain a high degree of spatial distribution consistency, which provides confidence in urban traffic prediction based on the synthetic trajectory dataset. Figures 3(b) and 3(c) delve into the temporal dynamics of the synthetic dataset by capturing the variation in average speed and trip volume over 24 hours. Specifically, these figures highlight the ebb and flow of urban movement, showing a slower average speed and a higher number of trips during peak hours (9 AM - 6 PM). This pattern reverses during the early hours of the day (0 AM - 6 AM) when activity levels in the city typically diminish. The temporal pattern reflected in the synthetic dataset is strongly aligned with what would be expected based on real-world trends. This synchronization fidelity in temporal patterns is instrumental in facilitating reliable travel time estimations based on the synthetic dataset. In effect, the synthetic data is shown to accurately encapsulate the day-night cycle of urban mobility, further enhancing its utility and application potential.