TrajTok: Adaptive Spatial Tokenization for Trajectory Representation Learning
Not on the map. Why?
Abstract (arXiv)
Learning generalizable trajectory representations from raw GPS traces remains difficult because the data is continuous, noisy, and irregularly sampled. Spatial tokenization is also challenging: fine grids yield sparse cells with weak embeddings, while coarse grids merge heterogeneous movement patterns into the same token. We present TrajTok, a trajectory encoder with a simple pretraining recipe for transferable trajectory embeddings. TrajTok first learns a multi-resolution hexagonal cell partition from the spatial distribution of GPS points, converting noisy GPS sequences into discrete cell tokens. To capture both geometry and kinematics, it uses a factorized transformer encoder with early per-modality self-attention blocks, cross-attention fusion layers, and spatiotemporal rotary position embeddings, ST-RoPE, to encode where and when each token occurs. TrajTok is pretrained with masked-token modeling that recovers both geometric structure and kinematic patterns from partial trajectory observations. On the Porto dataset, a frozen TrajTok encoder with lightweight task adapters achieves strong performance across trajectory similarity search, classification, estimated time of arrival, and full travel-time regression, outperforming multiple task-specific methods. The same frozen encoder supports both geometry-dominated and kinematics-dominated tasks, suggesting that TrajTok learns transferable trajectory structure rather than task-specific shortcuts. These results indicate that learned multi-resolution spatial tokenization combined with masked-token pretraining is a promising direction for general-purpose trajectory foundation models.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 16 of its 31 references that are in the map. First posted on arXiv 19 May 2026.
Builds on
16 of 31 references.
References · 16
- 2017Attention Is All You Needcited by 59,932
- 2017Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networkscited by 4,861
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023SatCLIP: Global, General-Purpose Location Embeddings with Satellite Imagerycited by 148
- 2020Multi-Scale Representation Learning for Spatial Feature Distributions using Grid Cellscited by 88
- 2022Self-supervised Trajectory Representation Learning with Temporal Regularities and Travel Semanticscited by 58
- 2022Contrastive Trajectory Similarity Learning with Dual-Feature Attentioncited by 44
- 2021Unsupervised Path Representation Learning with Curriculum Negative Samplingcited by 42
- 2022Pre-training General Trajectory Embeddings with Maximum Multi-view Entropy Codingcited by 25
- 2024More Than Routing: Joint GPS and Route Modeling for Refine Trajectory Representation Learningcited by 20
- 2024SIMformer: Single-Layer Vanilla Transformer Can Learn Free-Space Trajectory Similaritycited by 5
- 2024The Fine Line: Navigating Large Language Model Pretraining with Down-streaming Capability Analysiscited by 4
4 more
- 2026Nexus: Same Pretraining Loss, Better Downstream Generalization via Common Minimacited by 4
- 2023Towards A Foundation Model For Trajectory Intelligencecited by 3
- 2024Trajectory Representation Learning on Road Networks and Grids with Spatio-Temporal Dynamicscited by 2
- 2025Region-Point Joint Representation for Effective Trajectory Similarity Learningcited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.