A vessel trajectory prediction method based on an improved transformer architecture
Abstract
To address the limitations of temporal dependency modeling and the inadequate fusion of long-term information in vessel trajectory prediction, this paper proposes a vessel trajectory prediction model based on an improved Transformer architecture. The proposed model adopts a hybrid architecture that integrates LSTM and Transformer attention mechanisms. Specifically, a single-layer LSTM is first employed to extract sequential features and generate a sequence feature tensor. Subsequently, a standard Transformer self-attention sublayer is introduced to perform global modeling and attention-based weighting on the feature sequence extracted by the LSTM. Residual connections and layer normalization are employed to enhance model stability. Then, a two-layer feed-forward network (FFN), consisting of two Dense layers, is applied to perform nonlinear transformations on the features. The output is again processed with residual connections and normalization, forming a complete Transformer encoder structure. Finally, a GlobalAveragePooling1D layer is applied along the temporal dimension to smooth the sequence, and a Dense layer outputs the next-step predictions for longitude (lon), latitude (lat), speed over ground (sog), and course over ground (cog). To validate the effectiveness of the proposed model, comparative experiments are conducted against conventional GRU, LSTM, and the vanilla Transformer models. Experimental results demonstrate that the proposed approach outperforms the baselines across multiple evaluation metrics, exhibiting superior trajectory-modeling capability and prediction accuracy, and thereby significantly enhancing vessel trajectory forecasting performance.
Fields of Study & Subjects
Maritime Navigation and Safety
Maritime Transport Emissions and Efficiency
Oceanographic and Atmospheric Processes
Publication details
- Pages
- 14–14
- Publication date
- 8 January 2026