TL;DR
CityTrajBench introduces a unified benchmarking framework to resolve the highly fragmented landscape of city-scale vehicle trajectory generation. By standardizing data pipelines, representations, and evaluation metrics across seven distinct generative model families, the benchmark reveals that trajectory generation is inherently multi-objective, exposing critical trade-offs between macro-level spatial realism, micro-level geometric fidelity, and computational efficiency.
What Problem Does This Problem Address?
Generating realistic vehicle trajectories is essential for urban planning, traffic simulations, and building privacy-preserving digital twins. However, evaluating how well a model synthesizes these paths is notoriously difficult.
Prior research in this field has been deeply fragmented. Different studies use entirely different datasets, coordinate systems, spatial filtering rules, and trajectory representations (e.g., some generate raw GPS points, while others operate on discrete grid cells or road network edges). Furthermore, evaluation metrics are inconsistent—some papers only look at global city density, while others focus purely on individual path distances.
This lack of standardization makes it impossible to determine if a model's reported performance stems from its superior generative architecture or simply a cleaner, more favorable preprocessing pipeline.
Methods
The authors present CityTrajBench, a modular framework designed to evaluate heterogeneous trajectory generators under identical experimental conditions. The framework standardizes the workflow into six key stages:
- Data Ingestion & Normalization: Standardizes temporal sampling to 30-second intervals and normalizes all trajectories to a fixed length ($L=200$) using linear interpolation for short trips and prefix truncation for long ones.
- Representation Alignment: Employs a deterministic geometric projection layer using an
STRtreespatial index to map GPS points to road network edges. This allows fair comparisons between GPS-based and road-constrained models. - Feature Construction: Extracts multi-granular contextual features, such as trip descriptors (distance, duration, speed) and road network embeddings.
- Model-Agnostic Adapters: Thin tensor-mapping layers that feed standardized data into various model architectures without violating their original design assumptions.
- Map-Aware Post-Processing: Converts all generated outputs back into a common geographic coordinate space via point-wise road network matching before evaluation.
- Multi-Level Evaluation: A comprehensive metric suite assessing five dimensions: global spatial realism, trip-level statistical fidelity, trajectory-level geometric similarity, conditional mobility consistency, and computational efficiency.
Datasets
The benchmark evaluates models across three distinct real-world vehicle trajectory datasets:
- Porto Taxi: 538,495 trips capturing long-term taxi mobility over a large, diverse spatial region.
- Chengdu Taxi: 531,517 trips within a dense, inland urban road network.
- Shanghai EV: 39,615 electric vehicle trips featuring distinct temporal patterns and mobility regimes, serving as a smaller, more challenging stress test.
Key Insights and Ideas
- Trajectory Generation is Multi-Objective: No single model dominates all evaluation criteria. Models that excel at capturing global city-wide density often fail to generate plausible individual route geometries, and vice versa.
- The Structural Prior Trade-Off: Incorporating explicit road-network constraints (as seen in
DiffRNTraj) significantly boosts macro-level realism, such as hotspot recovery and density matching. However, this structural constraint can reduce the flexibility needed to match fine-grained, sample-level geometric details. - Continuous Models Define the Frontier: Diffusion and flow-matching models currently outperform older VAE and GAN architectures, but they specialize differently. Diffusion models excel at micro-level route geometry, while flow-matching approaches offer the best balance between realism and speed.
- Simple Baselines are Surprisingly Stubborn: A basic first-order Markov chain remains highly competitive at matching coarse trip-level and local-movement statistics, proving that low-order transition dynamics still explain a large portion of urban mobility regularity.
Key Results
The quantitative evaluation across seven baselines (Markov, VAE, TrajVAE, TrajGAN, DiffTraj, DiffRNTraj, and TrajFlow) highlighted distinct performance leaders:
- Geometric Fidelity:
DiffTrajconsistently dominated trajectory-level similarity metrics. On the Porto dataset, it achieved a median Dynamic Time Warping (DTW) distance of 16.05, substantially lower thanTrajFlow(22.59) andDiffRNTraj(53.68). - Global Realism:
TrajFlowandDiffRNTrajled on macro-scale metrics. On Porto,TrajFlowachieved the best Density Error (0.0148 JSD) and Hotspot Pattern Score (0.8851). - The Efficiency Frontier:
TrajFlow(a flow-matching model) proved highly practical, delivering a generation throughput of 150.24 trajectories/second on Porto—more than double that ofDiffTraj(71.85) and over four times that ofDiffRNTraj(33.23)—while maintaining a remarkably low peak GPU memory footprint (282.90 MB). - Conditional Consistency: In origin-conditioned destination tests on Chengdu,
DiffTrajandTrajFlowformed the strongest pair, accurately preserving sharp conditional dependencies between starting points and downstream destinations.
Limitations and Future Work
While CityTrajBench provides a rigorous foundation, the authors note several limitations:
- Modality Scope: The benchmark is currently restricted to vehicle trajectories and does not account for pedestrians, cyclists, or multimodal transit.
- Fixed-Length Representation: Forcing trajectories to a fixed length of 200 points can over-smooth short trips or truncate the tail-end geometry of longer journeys.
- Temporal Dynamics: The current protocol focuses heavily on spatial and structural fidelity, leaving deeper temporal causality and behavioral modeling for future iterations.
Future extensions aim to incorporate privacy risk assessments, downstream utility tasks (like traffic forecasting), and highly controllable generation settings based on joint constraints like origin-destination pairs and trip purposes.
Summary updated