2512002629
  • Open Access
  • Article

Modeling Spatiotemporal Interactions between Ships for the Trajectory Prediction in Encounter Scenarios

  • Hao Yuan *,   
  • Fei Li,   
  • Xuan Jiang,   
  • Daiwei Yu,   
  • Mengjia Shen

Received: 25 Nov 2025 | Revised: 16 Dec 2025 | Accepted: 24 Dec 2025 | Published: 29 Dec 2025

Abstract

Ship trajectory prediction is crucial for collision avoidance and maritime traffic management. In an encounter scenario, a ship must predict the future states of other ships to take effective collision avoidance actions. However, conventional models often fail to accurately capture the interactions between ships in converging waters, resulting in poor trajectory prediction. This paper proposes a new model, STETC, which combines a Transformer and a convolutional neural network (CNN) into a two-layer encoder–decoder structure. The motion path encoder employs a self-attention mechanism to extract motion features from historical trajectories. The encounter interaction encoder integrates a CNN and self-attention mechanisms to extract interaction features from an artificial potential field generated by ship dynamic parameters. The two decoders then use cross-attention to progressively establish the spatiotemporal relationships between motion and interaction features. Through training, the model learns the interaction patterns between ships and the dynamic development of encounter situations. Real ship trajectory data is used to validate the effectiveness of STETC. Comparison experiments with observation times of 5, 10, and 15 min demonstrate that the STETC model outperformed other models. The case study validates that the STETC model can precisely perceive the motion states of surrounding ships and, leveraging encounter scenarios, generates predicted trajectories that reflect the interactive behaviors of the ships more accurately.

References 

  • 1.

    Liu, T.; Ma, J. Ship Navigation Behavior Prediction Based on AIS Data. IEEE Access 2022, 10, 47997–48008.

  • 2.

    Deng, N.; Xu, J.; Deng, D. Reactive Collision Avoidance Planning for Intelligent Ships. Ship Eng. 2020, 42, 115–121.

  • 3.

    Gao, J.; Sun, C.; Zhao, H.; et al. VectorNet: Encoding HD Maps and Agent Dynamics from Vectorized Representation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 11525–11533.

  • 4.

    Sadeghian, A.; Kosaraju, V.; Sadeghian, A.; et al. SoPhie: An Attentive GAN for Predicting Paths Compliant to Social and Physical Constraints. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 1349–1358.

  • 5.

    Xue, H.; Huynh, D.Q.; Reynolds, M. SS-LSTM: A Hierarchical LSTM Model for Pedestrian Trajectory Prediction. In Proceedings of the 2018 IEEE Winter Conference on Applications of Computer Vision (WACV), Lake Tahoe, NV, USA, 12–15 March 2018; pp. 1186–1194.

  • 6.

    Kosaraju, V.; Sadeghian, A.; Martín-Martín, R.; et al. Social-BiGAT: Multimodal Trajectory Forecasting Using Bicycle-GAN and Graph Attention Networks. Adv. Neural Inf. Process. Syst. 2019, 32.

  • 7.

    Guo, S.; Liu, C.; Guo, Z.; et al. Trajectory Prediction for Ocean Ships Based on K-Order Multivariate Markov Chain. In Wireless Algorithms, Systems, and Applications; Springer: Cham, Switzerland, 2018; pp. 140–150.

  • 8.

    Zhao, S.B.; De-Jun, S.W. Track Prediction of Ship in Controlled Waterway Based on Improved Kalman Filter. J. Comput. Appl. 2012, 32, 3247.

  • 9.

    Liu, J.; Shi, G.; Zhu, K. Ship Trajectory Prediction Model Based on AIS Sensor Data and Adaptive Chaos Differential Evolution Support Vector Regression (ACDE-SVR). Appl. Sci. 2019, 9, 2983.

  • 10.

    Zhang, K. Bayesian Trajectory Prediction for a Hypersonic Gliding Reentry Vehicle Based on Intent Inference. J. Astronaut. 2018, 39, 1258.

  • 11.

    Virjonen, P.; Nevalainen, P.; Pahikkala, T.; et al. Ship Movement Prediction Using k-NN Method. In Proceedings of the 2018 Baltic Geodetic Congress (BGC Geomatics), Olsztyn, Poland, 21–23 June 2018; pp. 304–309.

  • 12.

    Gasparin, A.; Lukovic, S.; Alippi, C. Deep Learning for Time Series Forecasting: The Electric Load Case. CAAI Trans. Intell. Technol. 2022, 7, 1–25.

  • 13.

    Mukherjee, S.; Sadhukhan, B.; Sarkar, N.; et al. Stock Market Prediction Using Deep Learning Algorithms. CAAI Trans. Intell. Technol. 2023, 8, 82–94.

  • 14.

    Tu, E.; Zhang, G.; Rachmawati, L.; et al. Exploiting AIS Data for Intelligent Maritime Navigation: A Comprehensive Survey from Data to Methodology. IEEE Trans. Intell. Transp. Syst. 2017, 19, 1559–1582.

  • 15.

    Ding, M.; Su, W.; Liu, Y.; et al. A Novel Approach on Ship Trajectory Prediction Based on Variational LSTM. In Proceedings of the 2020 IEEE International Conference on Artificial Intelligence and Computer Applications (ICAICA), Dalian, China, 27–29 June 2020; pp. 206–211.

  • 16.

    Liu, H.; Liu, Y.; Li, B.; et al. Ship Abnormal Behavior Detection Method Based on Optimized GRU Network. J. Mar. Sci. Eng. 2022, 10, 249.

  • 17.

    Chen, X.; Wei, C.; Zhou, G.; et al. Automatic Identification System (AIS) Data Supported Ship Trajectory Prediction and Analysis via a Deep Learning Model. J. Mar. Sci. Eng. 2022, 10, 1314.

  • 18.

    Wang, X.; Xiao, Y. A Deep Learning Model for Ship Trajectory Prediction Using Automatic Identification System (AIS) Data. Information 2023, 14, 212.

  • 19.

    Bao, K.; Bi, J.; Gao, M.; et al. An Improved Ship Trajectory Prediction Based on AIS Data Using MHA-BiGRU. J. Mar. Sci. Eng. 2022, 10, 804.

  • 20.

    Bai, S.; Kolter, J.Z.; Koltun, V. An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. arXiv 2018, arXiv:1803.01271.

  • 21.

    Jiang, D.; Shi, G.; Li, N.; et al. TRFM-LS: Transformer-Based Deep Learning Method for Ship Trajectory Prediction. J. Mar. Sci. Eng.2023, 11, 880.

  • 22.

    Zou, B.; Li, W.; Hou, X.; et al. A Framework for Trajectory Prediction of Preceding Target Vehicles in Urban Scenario Using Multi-Sensor Fusion. Sensors 2022, 22, 4808.

  • 23.

    Yang, C.; Pei, Z. Long-Short Term Spatio-Temporal Aggregation for Trajectory Prediction. IEEE Trans. Intell. Transp. Syst. 2023, 24, 4114–4126.

  • 24.

    Zhang, D.; Li, J.; Wu, Q.; et al. Enhance the AIS Data Availability by Screening and Interpolation. In Proceedings of the 2017 4th International Conference on Transportation Information and Safety (ICTIS), Banff, AB, Canada, 8–10 August 2017; pp. 981–986.

  • 25.

    Carion, N.; Massa, F.; Synnaeve, G.; et al. End-to-End Object Detection with Transformers. In Computer Vision-ECCV 2020; Springer: Cham, Switzerland, 2020; pp. 213–229.

  • 26.

    Vaswani, A.; Shazeer, N.; Parmar, N.; et al. Attention Is All You Need. Adv. Neural Inf. Process. Syst. 2017, 30.

  • 27.

    Gupta, A.; Johnson, J.; Fei-Fei, L.; et al. Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018; pp. 2255–2264.

  • 28.

    Lin, Z.; Yue, W.; Huang, J.; et al. Ship Trajectory Prediction Based on the TTCN-Attention-GRU Model. Electronics 2023, 12, 2556.

  • 29.

    Zhou, Y.; Dong, Z.; Bao, X. A Ship Trajectory Prediction Method Based on an Optuna–BILSTM Model. Appl. Sci. 2024, 14, 3719.

  • 30.

    Wu, W.; Chen, P.; Chen, L.; et al. Ship Trajectory Prediction: An Integrated Approach Using ConvLSTM-Based Sequence-to-Sequence Model. J. Mar. Sci. Eng. 2023, 11, 1484.

Share this article:
How to Cite
Yuan, H.; Li, F.; Jiang, X.; Yu, D.; Shen, M. Modeling Spatiotemporal Interactions between Ships for the Trajectory Prediction in Encounter Scenarios. Applied Mathematics and Statistics 2025, 2 (2), 8. https://doi.org/10.53941/ams.2025.100008.
RIS
BibTex
Copyright & License
article copyright Image
Copyright (c) 2025 by the authors.