Can Language Beat Numerical Regression? Language-Based Multimodal Trajectory Prediction

Inhwan Bae, Junoh Lee, Hae-Gon Jeon

Introduction

Predicting pedestrian movement is a fundamental challenge for autonomous systems, from self-driving cars to social robots. Traditionally, this problem has been framed as a numerical regression task: models ingest a sequence of $(x, y)$ coordinates and attempt to map them to a future spatial sequence. While effective at modeling basic physics, traditional regression models—such as LSTMs or Graph Neural Networks—often struggle to capture the nuanced "social reasoning" that governs human behavior. Humans do not move in isolation; we walk in groups, avoid obstacles, and adhere to unspoken social norms.

This paper introduces LMTraj (Language-based Multimodal Trajectory predictor), a framework that shifts the paradigm from numerical regression to a natural language question-answering task. By leveraging the reasoning capabilities of Large Language Models (LLMs), LMTraj demonstrates that treating coordinates as text can lead to more socially aware and accurate trajectory predictions.

The LMTraj Framework

LMTraj bridges the gap between the precision of numerical data and the reasoning power of language models through four primary innovations:

1. Data-to-Prompt Conversion

To make trajectory data digestible for an LLM, raw coordinates are transformed into text strings (e.g., [(6.73, 6.34), (6.94, 6.58), ...]). To incorporate environmental context, the researchers utilize BLIP-2, a pre-trained vision-language model, to generate descriptive text of the scene. This allows the model to "understand" that a pedestrian is walking near a specific landmark or navigating a crowded sidewalk.

2. Optimized Numerical Tokenization

Standard NLP tokenizers are notoriously poor at handling numbers, often splitting decimals inconsistently (e.g., "12.34" might be tokenized as "12", ".", and "34"). LMTraj employs a custom tokenizer specifically trained for numerical data. This ensures that integers and decimals are handled cleanly, allowing the model to learn the sequential and mathematical relationships between coordinates more effectively.

3. Multi-task Social Reasoning

To instill social awareness, the model is trained on auxiliary tasks. Beyond simply predicting the next coordinate, the model is asked to answer questions regarding the social context, such as "Is this person part of a group?" or "Is there a potential collision risk?" This multi-task learning approach encourages the model to internalize social norms during the prediction process.

4. Multimodal Inference

Human movement is inherently uncertain—a person might turn left, right, or stop. LMTraj addresses this by using Beam Search to identify the most likely paths and Temperature Tuning to generate a diverse set of 20 possible future trajectories, capturing the multimodal nature of human intent.

Experimental Setup and Results

The researchers evaluated two versions of the model:

  • LMTraj-ZERO: A zero-shot approach using GPT-3.5 and GPT-4.
  • LMTraj-SUP: A supervised version using a fine-tuned T5 encoder-decoder architecture.

Testing was conducted across four major benchmarks: ETH, UCY, the Stanford Drone Dataset (SDD), and Grand Central Station (GCS).

Performance Highlights

  • State-of-the-Art Accuracy: LMTraj-SUP outperformed specialized numerical models like Social-STGCNN and AgentFormer. On the ETH dataset, it achieved an Average Displacement Error (ADE) of 0.65m, a significant improvement over previous regression-based methods.
  • Zero-Shot Capabilities: Surprisingly, LMTraj-ZERO (using GPT-4) outperformed traditional baselines like Linear regression and Kalman filters without any specific training on trajectory data. This suggests that the "world models" within large LLMs already possess a foundational understanding of human kinematics.
  • Social Awareness: Qualitative analysis showed that LMTraj consistently predicted "socially acceptable" paths, such as maintaining distance in pairs or slowing down to avoid collisions in congested areas like Grand Central Station.

Discussion and Limitations

While LMTraj represents a significant step forward, it faces practical challenges:

  • Inference Latency: Because LLMs generate tokens autoregressively, they are slower than direct regression models. LMTraj averages 18.3ms per trajectory, compared to 8.2ms for the fastest specialized models. While still viable for many real-time applications, this latency may be a constraint for high-speed robotics.
  • Precision Trade-offs: To keep prompts manageable, coordinates are rounded to two decimal places. While sufficient for pedestrian navigation, tasks requiring extreme precision (e.g., surgical robotics) might find this limiting.

Conclusion

LMTraj demonstrates that the "grammar of movement" can be effectively modeled using the same architectures that power modern natural language processing. By fixing the numerical bottleneck through custom tokenization and incorporating social reasoning tasks, language models can not only compete with but beat traditional numerical regression in predicting complex human behavior. Future work will likely focus on optimizing these models for edge devices and exploring even larger foundation models to further refine movement reasoning.

Summary updated

BibTeX
@inproceedings{bae2024can,
  author = {Inhwan Bae and Junoh Lee and Hae-Gon Jeon},
  title = {{Can Language Beat Numerical Regression? Language-Based Multimodal Trajectory Prediction}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure