Multi-step relative motion prediction in dual-ship encounters using a transformer model on AIS data
I Made Dwi Putra Asana, I Made Oka Widyantara, I Putu Noven Hartawan, I Gede Sudiantara, I Made Subrata Sandhiyasa
Key points
From the paper's conclusion- These findings suggest that attention-based temporal modelling is a promising foundation for encounter-aware maritime forecasting and early risk monitoring.
Abstract
Accurate prediction of vessel interaction dynamics is important for intelligent maritime monitoring and data-driven navigation support, particularly in situations where vessel encounters may develop into collision risks. Although AIS-based trajectory prediction has been widely studied, most existing approaches focus on forecasting the absolute trajectory of individual vessels and provide limited attention to the future relative motion between two interacting vessels. This study proposes an encoder-only transformer framework for multi-step relative-motion prediction in dual-ship encounters using Automatic Identification System (AIS) data. Encounter events are extracted from AIS records using DBSCAN-Haversine-based detection and CPA/TCPA screening, then transformed into eight-dimensional relative-motion feature sequences representing relative position, range, relative velocity, TCPA, DCPA, and closing speed. These sequences are converted into supervised sliding-window samples, where the model predicts a four-dimensional future relative-motion state consisting of relative position and relative velocity components over a three-step horizon. The proposed transformer is evaluated against Persistence, LSTM, and GRU baselines using group-aware five-fold cross-validation with repeated random seeds to reduce leakage across encounter episodes. Experimental results show that the transformer achieves the lowest Average Displacement Error (0.479 ± 0.073 nm) and Final Displacement Error (0.602 ± 0.077 nm), reducing ADE by 17.9% and FDE by 15.4% relative to the strongest recurrent baseline. Horizon-wise and qualitative trajectory analyses further indicate that the transformer maintains lower absolute prediction error and better alignment in curved encounter patterns. These findings suggest that attention-based temporal modelling is a promising foundation for encounter-aware maritime forecasting and early risk monitoring.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Kinematic-aware AIS preprocessing and bidirectional recurrent modeling for multi-output vessel trajectory predictionJournal of Big Data · 2026
- Maneuver-Aware Residual Multi-Scale LSTM for Short-Term Vessel Trajectory Prediction in Port-Approach WatersJournal of Marine Science and Engineering · 2026
- Probabilistic Ship Trajectory Forecasting using Transformer Models on AIS DataarXiv · 2026
- LLM4STP: A large language model-driven multi-feature fusion method for ship trajectory predictionTransportation Research Part E Logistics and Transportation Review · 2025
- Ship trajectory prediction method based on heterogeneous spatiotemporal graph neural networksApplied Ocean Research · 2026
- Feature-Wise Linear Modulation-Conditioned Transformer for AIS Trajectory Restoration Incorporating Vessel Geometry and Maneuvering CharacteristicsJournal of Marine Science and Engineering · 2026