Efficient Temporal Tokenization for Mobility Prediction with Large Language Models

Haoyu He, Haozheng Luo, Yan Chen, Qi R. Wang

TL;DR

This paper introduces RHYTHM, a novel framework that uses Large Language Models (LLMs) to predict human mobility by tokenizing trajectories into daily segments. This approach significantly reduces computational cost and improves prediction accuracy by effectively capturing daily and weekly movement patterns.

What Problem Does This Paper Address?

Predicting human mobility is a complex task due to the inherent spatio-temporal nature of movement and the intricate dependencies that exist across different time scales (daily, weekly). Existing methods often struggle to balance capturing these multi-scale patterns with computational efficiency. Some approaches neglect long-term periodicity, while others fail to efficiently model complex interdependencies. Furthermore, integrating the rich semantic understanding capabilities of LLMs into mobility prediction without incurring prohibitive computational costs has been a significant challenge. This paper aims to bridge this gap by proposing an efficient method that leverages LLMs for mobility prediction while maintaining computational tractability.

Methods

RHYTHM introduces a novel "Hierarchical Temporal Tokenization" approach. Instead of treating trajectories as continuous streams, it segments them into daily chunks, which are then encoded as discrete tokens. This tokenization, combined with hierarchical attention (intra-segment for local patterns and inter-segment for long-range dependencies), significantly reduces the sequence length and computational complexity.

A key innovation is the enrichment of these token representations with pre-computed prompt embeddings derived from a frozen LLM. This allows RHYTHM to leverage the LLM's reasoning capabilities and semantic understanding without the need for extensive fine-tuning, thus achieving significant computational efficiency. The framework uses a parameter-efficient LLM adaptation strategy, freezing the LLM backbone and only training a small projection head.

Datasets

The paper evaluates RHYTHM on three real-world urban mobility datasets:

  • Kumamoto
  • Sapporo
  • Hiroshima

These datasets consist of anonymized human mobility trajectories, with data discretized into 48 half-hour intervals. The data is partitioned chronologically into training (70%), validation (20%), and test (10%) splits.

Key Insights and Ideas

  • Temporal Tokenization for Efficiency: Breaking down long trajectories into daily, tokenized segments is a highly effective way to manage computational complexity while still capturing essential temporal patterns.
  • Frozen LLMs for Semantic Power: Leveraging pre-trained LLMs in a frozen state is a smart way to inject powerful semantic reasoning capabilities into mobility prediction without the massive computational cost of fine-tuning.
  • Hierarchical Attention is Key: The combination of intra-segment and inter-segment attention allows the model to effectively learn both fine-grained local movements and broader, long-term dependencies.
  • Scalability with LLM Size: RHYTHM's performance scales positively with the size of the LLM backbone, suggesting that larger models can further enhance prediction accuracy, though a balance with resource efficiency is crucial.

Key Results

RHYTHM demonstrates significant improvements over state-of-the-art methods:

  • Accuracy: A 2.4% improvement in overall accuracy.
  • Weekend Performance: A 5.0% increase in accuracy on weekend predictions.
  • Training Time Reduction: A 24.6% reduction in training time.
  • Geographical Evaluation: RHYTHM achieved superior spatial trajectory matching and consistently outperformed baselines in ranking metrics, showing a 1.44% gain over the strongest alternative in MRR.
  • Computational Efficiency: RHYTHM achieves competitive training speeds comparable to other advanced models, even with larger parameter budgets.

Limitations and Future Work

  • LLM Dependency: The model's effectiveness is tied to the quality and resource constraints of the underlying pre-trained LLMs.
  • Non-Autoregressive Prediction: RHYTHM currently uses a non-autoregressive prediction paradigm. The authors suggest exploring autoregressive formulations for temporal sequences as a direction for future development.
  • Training Duration: Despite efficiency gains, RHYTHM's training duration can still be substantial, which might limit its use in highly time-sensitive scenarios.

Future work will focus on developing sophisticated fine-tuning strategies, enhancing model scalability, and exploring parameter-efficient adaptation techniques to further minimize computational requirements.

Summary updated

BibTeX
@inproceedings{he2025efficient,
  author = {Haoyu He and Haozheng Luo and Yan Chen and Qi R. Wang},
  title = {{Efficient Temporal Tokenization for Mobility Prediction with Large Language Models}},
  booktitle = {ES-FoMo-III @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=DCvCv02uNf},
}
Figure