Zero-Shot Human Mobility Forecasting via Large Language Model with Hierarchical Reasoning

Wenyao Li, Ran Zhang, Pengyang Wang, Yuanchun Zhou, Pengfei WangarXiv 2025 · DOI

Abstract

Predicting human mobility is a fundamental challenge in urban computing, often hindered by data sparsity and the "cold-start" problem for new users. This paper presents ZHMF (Zero-Shot Human Mobility Forecasting), a novel framework that leverages frozen Large Language Models (LLMs) to predict next-location check-ins. By employing a hierarchical reasoning process—decoupling activity intent from specific location selection—and a retrieval-augmented reflective memory system, ZHMF achieves state-of-the-art performance in zero-shot and cold-start scenarios without any model fine-tuning.

Introduction

Next Point-of-Interest (POI) recommendation is critical for applications ranging from traffic management to personalized location-based services. Traditional deep learning approaches, such as Recurrent Neural Networks (RNNs) and Graph Neural Networks (GNNs), typically require extensive historical data to learn user-specific embeddings. These models often fail when data is sparse or when encountering entirely new users. While LLMs offer a promising alternative by treating mobility as a natural language task, they often struggle with the spatial constraints and complex decision-making inherent in human movement.

Methodology: The ZHMF Framework

The ZHMF framework treats mobility forecasting as a natural language question-answering task using a frozen LLM (specifically Meta-Llama-3-8B-Instruct). It introduces two core innovations: hierarchical reasoning and a reflective memory system.

Hierarchical Reasoning and Planning

Instead of directly predicting a specific POI from a vast candidate set, ZHMF mimics human cognitive processes by breaking the decision into two distinct stages:

  1. Activity-Level Planner: The model first predicts the broad category of the user's next activity (e.g., "Restaurant", "Shopping Mall").
  2. Location-Level Selector: Once the category is determined, the model selects the specific POI (e.g., "McDonald's") based on spatial proximity, historical preferences, and recent trajectories.

This decomposition significantly reduces the search space and improves the model's interpretability.

Retrieval-Augmented Reflective Memory

To enable the frozen LLM to learn from past behavior without fine-tuning, ZHMF maintains a database of "reflections." When the model makes an incorrect prediction, it generates a natural language explanation of the error (e.g., "The user prefers local cafes over chains in the morning"). During future inference, the system retrieves the most relevant past reflections using sentence embeddings and includes them in the prompt context. This allows the model to adapt to specific user patterns and general mobility trends dynamically.

Experimental Evaluation

The authors evaluated ZHMF on three benchmark datasets: Foursquare-NYC, Foursquare-TKY, and Gowalla-CA. The data was preprocessed into 24-hour trajectory sequences, filtering for users with at least 10 check-ins to establish a baseline for comparison.

Key Results

ZHMF consistently outperformed state-of-the-art baselines, including both traditional deep learning models (like STAN) and recent LLM-based approaches (like LLMMob).

  • Accuracy: On the Foursquare-NYC dataset, ZHMF achieved an Acc@1 of 34.37% and a Mean Reciprocal Rank (MRR) of 45.96%.
  • Zero-Shot Performance: In tests where 30% of users were completely unseen during the memory-building phase, ZHMF maintained high accuracy, demonstrating robust generalization capabilities.
  • Ablation Study: Removing the reflection mechanism led to a significant drop in Acc@1 (from 34.37% to 28.66%), while removing the hierarchical reasoning dropped it to 31.85%, highlighting the importance of both components.

Discussion and Future Work

The success of ZHMF suggests that semantic understanding and structured reasoning can compensate for the lack of dense historical data. The model's ability to handle "cold-start" users makes it particularly valuable for real-world applications where user data is often fragmented.

However, limitations remain. LLMs can occasionally produce hallucinations or repetitive outputs. Furthermore, generalizing across vastly different geographic domains (e.g., from a dense city like NYC to a rural area) remains a challenge due to varying category definitions. Future research will focus on enhancing the model's spatial reasoning, optimizing memory retrieval for real-time use, and incorporating additional contextual factors like weather and real-time traffic data.

Conclusion

ZHMF demonstrates that large language models, when guided by hierarchical reasoning and a reflective memory system, can effectively solve complex human mobility forecasting tasks in a zero-shot manner. This approach paves the way for more flexible and interpretable location-based services that do not rely on massive, user-specific training datasets.

Summary updated

BibTeX
@misc{li2025zero,
  author = {Wenyao Li and Ran Zhang and Pengyang Wang and Yuanchun Zhou and Pengfei Wang},
  title = {{Zero-Shot Human Mobility Forecasting via Large Language Model with Hierarchical Reasoning}},
  year = {2025},
  eprint = {2509.16578},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.16578},
}
Figure