Table of Contents
Fetching ...

TransferTraj: A Vehicle Trajectory Learning Model for Region and Task Transferability

Tonglong Wei, Yan Lin, Zeyu Zhou, Haomin Wen, Jilin Hu, Shengnan Guo, Youfang Lin, Gao Cong, Huaiyu Wan

TL;DR

This work tackles the challenge of learning vehicle trajectories that generalize across regions and tasks without retraining. It introduces TransferTraj, composed of a Region-Transferable Trajectory Encoder (RTTE) and a task-transferable input-output scheme, enabling a single pre-trained model to perform multiple trajectory tasks after minimal adaptation. RTTE fuses spatial, temporal, POI, and road-network modalities and employs Trajectory Relative Information Extraction (TRIE) with a spatio-temporal rotation in attention, plus a Spatial Context Mixture-of-Experts (SC-MoE) to capture context-dependent movement patterns. The task-transferable IO scheme unifies inputs and outputs by masking and recovering modalities or points, allowing effective multi-task pre-training. Experiments across three real-world datasets (Chengdu, Xi’an, Porto) show TransferTraj achieves state-of-the-art performance on trajectory prediction, recovery, and origin-destination travel time estimation in both zero-shot and few-shot region transfers, while remaining parameter-efficient and not requiring retraining for new tasks. These results demonstrate practical impact for ITS applications by reducing model maintenance costs and enabling data-efficient adaptation to new regions and tasks.

Abstract

Vehicle GPS trajectories provide valuable movement information that supports various downstream tasks and applications. A desirable trajectory learning model should be able to transfer across regions and tasks without retraining, avoiding the need to maintain multiple specialized models and subpar performance with limited training data. However, each region has its unique spatial features and contexts, which are reflected in vehicle movement patterns and difficult to generalize. Additionally, transferring across different tasks faces technical challenges due to the varying input-output structures required for each task. Existing efforts towards transferability primarily involve learning embedding vectors for trajectories, which perform poorly in region transfer and require retraining of prediction modules for task transfer. To address these challenges, we propose TransferTraj, a vehicle GPS trajectory learning model that excels in both region and task transferability. For region transferability, we introduce RTTE as the main learnable module within TransferTraj. It integrates spatial, temporal, POI, and road network modalities of trajectories to effectively manage variations in spatial context distribution across regions. It also introduces a TRIE module for incorporating relative information of spatial features and a spatial context MoE module for handling movement patterns in diverse contexts. For task transferability, we propose a task-transferable input-output scheme that unifies the input-output structure of different tasks into the masking and recovery of modalities and trajectory points. This approach allows TransferTraj to be pre-trained once and transferred to different tasks without retraining. Extensive experiments on three real-world vehicle trajectory datasets under task transfer, zero-shot, and few-shot region transfer, validating TransferTraj's effectiveness.

TransferTraj: A Vehicle Trajectory Learning Model for Region and Task Transferability

TL;DR

This work tackles the challenge of learning vehicle trajectories that generalize across regions and tasks without retraining. It introduces TransferTraj, composed of a Region-Transferable Trajectory Encoder (RTTE) and a task-transferable input-output scheme, enabling a single pre-trained model to perform multiple trajectory tasks after minimal adaptation. RTTE fuses spatial, temporal, POI, and road-network modalities and employs Trajectory Relative Information Extraction (TRIE) with a spatio-temporal rotation in attention, plus a Spatial Context Mixture-of-Experts (SC-MoE) to capture context-dependent movement patterns. The task-transferable IO scheme unifies inputs and outputs by masking and recovering modalities or points, allowing effective multi-task pre-training. Experiments across three real-world datasets (Chengdu, Xi’an, Porto) show TransferTraj achieves state-of-the-art performance on trajectory prediction, recovery, and origin-destination travel time estimation in both zero-shot and few-shot region transfers, while remaining parameter-efficient and not requiring retraining for new tasks. These results demonstrate practical impact for ITS applications by reducing model maintenance costs and enabling data-efficient adaptation to new regions and tasks.

Abstract

Vehicle GPS trajectories provide valuable movement information that supports various downstream tasks and applications. A desirable trajectory learning model should be able to transfer across regions and tasks without retraining, avoiding the need to maintain multiple specialized models and subpar performance with limited training data. However, each region has its unique spatial features and contexts, which are reflected in vehicle movement patterns and difficult to generalize. Additionally, transferring across different tasks faces technical challenges due to the varying input-output structures required for each task. Existing efforts towards transferability primarily involve learning embedding vectors for trajectories, which perform poorly in region transfer and require retraining of prediction modules for task transfer. To address these challenges, we propose TransferTraj, a vehicle GPS trajectory learning model that excels in both region and task transferability. For region transferability, we introduce RTTE as the main learnable module within TransferTraj. It integrates spatial, temporal, POI, and road network modalities of trajectories to effectively manage variations in spatial context distribution across regions. It also introduces a TRIE module for incorporating relative information of spatial features and a spatial context MoE module for handling movement patterns in diverse contexts. For task transferability, we propose a task-transferable input-output scheme that unifies the input-output structure of different tasks into the masking and recovery of modalities and trajectory points. This approach allows TransferTraj to be pre-trained once and transferred to different tasks without retraining. Extensive experiments on three real-world vehicle trajectory datasets under task transfer, zero-shot, and few-shot region transfer, validating TransferTraj's effectiveness.
Paper Structure (29 sections, 9 equations, 5 figures, 16 tables)

This paper contains 29 sections, 9 equations, 5 figures, 16 tables.

Figures (5)

  • Figure 1: The framework of TransferTraj.
  • Figure 2: Expect activation distrubition.
  • Figure 3: Hyperparameter analysis of the $d$.
  • Figure 4: Hyperparameter analysis of the $L$.
  • Figure 5: Hyperparameter analysis of the value of $k$ and the number of expert $C$.