Diversified Trajectory Generation of Urban Motor Vehicles Based on Traffic Road Network Weight Learning

Diversified Trajectory Generation of Urban Motor Vehicles Based on Traffic Road Network Weight Learning

Introduction

The rapid development of urban transportation and the increasing demand for traffic management have made large-scale vehicle trajectory datasets essential for applications such as traffic signal optimization, traffic flow analysis, and accident investigation. Traditional trajectory generation methods primarily rely on Global Positioning System (GPS) data. However, strict privacy protection policies and government regulations prohibiting the permanent storage of urban vehicle trajectories have made GPS data acquisition costly and challenging.

In recent years, the widespread deployment of checkpoint cameras in urban road networks has provided an alternative solution for vehicle trajectory generation. These cameras continuously record vehicle positions and timestamps, offering researchers vast amounts of mobility data. This study explores how checkpoint data can be leveraged to generate vehicle trajectories that are both realistic and diverse.

Given the complexity of urban road networks, trajectory reconstruction and generation can be viewed as a specialized pathfinding problem. Early research focused on extending heuristic search algorithms such as Dijkstra’s shortest path algorithm and the A search algorithm. Among these, A has been widely adopted due to its flexibility, heuristic estimation, and efficiency in avoiding redundant computations. With advancements in deep learning, neural networks have provided more sophisticated solutions for trajectory reconstruction. Graph neural networks (GCNs) and recurrent neural networks (RNNs) have been extensively used to model sequential trajectory data.

Trajectory generation is fundamentally a generative problem, aiming to learn data characteristics and produce solutions indistinguishable from real-world data. Various generative models, including autoencoders (AEs), variational autoencoders (VAEs), and generative adversarial networks (GANs), have been employed for this purpose.

Despite these advancements, existing models face several challenges when applied to checkpoint data:

  1. Discontinuous Trajectories: Due to low checkpoint coverage (typically below 40%), recorded trajectories are often fragmented, making them incompatible with existing models.
  2. Incompatibility with Non-GPS Data: Most models are designed for continuous GPS trajectories and struggle with incomplete checkpoint data.
  3. Ignoring Road Network Constraints: Many models fail to account for road network restrictions, such as no-left-turn rules, leading to unrealistic trajectories that cannot be used in simulations.
  4. Lack of Diversity: Existing models generate trajectories that closely mimic input samples, resulting in identical routes for vehicles with the same origin and destination (OD). This leads to unrealistic traffic congestion patterns in simulations.

To address these challenges, this study introduces two novel models:
• TrajGAT-A: Combines graph neural networks with the A algorithm to reconstruct continuous trajectories from fragmented checkpoint data while adhering to road network constraints.

• β-TrajVAE: A generative model that produces diverse trajectories by learning the underlying distribution of road network weights and optimizing a modified loss function.

Methodology

Problem Definition

The study formalizes the trajectory generation problem using the following definitions:

  1. Road Network (G): Represented as a directed graph ( G = (V, A) ), where ( V ) denotes road segments and ( A ) is an adjacency matrix indicating connectivity between segments.
  2. Functional Area Network (H): Constructed by clustering road segments into functional zones (e.g., residential areas, main roads) to capture long-range dependencies.
  3. Vehicle Trajectory (T): A sequence of connected road segments from an origin ( v_s ) to a destination ( v_g ).
  4. Checkpoint Sequence (B): A set of checkpoints captured in a trajectory, which may not be directly connected.
  5. Costmap: A weighted road network where each segment is assigned a traversal cost.

The primary objective is to generate trajectories that:
• Reconstruct continuous paths from fragmented checkpoint data (subtask a).

• Produce diverse trajectories that match the statistical properties of real-world data (subtask b).

TrajGAT-A* Model

The TrajGAT-A* model addresses the challenges of discontinuous trajectories and road network constraints through the following steps:

  1. Road Network Initialization: Road segments are embedded with features such as Point of Interest (POI) labels, segment length, width, coordinates, and lane count.
  2. Functional Area Construction: Spectral clustering groups road segments into functional zones (e.g., commercial districts, highways) to capture high-level traffic patterns.
  3. Graph Attention Network (GAT): Dynamically adjusts segment weights by aggregating neighborhood information, reducing the influence of minor segments (e.g., short connectors).
  4. A* Search: Uses the costmap to find optimal paths, prioritizing segments within functional zones.

The model is trained by minimizing the Dynamic Time Warping (DTW) distance between reconstructed and ground-truth trajectories.

β-TrajVAE Model

To generate diverse trajectories, the β-TrajVAE model extends the TrajGAT-A* framework with the following innovations:

  1. Partitioned Sampling: Road segments are divided into intra-cluster (functional zones) and outlier segments. Noise sampling is restricted to high-probability regions for outliers and low-probability regions for intra-cluster segments, amplifying diversity in critical areas.
  2. Optimized Loss Function: A hyperparameter ( beta ) dynamically balances reconstruction accuracy and diversity by adjusting the Kullback-Leibler (KL) divergence term in the VAE loss function.

The model generates multiple costmaps, each leading to different trajectories when processed by the A* algorithm.

Experimental Validation

Dataset and Setup

Experiments were conducted using checkpoint data from Chongqing, China, covering morning peak hours (7:00–9:00). The dataset included over 95,000 vehicle trajectories, each anonymized and processed into checkpoint sequences. The road network, modeled in SUMO, comprised 1,072 segments and 578 intersections.

Evaluation Metrics

  1. Reconstruction Metrics: Precision, recall, and F1-score measure the overlap between reconstructed and ground-truth trajectories.
  2. Road Network Compliance: The ratio of trajectories violating network constraints in SUMO simulations.
  3. Diversity Metrics:
    • Segment Cross-Entropy: Measures the divergence between the distribution of road segments in generated and real trajectories.

    • Checkpoint Cross-Entropy: Evaluates the alignment of checkpoint sequences.

Results

Trajectory Reconstruction

• TrajGAT-A* outperformed baseline models (CTRR, NASR+, AttnMove, TrajRecovery, CFST) across short, medium, and long-distance trajectories, achieving F1-scores of 0.850, 0.841, and 0.809, respectively.

• Visualizations confirmed that TrajGAT-A* trajectories adhered to functional zones, while baselines often explored irrelevant segments.

• All TrajGAT-A* trajectories complied with road network constraints in SUMO, whereas baselines exhibited errors (e.g., illegal turns).

Trajectory Generation

• β-TrajVAE generated trajectories with higher segment cross-entropy (indicating diversity) while maintaining low checkpoint cross-entropy (preserving realism). For long-distance trajectories, segment cross-entropy reached 3.688, compared to 3.337 (TrajVAE) and 3.464 (EETG).

• Ablation studies demonstrated the importance of partitioned sampling and the ( beta )-weighted loss function in achieving diversity.

Conclusion

This study presents a comprehensive framework for generating realistic and diverse vehicle trajectories from checkpoint data. The TrajGAT-A* model effectively reconstructs continuous trajectories while respecting road network constraints, and the β-TrajVAE model introduces controlled diversity through partitioned sampling and an optimized loss function.

Key contributions include:
• A hybrid approach combining graph neural networks and heuristic search for robust trajectory reconstruction.

• A novel generative model that balances accuracy and diversity, enabling realistic traffic simulations.

• Empirical validation on real-world data, demonstrating superior performance over existing methods.

Future work will incorporate vehicle speed and temporal dynamics to further enhance trajectory realism.

doi.org/10.19734/j.issn.1001-3695.2024.08.0311

Was this helpful?

0 / 0