[edit]
From Moves to Paths: A Hierarchical Framework for Trajectory Representation Learning
Proceedings of the 42nd Conference on Uncertainty in Artificial Intelligence, PMLR 337:7121-7136, 2026.
Abstract
Trajectory representation learning (TRL) seeks to convert trajectory data into low-dimensional embeddings for various downstream tasks. Existing methods are limited to a single perspective: GPS-based approaches capture dynamic details but lack semantic context, while route-based methods preserve structure but lose fine-grained motion patterns. To address these limitations, we propose a trajectory representation model with multi-perspective fusion, MPH, where \underline{M} denotes the Motion modality (GPS), \underline{P} denotes the planned path modality (Route), and\underline{H} signifies the Hierarchical encoding and fusion strategy. MPH first map-matches raw GPS trajectories to route sequences and designs dedicated encoders to extract dynamic behavioral patterns and static semantic features respectively. Based on this, MPH leverages a cross-attention mechanism for modality interaction and fusion, producing fused route representations that are hierarchically aggregated into trajectory-level embeddings. Furthermore, we introduce two self-supervised tasks to train the model. Contrastive learning is employed to align road segment representations across the two perspectives, while the dual-mask prediction task strengthens contextual modeling by jointly reconstructing masked road segment identities and their corresponding temporal information. Experiments on two real-world datasets show that MPH outperforms all baselines across different tasks.