A Graph-based Representation Framework for Trajectory Recovery via Spatiotemporal Interval-Informed Seq2Seq

Yaya Zhao, Kaiqi Zhao, Zhiqian Chen, Yuanyuan Zhang, Yalei Du, Xiaoling LuIJCAI 2024

Abstract: The prevalent issue in urban trajectory data usage, notably in low-sample rate datasets, revolves around the accuracy of travel time estimations, traffic flow predictions, and trajectory similarity measurements. Conventional methods, often relying on simplistic mixes of static road networks and raw GPS data, fail to adequately integrate both network and trajectory dimensions. Addressing this, the innovative GRFTrajRec framework offers a graph-based solution for trajectory recovery. Its key feature is a trajectory-aware graph representation, enhancing the understanding of trajectory-road network interactions and facilitating the extraction of detailed embedding features for road segments. Additionally, GRFTrajRec's trajectory representation acutely captures spatiotemporal attributes of trajectory points. Central to this framework is a novel spatiotemporal interval-informed seq2seq model, integrating an attention-enhanced transformer and a feature differences-aware decoder. This model specifically excels in handling spatiotemporal intervals, crucial for restoring missing GPS points in low-sample datasets. Validated through extensive experiments on two large real-life trajectory datasets, GRFTrajRec has proven its efficacy in significantly boosting prediction accuracy and spatial consistency.

Introduction

In urban computing, GPS data is frequently collected at low frequencies (e.g., one point every minute) to conserve battery and bandwidth. This sparsity creates significant challenges for downstream applications like traffic forecasting or navigation, as the actual path taken between distant points remains unknown. Current recovery models often suffer from three critical gaps: a bias toward static road networks, a lack of synergy between spatial and temporal features, and an ignorance of the varying intervals between GPS points.

The GRFTrajRec Framework

Presented at IJCAI-24, GRFTrajRec is a sophisticated framework designed to reconstruct high-resolution paths from sparse GPS data. It bridges the gap between static road maps and dynamic urban movement through three main pillars:

  1. Trajectory-Aware Graph Representation: The model uses GeoGAT to capture static geometry and CandiGNN to weigh road segments based on their likelihood of being part of a specific trajectory. This allows graph embeddings to evolve based on the trip being analyzed.
  2. Spatiotemporal Trajectory Representation: To capture the "where" and "when," the model uses grid-based spatial embeddings combined with normalized temporal projections and sine/cosine positional encodings.
  3. Spatiotemporal Interval-Informed Seq2Seq: This core component features an attention-enhanced Transformer encoder that factors in $\Delta$time and $\Delta$distance, alongside a feature-differences-aware GRU decoder that ensures recovered paths are physically plausible.
The GRFTrajRec architecture integrates trajectory-aware graph neural networks with a specialized Seq2Seq model to handle spatiotemporal intervals.

Key Insights and Methodology

A central innovation of GRFTrajRec is treating intervals as first-class citizens. By making time and distance intervals explicit inputs to the attention mechanism, the model learns that a large temporal gap requires a more complex search for the missing path than a short one. Furthermore, the model employs multi-task learning, predicting both the road segment ID and the "moving ratio" (position along a segment), forcing the system to learn fine-grained geometry.

Experimental Evaluation and Results

The framework was evaluated on three large-scale real-world datasets: Porto (public taxi data), YanCheng, and NanJing (private urban datasets). GRFTrajRec consistently outperformed seven state-of-the-art baselines across all metrics, including accuracy, F1-score, and spatial consistency.

On the Porto dataset with a 7/8 missing rate, GRFTrajRec achieved an accuracy of 0.6143, a significant improvement over the next best model, MTrajRec (0.5727). It also showed a marked reduction in Road Network Mean Absolute Error (RN_MAE), indicating that recovered paths were much closer to the ground truth in terms of actual road distance.

Performance comparison showing that GRFTrajRec achieves the highest accuracy (ACC) and lowest error (MAE) among tested methods, despite a higher computational cost.

Limitations and Future Work

The primary trade-off for this increased accuracy is computational efficiency. GRFTrajRec has a longer inference time (~37ms per trajectory) compared to simpler models like MTrajRec (~7ms) due to its complex interval calculations and attention-heavy architecture. Future work will focus on optimizing computational speed and modeling more complex interactions between moving agents and the urban environment.

Conclusion

GRFTrajRec represents a significant advancement in trajectory recovery by explicitly modeling the dynamic interaction between moving objects and road networks. By incorporating spatiotemporal intervals directly into the learning process, it provides a robust solution for transforming sparse GPS data into high-fidelity movement paths.

Summary updated

BibTeX
@inproceedings{zhao2024graph,
  author = {Yaya Zhao and Kaiqi Zhao and Zhiqian Chen and Yuanyuan Zhang and Yalei Du and Xiaoling Lu},
  title = {{A Graph-based Representation Framework for Trajectory Recovery via Spatiotemporal Interval-Informed Seq2Seq}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=1FQj46Lfki},
}
Figure