Ship Anomalous Behavior Detection in Port Waterways Based on Text Similarity and Kernel Density Estimation
Abstract
:1. Introduction
- How to accurately identify the traffic patterns of inbound and outbound ships based on relevant maritime information;
- How to effectively detect potential anomalous ship behavior based on inbound and outbound traffic patterns.
- (1)
- A novel method for detecting abnormal ship behavior in waterways is proposed. This paper is dedicated to studying the abnormal behavior of ships in waterways. When designing the anomaly detection algorithm, the impacts of ship static attributes, port traffic rules, etc., on ship movement were considered, and the dense historical trajectories of ships in the waterways were divided into different inbound and outbound traffic patterns, which enabled the inbound and outbound traffic patterns to represent ships’ typical patterns.
- (2)
- It is proposed to use the multiple attributes of ship trajectory to perform semantic transformation on the ship trajectory points to improve the accuracy of traffic pattern identification. This paper converts ship type, course, speed, and geospatial attribute semantics into ship trajectory text, ensuring the completeness of ship movement information, eliminating the problem of only considering the distance between trajectories in traditional ship traffic pattern identification, and improving ship traffic pattern identification results’ accuracy.
- (3)
- This paper proposes using the cosine similarity measurement method to identify ship inbound and outbound traffic patterns, improving traffic pattern identification efficiency. The cosine similarity measure is a method based on vector calculation. Based on the vectorized representation of target trajectory text and traffic mode trajectory text, the traffic mode can be identified by simply calculating the cosine similarity between vectors, eliminating the need to calculate different trajectories. Therefore, the method proposed in this paper will significantly improve the efficiency of traffic mode identification compared to traditional methods.
- (4)
- A method for detecting abnormal ship behavior based on kernel density estimation, which can detect abnormal ship behavior in a timely and effective manner, is proposed. A local density and abnormal factor calculation method was constructed to ensure the abnormal ship behavior detection method’s accuracy and real-time performance. Simulation experiments have verified that abnormal ship behavior can be detected promptly, and the accuracy of the detection results can reach more than 90%.
2. Methods
2.1. Ship Traffic Pattern Recognition
2.1.1. Trajectory Text Generation
2.1.2. Trajectory Text Similarity Measurement
2.2. Ship Anomaly Detection
2.2.1. Definition of Neighborhood
- (1)
- There are at least m sample points in the dataset X, such that
- (2)
- There are at most m − 1 sample points in the dataset X, such that
2.2.2. Kernel Density Estimation
2.2.3. Neighborhood Density
2.2.4. Anomaly Factor
3. Experiments and Results
3.1. Experimental Setup
3.2. Evaluation Index
- (1)
- Accuracy represents the proportion of samples with correct abnormal detection results among the total number of samples, as shown in Equation (12).
- (2)
- Precision, also known as positive predictive value, represents the proportion of true positive samples among the samples detected as positive by abnormal behavior detection, as shown in Equation (13).
- (3)
- Recall, also known as sensitivity or true positive rate, represents the proportion of actual positive samples among the positive samples detected by abnormal behavior detection in the entire set of positive samples, as shown in Equation (14).
3.3. Experimental Results and Analysis
3.3.1. Deviation from the Waterway
3.3.2. U-Turn within the Waterway
3.3.3. Stopping in the Waterway
4. Discussion
- (1)
- Compared with traditional ship traffic pattern recognition methods, this paper converts ship type, course, speed and geospatial attribute semantics into ship trajectory text, ensuring the integrity of ship movement information. By comparing the similarity of texts, ship traffic patterns can be improved in terms of the efficiency and accuracy of identification results. The traditional ship traffic pattern identification method calculates the similarity based on the distance between trajectories, which can easily lead to deviations in ship traffic pattern recognition, leading to false alarms in detecting abnormal ship behavior. In addition, the traditional ship traffic pattern identification method measures the similarity between the target ship trajectory and all trajectories in each traffic pattern, identifies its traffic pattern based on the similarity measurement value, or finds out the typical trajectories in each traffic pattern, and calculates the similarity value between target trajectories and typical trajectories to identify traffic patterns. The above similarity measurement method requires calculating the distance between trajectory points, which is inefficient. The cosine similarity measure is a method based on vector calculation. Based on the vector representation of the target trajectory text and the traffic pattern trajectory text, the traffic pattern can be identified by simply calculating the cosine similarity between vectors;
- (2)
- Combined with kernel density estimation to construct a ship abnormal behavior detection method, the abnormal factor value can be set according to the tolerance of abnormal behavior. This paper constructs a calculation method for ship behavior abnormality factors and sets corresponding abnormality thresholds according to the actual needs of the port. For example, to identify potential or suspicious ship behavior, the threshold should be set to a lower value to identify and take response actions quickly. The threshold can be set to a higher value to prevent false alarms and increase the burden on drivers on duty to reduce work pressure.
- (1)
- This method is based on the assumption that ships enter and leave ports according to port navigation rules. Therefore, it mainly considers the detection of abnormal behaviors of single vessels entering and leaving ports, lacking consideration of detecting ship abnormal behaviors in multi-vessel interaction scenarios. In typical situations, ships navigate within specific channels, making it difficult to encounter situations between vessels.
- (2)
- Since this method is data-driven, its results may be influenced by the quality of ship trajectory data, especially in ship traffic pattern recognition. In future research, consideration could be given to integrating other maritime data, such as port water depth data, to improve the accuracy of ship abnormal behavior detection. Additionally, the selection of threshold values for abnormal factors significantly affects the results of abnormal detection. Therefore, appropriate thresholds should be set based on specific scenarios or environments.
5. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
References
- EMSA (European Maritime Safety Agency). Annual Overview of Marine Casualties and Incidents. 2022. Available online: https://www.emsa.europa.eu/newsroom/latest-news/item/4867-annual-overview-of-marine-casualties-and-incidents-2021.html (accessed on 1 March 2024).
- UNCTAD. Review of Maritime Transportation 2022. Available online: https://unctad.org/system/files/official-document/rmt2022_en.pdf (accessed on 1 March 2024).
- Bai, X.; Cheng, L.; Iris, Ç. Data-driven financial and operational risk management: Empirical evidence from the global tramp shipping industry. Transp. Res. Part E Logist. Transp. Rev. 2022, 158, 102617. [Google Scholar] [CrossRef]
- Zhang, X.; Li, R.; Wang, C.; Xue, B.; Guo, W. Robust optimization for a class of ship traffic scheduling problem with uncertain arrival and departure times. Eng. Appl. Artif. Intell. 2024, 133, 108257. [Google Scholar] [CrossRef]
- Wang, C.; Zhang, X.; Gao, H.; Bashir, M.; Li, H.; Yang, Z. Optimizing Anti-collision Strategy for MASS: A Safe Reinforcement Learning Approach to Improve Maritime Traffic Safety. Ocean Coast. Manag. 2024, 253, 107161. [Google Scholar] [CrossRef]
- Zheng, K.; Zhang, X.; Wang, C.; Li, Y.; Cui, J.; Jiang, L. Adaptive collision avoidance decisions in autonomous ship encounter scenarios through rule-guided vision supervised learning. Ocean Eng. 2024, 297, 117096. [Google Scholar] [CrossRef]
- Shu, Y.; Han, B.; Song, L.; Yan, T.; Gan, L.; Zhu, Y.; Zheng, C. Analyzing the spatio-temporal correlation between tide and shipping behavior at estuarine port for energy-saving purposes. Appl. Energy. 2024, 367, 123382. [Google Scholar] [CrossRef]
- Liang, M.; Weng, L.; Gao, R.; Li, Y.; Du, L. Unsupervised maritime anomaly detection for intelligent situational awareness using AIS data. Knowl.-Based Syst. 2024, 284, 111313. [Google Scholar] [CrossRef]
- Sidibé, A.; Gao, S. Study of automatic anomalous behaviour detection techniques for maritime vessels. J. Navig. 2017, 70, 847–858. [Google Scholar] [CrossRef]
- Laxhammar, R. Anomaly detection for sea surveillance. In Proceedings of the 2008 11th International Conference on Information Fusion, Cologne, Germany, 30 June–3 July 2008; pp. 1–8. [Google Scholar]
- 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]
- Rong, H.; Teixeira, A.P.; Soares, C.G. Data mining approach to shipping route characterization and anomaly detection based on AIS data. Ocean Eng. 2020, 198, 106936. [Google Scholar] [CrossRef]
- Laxhammar, R.; Falkman, G.; Sviestins, E. Anomaly detection in sea traffic-a comparison of the gaussian mixture model and the kernel density estimator. In Proceedings of the 2009 12th International Conference on Information Fusion, Seattle, WA, USA, 6–9 July 2009; pp. 756–763. [Google Scholar]
- Mascaro, S.; Nicholso, A.E.; Korb, K.B. Anomaly detection in vessel tracks using Bayesian networks. Int. J. Approx. Reason. 2014, 55, 84–98. [Google Scholar] [CrossRef]
- Farahnakian, F.; Nicolas, F.; Farahnakian, F.; Nevalainen, P.; Sheikh, J.; Heikkonen, J.; Raduly-Baka, C. A Comprehensive Study of Clustering-Based Techniques for Detecting Abnormal Vessel Behaviour. Remote Sens. 2023, 15, 1477. [Google Scholar] [CrossRef]
- Zhao, L.; Shi, G. Maritime anomaly detection using density-based clustering and recurrent neural network. J. Navig. 2019, 72, 894–916. [Google Scholar] [CrossRef]
- Karataş, G.B.; Karagoz, P.; Ayran, O. Trajectory pattern extraction and anomaly detection for maritime vessels. Internet Things 2021, 16, 100436. [Google Scholar] [CrossRef]
- Pallotta, G.; Vespe, M.; Bryan, K. Vessel pattern knowledge discovery from AIS data: A framework for anomaly detection and route prediction. Entropy 2013, 15, 2218–2245. [Google Scholar] [CrossRef]
- Zhen, R.; Jin, Y.; Hu, Q.; Shao, Z.; Nikitakos, N. Maritime anomaly detection within coastal waters based on vessel trajectory clustering and Naïve Bayes Classifier. J. Navig. 2017, 70, 648–670. [Google Scholar] [CrossRef]
- Botts, C.H. A novel metric for detecting anomalous ship behaviour using a variation of the DBSCAN clustering algorithm. SN Comput. Sci. 2021, 2, 412. [Google Scholar] [CrossRef]
- Liu, B.; de Souza, E.N.; Matwin, S.; Sydow, M. Knowledge-based clustering of ship trajectories using density-based approach. In Proceedings of the 2014 IEEE International Conference on Big Data (Big Data), Washington, DC, USA, 27–30 October 2014; pp. 603–608. [Google Scholar] [CrossRef]
- Radon, A.N.; Wang, K.; Glässer, U.; Wehn, H.; Westwell-Roper, A. Contextual verification for false alarm reduction in maritime anomaly detection. In Proceedings of the 2015 IEEE International Conference on Big Data (Big Data), Santa Clara, CA, USA, 29 October–1 November 2015; pp. 1123–1133. [Google Scholar] [CrossRef]
- Gamage, C.; Dinalankara, R.; Samarabandu, J.; Subasinghe, A. A comprehensive survey on the applications of machine learning techniques on maritime surveillance to detect abnormal maritime vessel behaviours. WMU J. Marit. Aff. 2023, 22, 447–477. [Google Scholar] [CrossRef]
- Wang, S.; Zhang, X.; Qin, Y.; Song, W.; Li, B. Marine Target Magnetic Anomaly Detection Based on Multi-Task Deep Transfer Learning. IEEE Geosci. Remote Sens. Lett. 2023, 20, 1–5. [Google Scholar] [CrossRef]
- Rhodes, B.J.; Bomberger, N.A.; Zandipour, M. Probabilistic associative learning of vessel motion patterns at multiple spatial scales for maritime situation awareness. In Proceedings of the 2007 10th International Conference on Information Fusion, Quebec, QC, Canada, 9–12 July 2007; pp. 1–8. [Google Scholar] [CrossRef]
- Huang, G.; Lai, S.; Ye, C.; Zhou, H. Ship trajectory anomaly detection based on multi-feature fusion. In Proceedings of the 2021 IEEE International Conference on Smart Data Services (SMDS), Chicago, IL, USA, 5–10 September 2021; pp. 72–81. [Google Scholar] [CrossRef]
- Hu, J.; Kaur, K.; Lin, H.; Wang, X.; Hassan, M.M.; Razzak, I.; Hammoudeh, M. Intelligent anomaly detection of trajectories for IoT empowered maritime transportation systems. IEEE Trans. Intell. Transp. Syst. 2022, 24, 2382–2391. [Google Scholar] [CrossRef]
- Nguyen, D.; Vadaine, R.; Hajduch, G.; Garello, R.; Fablet, R. GeoTrackNet—A maritime anomaly detector using probabilistic neural network representation of AIS tracks and a contrario detection. IEEE trans Intell. Transp. Syst. 2021, 23, 5655–5667. [Google Scholar] [CrossRef]
- Eljabu, L.; Etemad, M.; Matwin, S. Anomaly detection in maritime domain based on spatio-temporal analysis of ais data using graph neural networks. In Proceedings of the 2021 5th International Conference on Vision, Image and Signal Processing (ICVISP), Kuala Lumpur, Malaysia, 18–20 December 2021; pp. 142–147. [Google Scholar] [CrossRef]
- Zhou, Y.; Daamen, W.; Vellinga, T.; Hoogendoorn, S. Review of maritime traffic models from vessel behaviour modeling perspective. Transp. Res. Part C Emerg. Technol. 2019, 105, 323–345. [Google Scholar] [CrossRef]
- Dorsey, L.C.; Wang, B.; Grabowski, M.; Merrick, J.; Harrald, J.R. Self healing databases for predictive risk analytics in safety-critical systems. J. Loss Prev. Process Ind. 2020, 63, 104014. [Google Scholar] [CrossRef]
- Rawson, A.; Brito, M. A survey of the opportunities and challenges of supervised machine learning in maritime risk analysis. Transp. Rev. 2023, 43, 108–130. [Google Scholar] [CrossRef]
- Bai, X.; Zhang, X.; Li, K.X.; Zhou, Y.; Yuen, K.F. Research topics and trends in the maritime transport: A structural topic model. Transp. Policy. 2021, 102, 11–24. [Google Scholar] [CrossRef]
- Hughes, P.; Shipp, D.; Figueres-Esteban, M.; Van Gulijk, C. From free-text to structured safety management: Introduction of a semi-automated classification method of railway hazard reports to elements on a bow-tie diagram. Saf. Sci. 2018, 110, 11–19. [Google Scholar] [CrossRef]
- Huang, L.; Wen, Y.; Guo, W.; Zhu, X.; Zhou, C.; Zhang, F.; Zhu, M. Mobility pattern analysis of ship trajectories based on semantic transformation and topic model. Ocean Eng. 2020, 201, 107092. [Google Scholar] [CrossRef]
- Li, G.; Liu, M.; Zhang, X.; Wang, C.; Lai, K.H.; Qian, W. Semantic Recognition of Ship Motion Patterns Entering and Leaving Port Based on Topic Model. J. Mar. Sci. Eng. 2022, 10, 2012. [Google Scholar] [CrossRef]
- Hu, W.; Gao, J.; Li, B.; Wu, O.; Du, J.; Maybank, S. Anomaly detection using local kernel density estimation and context-based regression. IEEE Trans. Knowl. Data Eng. 2018, 32, 218–233. [Google Scholar] [CrossRef]
- Prakoso, D.W.; Abdi, A.; Amrit, C. Short text similarity measurement methods: A review. Soft Comput. 2021, 25, 4699–4723. [Google Scholar] [CrossRef]
- Wang, J.; Dong, Y. Measurement of text similarity: A survey. Information. 2020, 11, 421. [Google Scholar] [CrossRef]
- Ma, Y.; Zhao, J.; Su, J.; Xi, T. Outlier mining method based on kernel density estimation. J. Taiyuan Univ. Sci. Tech. 2020, 41, 456–462+469. [Google Scholar]
- Sheather, S.J.; Jones, M.C. A reliable data-based bandwidth selection method for kernel density estimation. J. R. Stat. Soc. 1991, 53, 683–690. [Google Scholar] [CrossRef]
- Silverman, B.W. Density Estimation for Statistics and Data Analysis, 1st ed.; Routledge: New York, NY, USA, 2018. [Google Scholar] [CrossRef]
- Ristic, B.; La Scala, B.; Morelande, M.; Gordon, N. Statistical analysis of motion patterns in AIS data: Anomaly detection and motion prediction. In Proceedings of the 2008 11th International Conference on Information Fusion, Cologne, Germany, 30 June–3 July 2008; pp. 1–7. [Google Scholar]
- Li, G.; Zhang, X.; Jiang, L.; Wang, C.; Huang, R.; Liu, Z. An approach for traffic pattern recognition integration of ship AIS data and port geospatial features. Geo-Spat. Inf. Sci. 2024, 1–28. [Google Scholar] [CrossRef]
- Sokolova, M.; Lapalme, G. A systematic analysis of performance measures for classification tasks. Inf. Process Manag. 2009, 45, 427–437. [Google Scholar] [CrossRef]
- Visa, S.; Ramsay, B.; Ralescu, A.; Van Der Knaap, E. Confusion Matrix-Based Feature Selection. In Proceedings of the Twenty Second Midwest Artificial Intelligence and Cognitive Science Conference, Cincinnati, OH, USA, 16–17 April 2011; Volume 710, pp. 120–127. [Google Scholar]
- Bilican, M.S.; Iris, Ç.; Karatas, M.A. collaborative decision support framework for sustainable cargo composition in container shipping services. Ann. Oper. Res. 2024, 1–33. [Google Scholar] [CrossRef]
- Venturini, G.; Iris, Ç.; Kontovas, C.A.; Larsen, A. The multi-port berth allocation problem with speed optimization and emission considerations. Transp. Res. Part D Transp. Environ. 2017, 54, 142–159. [Google Scholar] [CrossRef]
ID | Ship Type | Ship Length (m) | Ship Width (m) | Abnormal Type |
---|---|---|---|---|
1 | Cargo | 125 | 20 | Deviation from the waterway |
2 | Container | 170 | 28 | U-turn Within the waterway |
3 | Container | 231 | 35 | Stopping in the waterway |
Confusion | Detection Results | ||
---|---|---|---|
Abnormal | Normal | ||
Ture results | Abnormal | True Positive (TP) | False Negative (FN) |
Normal | False Positive (FP) | True Negative (TN) |
Experiment | Total Number of Trajectories | True Positive Anomalies | Detecting Anomalous Points | Accuracy (%) | Precision (%) | Recall (%) | Average Time (s) |
---|---|---|---|---|---|---|---|
1 | 417 | 148 | 144 | 98.6 | 98.6 | 97.3 | 0.085 |
2 | 424 | 130 | 126 | 96.5 | 92.6 | 96.9 | 0.095 |
3 | 576 | 50 | 41 | 97.9 | 93.2 | 82 | 0.091 |
Average | / | / | / | 97.6 | 94.8 | 92.1 | 0.090 |
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. |
© 2024 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
Li, G.; Zhang, X.; Shu, Y.; Wang, C.; Guo, W.; Wang, J. Ship Anomalous Behavior Detection in Port Waterways Based on Text Similarity and Kernel Density Estimation. J. Mar. Sci. Eng. 2024, 12, 968. https://doi.org/10.3390/jmse12060968
Li G, Zhang X, Shu Y, Wang C, Guo W, Wang J. Ship Anomalous Behavior Detection in Port Waterways Based on Text Similarity and Kernel Density Estimation. Journal of Marine Science and Engineering. 2024; 12(6):968. https://doi.org/10.3390/jmse12060968
Chicago/Turabian StyleLi, Gaocai, Xinyu Zhang, Yaqing Shu, Chengbo Wang, Wenqiang Guo, and Jiawei Wang. 2024. "Ship Anomalous Behavior Detection in Port Waterways Based on Text Similarity and Kernel Density Estimation" Journal of Marine Science and Engineering 12, no. 6: 968. https://doi.org/10.3390/jmse12060968
APA StyleLi, G., Zhang, X., Shu, Y., Wang, C., Guo, W., & Wang, J. (2024). Ship Anomalous Behavior Detection in Port Waterways Based on Text Similarity and Kernel Density Estimation. Journal of Marine Science and Engineering, 12(6), 968. https://doi.org/10.3390/jmse12060968