Table of Contents
Fetching ...

Learning Spatio-Temporal Dynamics for Trajectory Recovery via Time-Aware Transformer

Tian Sun, Yuqi Chen, Baihua Zheng, Weiwei Sun

TL;DR

TedTrajRec tackles map-constrained trajectory recovery for low-sampling-rate GPS data by explicitly modeling two spatio-temporal dynamics: spatial-temporal traffic dynamics and trajectory dynamics. It combines PD-GNN to learn periodic road-network dynamics with TedFormer, a time-aware Transformer that integrates a closed-form neural ODE into attention to handle irregular sampling, guided by timestamps $t_i$, and STTExtractor to enrich trajectory features. The method employs an autoregressive decoder with a multi-task predictor and a joint loss to recover map-constrained trajectories, and demonstrates state-of-the-art results on three real-world datasets with notable upstream-task gains for trajectory similarity and clustering. Overall, TedTrajRec advances trajectory recovery by jointly modeling road-network dynamics and trajectory dynamics, enabling accurate high-frequency reconstructions that support practical ITS applications.

Abstract

In real-world applications, GPS trajectories often suffer from low sampling rates, with large and irregular intervals between consecutive GPS points. This sparse characteristic presents challenges for their direct use in GPS-based systems. This paper addresses the task of map-constrained trajectory recovery, aiming to enhance trajectory sampling rates of GPS trajectories. Previous studies commonly adopt a sequence-to-sequence framework, where an encoder captures the trajectory patterns and a decoder reconstructs the target trajectory. Within this framework, effectively representing the road network and extracting relevant trajectory features are crucial for overall performance. Despite advancements in these models, they fail to fully leverage the complex spatio-temporal dynamics present in both the trajectory and the road network. To overcome these limitations, we categorize the spatio-temporal dynamics of trajectory data into two distinct aspects: spatial-temporal traffic dynamics and trajectory dynamics. Furthermore, We propose TedTrajRec, a novel method for trajectory recovery. To capture spatio-temporal traffic dynamics, we introduce PD-GNN, which models periodic patterns and learns topologically aware dynamics concurrently for each road segment. For spatio-temporal trajectory dynamics, we present TedFormer, a time-aware Transformer that incorporates temporal dynamics for each GPS location by integrating closed-form neural ordinary differential equations into the attention mechanism. This allows TedFormer to effectively handle irregularly sampled data. Extensive experiments on three real-world datasets demonstrate the superior performance of TedTrajRec. The code is publicly available at https://github.com/ysygMhdxw/TEDTrajRec/.

Learning Spatio-Temporal Dynamics for Trajectory Recovery via Time-Aware Transformer

TL;DR

TedTrajRec tackles map-constrained trajectory recovery for low-sampling-rate GPS data by explicitly modeling two spatio-temporal dynamics: spatial-temporal traffic dynamics and trajectory dynamics. It combines PD-GNN to learn periodic road-network dynamics with TedFormer, a time-aware Transformer that integrates a closed-form neural ODE into attention to handle irregular sampling, guided by timestamps , and STTExtractor to enrich trajectory features. The method employs an autoregressive decoder with a multi-task predictor and a joint loss to recover map-constrained trajectories, and demonstrates state-of-the-art results on three real-world datasets with notable upstream-task gains for trajectory similarity and clustering. Overall, TedTrajRec advances trajectory recovery by jointly modeling road-network dynamics and trajectory dynamics, enabling accurate high-frequency reconstructions that support practical ITS applications.

Abstract

In real-world applications, GPS trajectories often suffer from low sampling rates, with large and irregular intervals between consecutive GPS points. This sparse characteristic presents challenges for their direct use in GPS-based systems. This paper addresses the task of map-constrained trajectory recovery, aiming to enhance trajectory sampling rates of GPS trajectories. Previous studies commonly adopt a sequence-to-sequence framework, where an encoder captures the trajectory patterns and a decoder reconstructs the target trajectory. Within this framework, effectively representing the road network and extracting relevant trajectory features are crucial for overall performance. Despite advancements in these models, they fail to fully leverage the complex spatio-temporal dynamics present in both the trajectory and the road network. To overcome these limitations, we categorize the spatio-temporal dynamics of trajectory data into two distinct aspects: spatial-temporal traffic dynamics and trajectory dynamics. Furthermore, We propose TedTrajRec, a novel method for trajectory recovery. To capture spatio-temporal traffic dynamics, we introduce PD-GNN, which models periodic patterns and learns topologically aware dynamics concurrently for each road segment. For spatio-temporal trajectory dynamics, we present TedFormer, a time-aware Transformer that incorporates temporal dynamics for each GPS location by integrating closed-form neural ordinary differential equations into the attention mechanism. This allows TedFormer to effectively handle irregularly sampled data. Extensive experiments on three real-world datasets demonstrate the superior performance of TedTrajRec. The code is publicly available at https://github.com/ysygMhdxw/TEDTrajRec/.

Paper Structure

This paper contains 34 sections, 27 equations, 9 figures, 9 tables.

Figures (9)

  • Figure 1: Illustration of Trajectory Recovery Task with Irregularly-Sampled GPS Points.
  • Figure 2: Illustration of Spatio-Temporal Dynamics on Road Network and Trajectory.
  • Figure 3: The Architecture of TedTrajRec. TedTrajRec contains i) Feature Extraction, which involves the proposed PD-GNN for learning spatio-temporal traffic dynamics and a trajectory feature extraction module.ii) Encoder, a time-aware Transformer, namely TedFormer that captures spatio-temporal trajectory dynamics of GPS locations within the attention mechanism. iii) Auto-Regressive Decoder, a decoder model that employs TedFormer and produces the target trajectory.
  • Figure 4: The detailed illustration of the graph attention network on the road network. In sub-figure (a), the central road segment $e_i$, colored in blue, has four neighborhood road segments $e_1, e_2, e_3,$ and $e_4$. Each road segment contains its road segment embeddings. In sub-figure (b), the road segment embedding of $e_i$ is updated by aggregating the embeddings from neighborhood road segments and the embeddings from itself.
  • Figure 5: The Overall Architecture of the Multi-head Time-Aware Attention Mechanism in TedFormer.
  • ...and 4 more figures