MESTR: A Multi-Task Enhanced Ship-Type Recognition Model Based on AIS
Abstract
:1. Introduction
- We propose a multi-task enhanced ship-type recognition method based on the Transformer model, utilizing self-attention mechanisms to capture long-range dependency associations in trajectory sequences.
- To enhance the model’s deep feature extraction of complex ship movement patterns, we combine two training tasks, trajectory segment mask prediction and ship-type prediction, to further improve the model’s recognition capability.
- We propose a motion-pattern-aware segment masking strategy, which masks local trajectory segments with complex dynamic features to more effectively extract detailed spatiotemporal features of the trajectory, thereby improving the model’s adaptability and recognition ability for different trajectory patterns.
- We have tested on real datasets and compared with baseline methods to verify the effectiveness of MESTR.
2. Related Work
2.1. Image-Based Ship-Type Recognition
2.2. AIS-Based Ship-Type Recognition
3. Methods
3.1. Concept Definitions
3.2. Model Structure
4. Experiments
4.1. Experimental Setup
4.1.1. Dataset and Metrics
- Spatial filtering and outlier removal: Remove trajectory points outside the study area. Eliminate drift points in the trajectory based on a maximum speed threshold of 30 knots. Remove sampling points with missing or abnormal values in the fields “MMSI”, “longitude”, “latitude”, “time”, and “shiptype”. Linear interpolation is then applied to fill in the missing segments, and the processed trajectories are subsequently grouped by MMSI.
- Trajectory segmentation: First, segment the trajectory at points where the time interval between consecutive records exceeds 1 h. Then, segment the trajectory with a maximum length of 10 h.
- Downsampling: Reduce the trajectory sampling rate to 10 min.
- Length filtering: Remove trajectories with lengths less than or equal to 3 h.
4.1.2. Baseline
- MLP [27]: A multi-layer perceptron (MLP) is used to encode trajectories and predict ship types. This method does not consider the temporal features of trajectories and relies solely on the static information of each trajectory point for classification. We employed a 3-layer MLP, with each layer consisting of 64 neurons, using ReLU as the activation function.
- vanilla GRU [28]: GRU is a variant of the recurrent neural network (RNN) that simplifies the structure of the LSTM (long short-term memory) network. It controls information updates and forgetting through gating mechanisms, improving computational efficiency and reducing model complexity. We used a 3-layer GRU, with each layer containing 64 units.
- vanilla Transformer [25]: The Transformer models global trajectory information through self-attention mechanisms, overcoming the difficulty of RNN structures in capturing long-distance dependencies. We employed an 8-layer Transformer encoder, with each layer including 8 attention heads, a hidden layer dimension set to 64, and GELU as the activation function.
4.1.3. Implementation Details
4.2. Result Analysis
4.3. Visualization Analysis
4.4. Ablation Study
5. Discussion
5.1. Comparison with Existing Studies
5.2. Limitations
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Wolsing, K.; Roepert, L.; Bauer, J.; Wehrle, K. Anomaly detection in maritime AIS tracks: A review of recent approaches. J. Mar. Sci. Eng. 2022, 10, 112. [Google Scholar] [CrossRef]
- Chen, X.; Hu, R.; Luo, K.; Wu, H.; Biancardo, S.A.; Zheng, Y.; Xian, J. Intelligent ship route planning via an A search model enhanced double-deep Q-network. Ocean Eng. 2025, 327, 120956. [Google Scholar] [CrossRef]
- Wang, D.; Jing, Y. Ship collision risk analysis in port waters integrating GRA algorithm and BPNN. Transp. Saf. Environ. 2025, tdaf012. [Google Scholar] [CrossRef]
- Kessler, G.C.; Zorri, D.M. AIS Spoofing: A Tutorial for Researchers. In Proceedings of the 2024 IEEE 49th Conference on Local Computer Networks (LCN), Normandy, France, 8–10 October 2024; pp. 1–7. [Google Scholar] [CrossRef]
- Zhang, B.; Ren, H.; Wang, P.; Wang, D. Research progress on ship anomaly detection based on big data. In Proceedings of the 2020 IEEE 11th International Conference on Software Engineering and Service Science (ICSESS), Beijing, China, 16–18 October 2020; pp. 316–320. [Google Scholar] [CrossRef]
- Huang, L.; Li, W.; Chen, C.; Zhang, F.; Lang, H. Multiple features learning for ship classification in optical imagery. Multimed. Tools Appl. 2018, 77, 13363–13389. [Google Scholar] [CrossRef]
- Leclerc, M.; Tharmarasa, R.; Florea, M.C.; Boury-Brisset, A.C.; Kirubarajan, T.; Duclos-Hindié, N. Ship classification using deep learning techniques for maritime target tracking. In Proceedings of the 2018 21st International Conference on Information Fusion (FUSION), Cambridge, UK, 10–13 July 2018; pp. 737–744. [Google Scholar] [CrossRef]
- Bentes, C.; Velotto, D.; Tings, B. Ship classification in TerraSAR-X images with convolutional neural networks. IEEE J. Ocean. Eng. 2017, 43, 258–266. [Google Scholar] [CrossRef]
- Yang, D.; Wu, L.; Wang, S. Can we trust the AIS destination port information for bulk ships?—Implications for shipping policy and practice. Transp. Res. Part Logist. Transp. Rev. 2021, 149, 102308. [Google Scholar] [CrossRef]
- Zheng, Y. Trajectory data mining: An overview. ACM Trans. Intell. Syst. Technol. (TIST) 2015, 6, 1–41. [Google Scholar] [CrossRef]
- Zhong, H.; Song, X.; Yang, L. Vessel classification from space-based ais data using random forest. In Proceedings of the 2019 5th International Conference on Big Data and Information Analytics (BigDIA), Kunming, China, 8–10 July 2019; pp. 9–12. [Google Scholar] [CrossRef]
- Baeg, S.; Hammond, T. Ship Type Classification Based on The Ship Navigating Trajectory and Machine Learning. In Proceedings of the ACM IUI Workshops, Sydney, Australia, 27–31 March 2023. [Google Scholar] [CrossRef]
- Huang, I.L.; Lee, M.C.; Nieh, C.Y.; Huang, J.C. Ship classification based on ais data and machine learning methods. Electronics 2023, 13, 98. [Google Scholar] [CrossRef]
- Fuscá, D.; Rahimli, K.; Leuzzi, R. Identification of vessel class with LSTM using kinematic features in maritime traffic control. Int. J. Comput. Electr. Autom. Control. Inf. Eng. 2022, 16, 1–4. Available online: https://publications.waset.org/10012385/identification-of-vessel-class-with-lstm-using-kinematic-features-in-maritime-traffic-control (accessed on 15 January 2024).
- Han, X.; Zhou, Y.; Weng, J.; Chen, L.; Liu, K. Research on fishing vessel recognition based on vessel behavior characteristics from AIS data. Front. Mar. Sci. 2025, 12, 1547658. [Google Scholar] [CrossRef]
- Sánchez Pedroche, D.; Amigo, D.; García, J.; Molina, J.M. Architecture for trajectory-based fishing ship classification with AIS data. Sensors 2020, 20, 3782. [Google Scholar] [CrossRef] [PubMed]
- Duan, H.; Ma, F.; Miao, L.; Zhang, C. A semi-supervised deep learning approach for vessel trajectory classification based on AIS data. Ocean Coast. Manag. 2022, 218, 106015. [Google Scholar] [CrossRef]
- Meyer, R.; Kleynhans, W. Vessel classification using AIS data. Ocean Eng. 2025, 319, 120043. [Google Scholar] [CrossRef]
- Shi, Q.; Li, W.; Tao, R.; Sun, X.; Gao, L. Ship Classification Based on Multifeature Ensemble with Convolutional Neural Network. Remote Sens. 2019, 11, 419. [Google Scholar] [CrossRef]
- Chen, J.; Chen, K.; Chen, H.; Li, W.; Zou, Z.; Shi, Z. Contrastive learning for fine-grained ship classification in remote sensing images. IEEE Trans. Geosci. Remote Sens. 2022, 60, 1–16. [Google Scholar] [CrossRef]
- Dong, S.; Feng, J.; Fang, D. A novel multi-scale contrastive learning network for fine-grained ocean ship classification. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2024, 17, 9989–10005. [Google Scholar] [CrossRef]
- Zhou, Y.; Daamen, W.; Vellinga, T.; Hoogendoorn, S.P. Ship classification based on ship behavior clustering from AIS data. Ocean Eng. 2019, 175, 176–187. [Google Scholar] [CrossRef]
- Li, T.; Xu, H.; Zeng, W. Ship classification method for massive AIS trajectories based on GNN. In Journal of Physics: Conference Series, Volume 2025, Proceedings of the 2021 3rd International Conference on Artificial Intelligence and Computer Science (AICS), Beijing, China, 29–31 July 2021; IOP Publishing: Bristol, UK, 2021; Volume 2025, p. 012024. [Google Scholar] [CrossRef]
- Ye, L.; Chen, X.; Liu, H.; Zhang, R.; Zhang, B.; Zhao, Y.; Zhou, D. Vessel Type Recognition Using a Multi-Graph Fusion Method Integrating Vessel Trajectory Sequence and Dependency Relations. J. Mar. Sci. Eng. 2024, 12, 2315. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. arXiv 2017. [Google Scholar] [CrossRef]
- Jawahar, G.; Sagot, B.; Seddah, D. What does BERT learn about the structure of language? In Proceedings of the ACL 2019-57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 28 July–2 August 2019. [CrossRef]
- Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning representations by back-propagating errors. Nature 1986, 323, 533–536. [Google Scholar] [CrossRef]
- Chung, J.; Gulcehre, C.; Cho, K.; Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar] [CrossRef]
- Loshchilov, I.; Hutter, F. Fixing weight decay regularization in adam. arXiv 2017, arXiv:1711.05101. [Google Scholar] [CrossRef]
Dataset | Trajectory Points | Number of Trajectories | Number of Ships |
---|---|---|---|
Training | 101,839 | 3000 | 752 |
Validation | 32,091 | 1000 | 319 |
Testing | 31,722 | 1000 | 362 |
Parameter | Value |
---|---|
Batch size | 32 |
Epoch | 100 |
Dropout | 0.1 |
Hidden size | 64 |
Hidden layer | 8 |
Number of heads | 8 |
Learning rate | 1 × |
Method | MLP | GRU | Transformer | MESTR |
---|---|---|---|---|
Accuracy | 43.20 | 52.70 | 59.80 | 67.00 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, N.; Chen, L.; Zhang, X.; Jing, N. MESTR: A Multi-Task Enhanced Ship-Type Recognition Model Based on AIS. J. Mar. Sci. Eng. 2025, 13, 715. https://doi.org/10.3390/jmse13040715
Chen N, Chen L, Zhang X, Jing N. MESTR: A Multi-Task Enhanced Ship-Type Recognition Model Based on AIS. Journal of Marine Science and Engineering. 2025; 13(4):715. https://doi.org/10.3390/jmse13040715
Chicago/Turabian StyleChen, Nanyu, Luo Chen, Xinxin Zhang, and Ning Jing. 2025. "MESTR: A Multi-Task Enhanced Ship-Type Recognition Model Based on AIS" Journal of Marine Science and Engineering 13, no. 4: 715. https://doi.org/10.3390/jmse13040715
APA StyleChen, N., Chen, L., Zhang, X., & Jing, N. (2025). MESTR: A Multi-Task Enhanced Ship-Type Recognition Model Based on AIS. Journal of Marine Science and Engineering, 13(4), 715. https://doi.org/10.3390/jmse13040715