Skip to main content
QUICK REVIEW

[Paper Review] ShipTraj-R1: Reinforcing Ship Trajectory Prediction in Large Language Models via Group Relative Policy Optimization

Yang Zhan, Yunhao Li|arXiv (Cornell University)|Mar 3, 2026
Maritime Navigation and SafetyEngineering0 citations
TL;DR

ShipTraj-R1 reformulates ship trajectory prediction as a text-to-text generation task using an LLM with adaptive chain-of-thought, reinforced by group relative policy optimization to achieve state-of-the-art accuracy on real AIS datasets.

ABSTRACT

Recent advancements in reinforcement fine-tuning have significantly improved the reasoning ability of large language models (LLMs). In particular, methods such as group relative policy optimization (GRPO) have demonstrated strong capabilities across various fields. However, applying LLMs to ship trajectory prediction remains largely unexplored. In this paper, we propose ShipTraj-R1, a novel LLM-based framework that reformulates ship trajectory prediction as a text-to-text generation problem. (1) We design a dynamic prompt containing trajectory information about conflicting ships to guide the model to achieve adaptive chain-of-thought (CoT) reasoning. (2) We introduce a comprehensive rule-based reward mechanism to incentivize the reasoning format and prediction accuracy of the model. (3) Our ShipTraj-R1 is reinforced through the GRPO mechanism guided by domain-specific prompts and rewards, and utilizes the Qwen3 as the model backbone. Extensive experimental results on two complex and real-world maritime datasets show that the proposed ShipTraj-R1 achieves the least error compared with state-of-the-art deep learning and LLM-based baselines.

Motivation & Objective

  • Motivate accurate ship trajectory prediction for collision avoidance in dense maritime environments.
  • Reformulate numerical trajectory prediction as an LLM text-to-text generation problem with CoT reasoning.
  • Introduce a rule-based reward and GRPO-based reinforcement fine-tuning to improve reasoning quality and coordinate accuracy.
  • Evaluate on real-world AIS datasets to benchmark against DL and other LLM-based methods.

Proposed method

  • Reformulate trajectory prediction as text-to-text generation with explicit CoT rationale and predicted coordinates.
  • Design a dynamic prompt that includes conflicting ships context and a quaternion ship domain (QSD) based conflict detection.
  • Develop a rule-based reward function to enforce thinking format and coordinate accuracy.
  • Apply GRPO for reinforcement fine-tuning to optimize the policy with respect to the reward signal.
  • Use Qwen3-8B as the backbone model and validate via RL post-training (VLM-R1) setup.

Experimental results

Research questions

  • RQ1Can an LLM with adaptive CoT reasoning improve precision and safety in ship trajectory prediction over traditional DL and prior LLM approaches?
  • RQ2Does incorporating conflicting-ship context and a rule-based reward via GRPO yield statistically significant improvements in FDE and ADE on real AIS data?
  • RQ3Is the framework robust across different observation/prediction horizons (T_obs, T_pred) and maritime regions?
  • RQ4Does the prompt design and conflict-detection mechanism meaningfully influence predictive accuracy and interpretability of the model?

Key findings

  • ShipTraj-R1 achieves the lowest FDE and ADE across CSJP and CFDP datasets among all baselines evaluated.
  • On CFDP, ShipTraj-R1-8B reduces FDE from Traj-LLM’s 0.000674 to 0.000311 and ADE from 9.6587e-06 to 3.8912e-07.
  • Reinforcement fine-tuning with GRPO and the CoT-enabled prompts substantially outperform SFT baselines and non-CoT variants.
  • Including conflicting-ship context in prompts is crucial for performance, as ablations show a notable drop when omitted.
  • Optimal performance is achieved with a small KL regularization term (KL coef ~1e-4) and with CoT enabled.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.