Large Language Models for Travel Behavior Prediction

Baichuan Mo, Hanyong Xu, Ruoyun Ma, Jung-Hoon Cho, Dingyi Zhuang, Xiaotong Guo, Jinhua Zhao

TL;DR

This paper demonstrates that Large Language Models (LLMs) can predict human travel behavior—such as choosing between a car or a train—using natural language reasoning rather than just traditional numerical crunching. By leveraging zero-shot prompting and text embeddings, LLMs achieve performance comparable to classical models and significantly outperform them in "data-scarce" scenarios where only a few training examples are available.

What Problem Does This Paper Address?

Predicting travel behavior (e.g., "Will this person take the bus or drive?") is fundamental to urban planning and transportation management. Traditionally, this is done using discrete choice models like Multinomial Logit (MNL) or machine learning models like Random Forests.

However, these traditional methods face two major hurdles:

  1. Data Hunger: They require large, high-quality datasets to calibrate accurately. In new cities or for emerging transport modes (like air taxis), such data doesn't exist.
  2. The "Black Box" Problem: While neural networks are accurate, they don't explain why a person made a choice.

The authors investigate whether LLMs, with their vast "world knowledge" and reasoning capabilities, can act as a flexible, data-efficient alternative that provides human-readable explanations for its predictions.

Methods

The researchers proposed two distinct frameworks for using LLMs in travel prediction:

  1. Framework 1: Zero-Shot Prompting: The LLM is given a detailed text description of a travel scenario (e.g., travel times, costs, and traveler attributes) and asked to predict the outcome directly. No task-specific training is involved. The authors emphasize "Prompt Engineering," including a "Guide of Thinking" that provides the LLM with domain knowledge (e.g., "people generally prefer saving time and money") and pre-calculated comparisons to help with arithmetic.
  2. Framework 2: LLM Embeddings as Features: The LLM converts the text description of a trip into a high-dimensional vector (embedding). This embedding, which captures complex semantic relationships, is then used as an input feature for a traditional supervised model (like a Random Forest).
Figure 1: Conceptual framework

Datasets

The study evaluated these frameworks on two well-known datasets:

  • Swissmetro: A stated-preference survey from Switzerland where respondents choose between Train, Car, and a hypothetical maglev system (Swissmetro).
  • 2017 US National Household Travel Survey (NHTS): Used for predicting trip purposes (e.g., working, social, shopping) based on socio-demographic data.

The models were tested in both "large-sample" (1,000 training points) and "small-sample" (only 10 training points) settings to test their robustness.

Key Insights and Ideas

  • Domain Knowledge is a Force Multiplier: For zero-shot models, simply providing the LLM with basic transportation logic (e.g., "Regular train users prefer to use the train") significantly boosts accuracy.
  • LLMs Need Arithmetic Help: LLMs are notoriously bad at raw math. The authors found that providing pre-calculated relative differences (e.g., "Choosing Swissmetro saves 39% travel time compared to Car") was critical for the model to weigh time vs. cost correctly.
  • Semantic Richness: LLM embeddings proved to be superior to manually engineered features in low-data regimes. They capture nuances in traveler descriptions that a simple binary "Yes/No" variable might miss.
  • GPT-4 vs. GPT-3.5: GPT-4 showed remarkable robustness. While GPT-3.5's performance dropped significantly if the prompt was poorly structured, GPT-4 maintained high accuracy regardless of the prompt format, suggesting it has "internalized" much of the necessary reasoning.
Figure 3: Example prompts for including travel characteristics

Key Results

  • Zero-Shot Competitiveness: In the Swissmetro task, zero-shot LLMs (GPT-3.5) achieved an accuracy of 0.586, which is remarkably close to the 0.605 achieved by a Multinomial Logit model trained on 1,000 samples.
  • Small-Data Dominance: When training data was limited to just 10 samples, traditional models failed (MNL accuracy dropped to 0.469). In contrast, the zero-shot LLM maintained its performance, effectively "winning" the cold-start challenge.
  • Hybrid Success: Combining LLM embeddings with traditional models consistently improved performance in small-sample settings, with accuracy gains of 3-7% across different model types.

Limitations and Future Work

Despite the promising results, the authors highlight several challenges:

  • Hallucinations: In some cases, the LLM provided "reasonable-sounding" explanations that were based on information not present in the input (e.g., assuming a person prefers time-saving when no such attribute was listed).
  • Computational Cost: Running every prediction through a massive LLM is significantly more expensive and slower than running a simple mathematical equation.
  • Scope: This study focused on mode choice and trip purpose. Future work is needed to see if LLMs can handle more complex tasks like route choice or activity scheduling.

The authors conclude that while LLMs might not replace traditional models for large-scale, data-rich applications yet, they are a powerful new tool for scenarios where data is scarce and interpretability is paramount.

Summary updated

BibTeX
@misc{mo2023large,
  author = {Baichuan Mo and Hanyong Xu and Ruoyun Ma and Jung-Hoon Cho and Dingyi Zhuang and Xiaotong Guo and Jinhua Zhao},
  title = {{Large Language Models for Travel Behavior Prediction}},
  year = {2023},
  eprint = {2312.00819},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.00819},
}
Figure