MSTFormer: Motion Inspired Spatial-temporal Transformer with Dynamic-aware Attention for long-term Vessel Trajectory Prediction

Huimin Qiang,Zhiyuan Guo,Shiyuan Xie,Xiaodong Peng
2023-03-21
Abstract:Incorporating the dynamics knowledge into the model is critical for achieving accurate trajectory prediction while considering the spatial and temporal characteristics of the vessel. However, existing methods rarely consider the underlying dynamics knowledge and directly use machine learning algorithms to predict the trajectories. Intuitively, the vessel's motions are following the laws of dynamics, e.g., the speed of a vessel decreases when turning a corner. Yet, it is challenging to combine dynamic knowledge and neural networks due to their inherent heterogeneity. Against this background, we propose MSTFormer, a motion inspired vessel trajectory prediction method based on Transformer. The contribution of this work is threefold. First, we design a data augmentation method to describe the spatial features and motion features of the trajectory. Second, we propose a Multi-headed Dynamic-aware Self-attention mechanism to focus on trajectory points with frequent motion transformations. Finally, we construct a knowledge-inspired loss function to further boost the performance of the model. Experimental results on real-world datasets show that our strategy not only effectively improves long-term predictive capability but also outperforms backbones on cornering data.The ablation analysis further confirms the efficacy of the proposed method. To the best of our knowledge, MSTFormer is the first neural network model for trajectory prediction fused with vessel motion dynamics, providing a worthwhile direction for future research.The source code is available at <a class="link-external link-https" href="https://github.com/simple316/MSTFormer" rel="external noopener nofollow">this https URL</a>.
Machine Learning
What problem does this paper attempt to address?
The paper aims to address the problem of maritime vessel trajectory prediction, particularly improving accuracy in long-term predictions and during vessel turns. Specifically, the study focuses on the following key points: 1. **Deep Integration of Dynamic Knowledge**: Existing vessel trajectory prediction methods rarely consider the fundamental physical laws of vessel movement (i.e., dynamic knowledge) and instead directly use machine learning algorithms for prediction. The proposed method in this paper attempts to bridge this gap by integrating dynamic knowledge into the neural network model to improve prediction accuracy. 2. **Addressing Long-Term Dependency Issues**: Capturing long-term dependencies is a challenge when dealing with time series data, especially for long-term trajectory prediction. The paper proposes a multi-head dynamic perception self-attention mechanism to focus on frequently changing parts of the trajectory, thereby better modeling long-term dependencies. 3. **Effective Utilization of Spatiotemporal Information**: To mine effective spatial and temporal information from Automatic Identification System (AIS) data, the study designs a data augmentation method called Augmented Trajectory Matrix (ATM) and combines it with a Transformer-based network structure. 4. **Improved Loss Function**: The study also proposes a knowledge-inspired loss function that can correct predicted positions based on a physical motion model according to the prediction results, further enhancing the model's performance. In summary, the main contribution of this paper is the proposal of the MSTFormer model, a new Transformer-based method that not only effectively extracts the time series features of vessel trajectories but also leverages knowledge of vessel dynamic behavior to improve prediction performance. Experimental results show that MSTFormer significantly outperforms existing techniques in long-term prediction capabilities on real-world datasets and performs better in scenarios involving vessel turns.