# BERT4Traj: Transformer Based Trajectory Reconstruction for Sparse Mobility Data

arXiv: https://arxiv.org/abs/2507.03062 · HTML: https://mlsanity.com/paper/2507.03062/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 2 of its 16 references that are in the map.
- First posted on arXiv 3 Jul 2025.

## Builds on (most cited first, 2 of 2)

- [Multi-Scale Representation Learning for Spatial Feature Distributions using Grid Cells](https://mlsanity.com/paper/2003.00824/) (2020)
- [Inferring Mobility Measures from GPS Traces with Missing Data](https://mlsanity.com/paper/1606.06328/) (2016)

## Built on by (most cited first, 3 of 3)

- [Context-Enriched Natural Language Descriptions of Vessel Trajectories](https://mlsanity.com/paper/2603.12287/) (2026)
- [TrajGANR: Trajectory-Centric Urban Multimodal Learning via Geospatially Aligned Neural Representations](https://mlsanity.com/paper/2605.06990/) (2026)
- [From GPS Points to Travel Patterns: Flexible and Semantic Trajectory Generation with LLMs](https://mlsanity.com/paper/2605.30014/) (2026)

## Abstract (arXiv)

Understanding human mobility is essential for applications in public health, transportation, and urban planning. However, mobility data often suffers from sparsity due to limitations in data collection methods, such as infrequent GPS sampling or call detail record (CDR) data that only capture locations during communication events. To address this challenge, we propose BERT4Traj, a transformer based model that reconstructs complete mobility trajectories by predicting hidden visits in sparse movement sequences. Inspired by BERT's masked language modeling objective and self_attention mechanisms, BERT4Traj leverages spatial embeddings, temporal embeddings, and contextual background features such as demographics and anchor points. We evaluate BERT4Traj on real world CDR and GPS datasets collected in Kampala, Uganda, demonstrating that our approach significantly outperforms traditional models such as Markov Chains, KNN, RNNs, and LSTMs. Our results show that BERT4Traj effectively reconstructs detailed and continuous mobility trajectories, enhancing insights into human movement patterns.
