Large Language Models are Zero-Shot Next Location Predictors

Ciro Beneduce, Bruno Lepri, Massimiliano Luca · DOI

TL;DR

Researchers have discovered that Large Language Models (LLMs) like GPT-4o and Llama 3 are remarkably effective at predicting an individual's next destination without any task-specific training. By leveraging their internal geographical and reasoning capabilities, these models outperform traditional, specialized deep learning models by up to 640% in zero-shot scenarios, while also providing human-readable explanations for their predictions.

What Problem Does This Paper Address?

Next-location prediction (NL) is a cornerstone of urban planning, disease control, and traffic management. Historically, this has been handled by specialized Deep Learning (DL) architectures (like LSTMs or Transformers) trained on massive amounts of individual mobility data.

However, these traditional models face two major hurdles:

  1. The Cold-Start Problem: They require extensive historical data for a specific user or city to function.
  2. Geographic Non-Transferability: A model trained on New York City mobility patterns often fails miserably when deployed in Tokyo because it lacks a general understanding of "how cities work" or "how humans move" independent of specific coordinates.

The authors investigate whether LLMs—which are pre-trained on vast amounts of world knowledge—can bypass these issues by acting as "zero-shot" predictors, requiring no fine-tuning on mobility datasets.

Methods

The researchers evaluated over 15 LLMs (including the Llama series, Mistral, and GPT-3.5/4/4o) against six state-of-the-art deep learning baselines (such as MobTCast and STAN).

The core approach involved structured prompting:

  • Input: The model is given a user's "Historical Stays" (long-term patterns) and "Contextual Stays" (the most recent movements), including timestamps and days of the week.
  • Task: Predict the top 5 most likely next location IDs.
  • Output: The models were asked to return a JSON object containing the predictions and a text-based "reason" for the choice.

The team also performed ablation studies by varying the amount of historical data provided and tested different prompting strategies: zero-shot (no examples), one-shot (one example), and few-shot (multiple examples).

Datasets

The study utilized three real-world mobility datasets:

  1. Foursquare NYC: Publicly available check-in data from New York City.
  2. Foursquare Tokyo: Publicly available check-in data from Tokyo.
  3. Ferrara (Private): A private dataset of GPS trajectories from cyclists in Ferrara, Italy.

The inclusion of the private Ferrara dataset was a critical methodological choice to ensure that the LLMs weren't simply "memorizing" public datasets found on the internet (data contamination).

Key Insights and Ideas

  • The Transferability Gap: The authors confirmed that traditional DL models are "brittle." A model trained in NYC and tested in Tokyo achieved an Accuracy@5 of only ~4%.
  • LLMs as "World Models": LLMs possess latent geographical knowledge. They don't just see location IDs as random strings; they seem to understand the temporal rhythms of human life (e.g., "people go home at night" or "people visit cafes at lunch").
  • History Matters More than Context: Providing more long-term historical visits (H) improved performance significantly more than providing more recent contextual visits (C).
  • In-Context Learning (ICL) is a Double-Edged Sword: While one-shot prompting helped some models, few-shot prompting actually degraded performance for smaller models like Llama 2 13B. Larger models (GPT-4o, Llama 3 70B) remained robust across all prompting styles.
  • Explainability: Unlike "black-box" DL models, LLMs could explain why they made a prediction (e.g., "The user frequently visits this place on weekends").

Key Results

  • Superior Accuracy: The best-performing model, Llama 3 70B Instruct, achieved an Accuracy@5 of 36.2% in NYC.
  • Massive Relative Gains: Compared to traditional DL models tested in a zero-shot/transfer setting, LLMs showed a relative improvement of nearly 640% in NYC and over 750% in Tokyo.
  • Robustness to Contamination: Performance on the private Ferrara dataset was comparable to the public datasets, suggesting the models are truly reasoning rather than just recalling training data.
  • Model Size Correlation: Generally, bigger is better. Models with 70B+ parameters significantly outperformed 7B or 8B versions.

Limitations and Future Work

Despite the impressive gains, the authors note several challenges:

  • Reliability: An accuracy of ~34-36% is a breakthrough for zero-shot tasks but is still not high enough for critical safety applications like disaster response.
  • Hallucinations: LLMs occasionally "hallucinated" location IDs—generating strings that looked like valid IDs but didn't exist in the provided history.
  • Cost and Latency: Querying high-end LLMs via API is expensive and slower than running a small, specialized local model.
  • Bias: LLMs may inherit demographic or geographical biases from their training data, potentially leading to less accurate predictions for certain groups.

Future Direction: The authors suggest that "Retrieval-Augmented Generation" (RAG)—allowing the LLM to access external databases of location types (e.g., knowing an ID represents a "grocery store")—could further boost performance and reduce hallucinations.

Summary updated

BibTeX
@article{beneduce2025large,
  author = {Ciro Beneduce and Bruno Lepri and Massimiliano Luca},
  title = {{Large Language Models are Zero-Shot Next Location Predictors}},
  journal = {IEEE Access},
  year = {2025},
  doi = {10.1109/access.2025.3565297},
}
Figure