🤖 AI Summary
Trajectory prediction for safety-critical applications—such as autonomous driving and social robotics—suffers from low accuracy, poor generalization, limited interpretability, and high computational overhead. To address these challenges, we propose an LLM-driven evolutionary framework that enables end-to-end learnable design of trajectory prediction heuristics: a large language model (LLM) automatically generates and iteratively refines heuristic rules via evolutionary optimization. Our approach introduces two key innovations: (i) cross-generational elite sampling to preserve population diversity, and (ii) a closed-loop prompt optimization mechanism grounded in statistical feedback, enabling the LLM to dynamically refine subsequent rule generation based on historical prediction performance. Extensive experiments on multiple real-world benchmarks demonstrate that our method significantly outperforms conventional handcrafted heuristics and state-of-the-art deep learning models—especially under out-of-distribution (OOD) conditions—while achieving superior efficiency, interpretability, and robustness.
📝 Abstract
Trajectory prediction is a critical task in modeling human behavior, especially in safety-critical domains such as social robotics and autonomous vehicle navigation. Traditional heuristics based on handcrafted rules often lack accuracy and generalizability. Although deep learning approaches offer improved performance, they typically suffer from high computational cost, limited explainability, and, importantly, poor generalization to out-of-distribution (OOD) scenarios. In this paper, we introduce TrajEvo, a framework that leverages Large Language Models (LLMs) to automatically design trajectory prediction heuristics. TrajEvo employs an evolutionary algorithm to generate and refine prediction heuristics from past trajectory data. We propose two key innovations: Cross-Generation Elite Sampling to encourage population diversity, and a Statistics Feedback Loop that enables the LLM to analyze and improve alternative predictions. Our evaluations demonstrate that TrajEvo outperforms existing heuristic methods across multiple real-world datasets, and notably surpasses both heuristic and deep learning methods in generalizing to an unseen OOD real-world dataset. TrajEvo marks a promising step toward the automated design of fast, explainable, and generalizable trajectory prediction heuristics. We release our source code to facilitate future research at https://github.com/ai4co/trajevo.