Anomaly detection of ship behavior based on deep neural networks - Shu, Yaqing; Dong, Ao; Liu, Chengyong; Gan, Langxiong; Song, Lan (Reliability engineering & system safety, 2026)
•A HybridAttn-BiRNN model with temporal and feature attention is proposed for ship trajectory prediction.•An anomaly detection framework integrating HDBSCAN clustering and the HybridAttn-BiRNN model is established.•Multiple anomaly types are detected using threshold discrimination and feature deviation analysis.•Ship anomalies are detected with 92.7 % accuracy using Shanghai Port AIS data in experiments. With the acceleration of the digitalization process in the global shipping industry. The anomaly detection of ship behaviors, including ship speed, course, and trajectory, has become a core challenge to ensure maritime traffic safety. To address this challenge, a method that integrates a hierarchical density-based spatial clustering algorithm (HDBSCAN) with a deep learning model is proposed in this paper. Unlike conventional approaches that rely solely on clustering or prediction models, AIS trajectories are compressed and clustered by our method to extract normal behavior patterns. Ship behavior is then predicted using a deep learning model with feature and temporal attention mechanisms. A dual-threshold mechanism is employed to identify various anomalies, including speed and course deviations, based on prediction errors. A case study is conducted using the AIS data from the waters of Shanghai Port. The experimental results show that abnormal ship behavior can be effectively identified by this method, with an average detection accuracy of 92.7% for various types of anomalies. The method proposed in this research could proactively identify potential maritime risks, thereby improving the overall safety and reliability of shipping operations.