W2W: Language-Model-Based Trajectory Prediction with Reinforcement Learning
Zirui Xu, Biao Yang, Rongrong Ni, Zhongkai Zhou, Shaobo Shen
Abstract
Pedestrian trajectory prediction is crucial for applications such as autonomous driving and social robots. Recently, language model (LM)-based trajectory prediction has offered both prediction accuracy and interpretability. However, the L2 loss commonly used in trajectory prediction cannot be directly applied to LM optimization, resulting in degraded prediction performance. Moreover, current LMbased trajectory prediction methods lack explicit expressions of social interactions, and their scene descriptions are overly simplistic, making it challenging to impose practical scene constraints. To address these issues, we propose Write-to-Walk (W2W). First, we convert observed trajectories and interaction cues (companion/following/obstacle) into parsable textual prompts, so that interaction semantics are expressed more explicitly in the model input. Afterward, a T5-Small backbone is trained in a two-stage manner: (1) Full-parameter supervised fine-tuning with cross-entropy loss for language learning, enabling formatted question answering; (2) Reinforcement Learning (RL) to optimize W2W, where a reward function combining ADE error and off-road penalties strengthens scene constraints, producing future trajectories consistent with the scene context and further improving prediction accuracy. Experiments on benchmark datasets (ETH/UCY and SDD) demonstrate that W2W remains competitive with recent LM-based prediction methods and strong trajectory prediction baselines on ADE/FDE. The interpretability of LMs further supports W2W's deployment in safety-critical domains such as autonomous driving. Code is available at https: //github.com/VoyagerXu21/W2W .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 68ad8287-ab44-41cd-9192-85e3b5ed9fdfBuilds on21
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Time-LLM: Time Series Forecasting by Reprogramming Large Language ModelsMing Jin, Shiyu Wang, Lintao Ma, Zhixuan Chu et al.ICLR 2024 · 915 citations
- Large Language Models Are Zero-Shot Time Series ForecastersNate Gruver, Marc Finzi, Shikai Qiu, Andrew Gordon WilsonNeurIPS 2023 · 898 citations
- AgentFormer: Agent-Aware Transformers for Socio-Temporal Multi-Agent ForecastingYe Yuan, Xinshuo Weng, Yanglan Ou, Kris KitaniICCV 2021 · 658 citations
- UniLMv2: Pseudo-Masked Language Models for Unified Language Model Pre-TrainingHangbo Bao, Li Dong, Furu Wei, Wenhui Wang et al.ICML 2020 · 423 citations
Related papers
- Can Language Beat Numerical Regression? Language-Based Multimodal Trajectory PredictionInhwan Bae, Junoh Lee, Hae-Gon JeonCVPR 2024
- AutoTraces: Autoregressive Trajectory Forecasting via Multimodal Large Language ModelsTeng Wang, Yanting Lu, Ruize WangCVPR 2026
- TrajEvo: Trajectory Prediction Heuristics Design via LLM-driven EvolutionZhikai Zhao, Chuanbo Hua, Federico Berto, Kanghoon Lee et al.AAAI 2026 · 2 citations
- Driving with Advice: Large Model as Motion Advisor for Joint PlanningJunyin Wang, Jinlei Yu, Hao Lin, Huikai Liu et al.AAAI 2026
- Trajectory-LLM: A Language-based Data Generator for Trajectory Prediction in Autonomous DrivingKairui Yang, Zihao Guo, Gengjie Lin, Haotian Dong et al.ICLR 2025
