Two-Stage Maritime Anomaly Detection: Unsupervised Outlier Filtering and Optimized Bidirectional LSTM on Southeast Asian AIS Data
DOI:
https://doi.org/10.30871/jaic.v9i6.11545Keywords:
AIS, Anomaly Detection, Bidirectional LSTM, DBSCAN, Isolation ForestAbstract
This paper presents a two-stage framework for detecting anomalous vessel trajectories in Automatic Identification System (AIS) data from Southeast Asian waters, addressing challenges of high traffic density, diverse vessel behaviors, and severe class imbalance. The primary objective is to minimize missed threats while maintaining manageable false alarm rates in security-critical maritime surveillance systems. The research employs a hybrid approach combining unsupervised and supervised learning methods. In the first stage, DBSCAN and Isolation Forest algorithms filter noise and generate high-confidence outlier labels from 15,542 real-world vessel trajectories. Comparative analysis demonstrates substantial agreement between methods with Cohen's Kappa of 0.688 and 55.3% anomaly overlap, indicating complementary detection capabilities that enhance filtering robustness. In the second stage, a Bidirectional Long Short-Term Memory model is optimized through systematic hyperparameter tuning across 48 configurations, covering sequence length, network architecture, dropout rate, learning rate, and sampling strategies. Comprehensive baseline evaluation validates BiLSTM's suitability for security applications, achieving 15.41% F1-score improvement over unidirectional LSTM and 33% fewer false negatives compared to Bidirectional GRU alternative. The optimized BiLSTM attains F1-score of 0.5709 with precision 0.5444 and recall 0.6000, exhibiting 90.03% specificity for normal vessels and 76.17% sensitivity for anomalies. The model misses only 23.8% of threats while maintaining 9.97% false alarm rate, providing balanced performance suitable for human-verified security-critical maritime surveillance in Southeast Asian waters.
Downloads
References
[1] K. V. Olesen, “A Contextually Supported Abnormality Detector for Maritime Trajectories.” Journal of Marine Science and Engineering, vol. 11, no. 11, p. 2085, 2023, doi: 10.3390/jmse11112085.
[2] A. Magunna, “Charting waters: the private sector’s evolving governance role in Southeast Asian maritime security.” Australian Journal of International Affairs, vol. 78, no. 3, pp. 306-325, 2024, doi: 10.1080/10357718.2024.2337013.
[3] Ketut Buda Artana, AAB Dinariyana, I Made Ariana, Dhimas Widhi Handani, Fadilla Indrayuni Prastyasari, and Emmy Pratiwi, “Milestone For E-Navigation: A Concept for Navigational Safety Platform by Means of AISITS.” PROSIDING POLITEKNIK ILMU PELAYARAN MAKASSAR, vol. 1, no. 4, pp. 1-9, 2020, doi: 10.48192/prc.v1i4.315.
[4] D. Nguyen, R. Vadaine, G. Hajduch, R. Garello, and R. Fablet, “GeoTrackNet—A Maritime Anomaly Detector Using Probabilistic Neural Network Representation of AIS Tracks and A Contrario Detection.” IEEE Transactions on Intelligent Transportation Systems, vol. 23, no. 6, pp. 5655-5667, 2022, doi: 10.1109/tits.2021.3055614.
[5] C. V. Ribeiro, A. Paes, and D. de Oliveira, “AIS-based maritime anomaly traffic detection: A review.” Expert Systems with Applications, vol. 231, p. 120561, 2023, doi: 10.1016/j.eswa.2023.120561.
[6] M. Liang, L. Weng, R. Gao, Y. Li, and L. Du, “Unsupervised maritime anomaly detection for intelligent situational awareness using AIS data.” Knowledge-Based Systems, vol. 284, p. 111313, 2024, doi: 10.1016/j.knosys.2023.111313.
[7] F. Farahnakian, “A Comprehensive Study of Clustering-Based Techniques for Detecting Abnormal Vessel Behavior.” Remote Sensing, vol. 15, no. 6, p. 1477, 2023, doi: 10.3390/rs15061477.
[8] K. Wolsing, L. Roepert, J. Bauer, and K. Wehrle, “Anomaly Detection in Maritime AIS Tracks: A Review of Recent Approaches.” Journal of Marine Science and Engineering, vol. 10, no. 1, p. 112, 2022, doi: 10.3390/jmse10010112.
[9] X. Han, C. Armenakis, and M. Jadidi, “Modeling Vessel Behaviours by Clustering AIS Data Using Optimized DBSCAN.” Sustainability, vol. 13, no. 15, p. 8162, 2021, doi: 10.3390/su13158162.
[10] B. Zhang, K. Hirayama, H. Ren, D. Wang, and H. Li, “Ship Anomalous Behavior Detection Using Clustering and Deep Recurrent Neural Network.” Journal of Marine Science and Engineering, vol. 11, no. 4, p. 763, 2023, doi: 10.3390/jmse11040763.
[11] H.-T. Lee, J.-S. Lee, H. Yang, and I.-S. Cho, “An AIS Data-Driven Approach to Analyze the Pattern of Ship Trajectories in Ports Using the DBSCAN Algorithm.” Applied Sciences, vol. 11, no. 2, p. 799, 2021, doi: 10.3390/app11020799.
[12] S. Capobianco, L. M. Millefiori, N. Forti, P. Braca, and P. Willett, “Deep Learning Methods for Vessel Trajectory Prediction Based on Recurrent Neural Networks.” IEEE Transactions on Aerospace and Electronic Systems, vol. 57, no. 6, pp. 4329-4346, 2021, doi: 10.1109/taes.2021.3096873.
[13] Y. Zhou, Z. Dong, and X. Bao, “A Ship Trajectory Prediction Method Based on an Optuna–BILSTM Model.” Applied Sciences, vol. 14, no. 9, p. 3719, 2024, doi: 10.3390/app14093719.
[14] S. Mishra, V. Kshirsagar, R. Dwivedula, and C. Hota, “Attention-Based Bi-LSTM for Anomaly Detection on Time-Series Data.” Lecture Notes in Computer Science, pp. 129-140, 2021, doi: 10.1007/978-3-030-86362-3_11.
[15] I. Kontopoulos, I. Varlamis, and K. Tserpes, “A distributed framework for extracting maritime traffic patterns.” International Journal of Geographical Information Science, vol. 35, no. 4, pp. 767-792, 2020, doi: 10.1080/13658816.2020.1792914.
[16] J. H. Joloudari, A. Marefat, M. A. Nematollahi, S. S. Oyelere, and S. Hussain, “Effective Class-Imbalance Learning Based on SMOTE and Convolutional Neural Networks.” Applied Sciences, vol. 13, no. 6, p. 4006, 2023, doi: 10.3390/app13064006.
[17] V. Hassija, “Interpreting Black-Box Models: A Review on Explainable Artificial Intelligence.” Cognitive Computation, vol. 16, no. 1, pp. 45-74, 2023, doi: 10.1007/s12559-023-10179-8.
[18] T. Lv, P. Tang, and J. Zhang, “A Real-Time AIS Data Cleaning and Indicator Analysis Algorithm Based on Stream Computing.” Scientific Programming, vol. 2023, pp. 1-12, 2023, doi: 10.1155/2023/8345603.
[19] AIS Spoofing in the Maritime Industry: A Growing Risk and ..” Jul. 10, 2023. https://www.kpler.com/blog/ais-spoofing-in-the-maritime-industry-a-growing-risk-and-compliance-challenge (accessed: Nov. 17, 2025).
[20] T. Kwembe and R. Whalin, “Novel Big Data and Artificial Intelligence Analytics Methods for Tracking and Monitoring Maritime Traffics”, Zenodo, Feb. 2024. doi: 10.5281/zenodo.10694544.
[21] N.-T. Nguyen, R. Heldal, and P. Pelliccione, “Concept-drift-adaptive anomaly detector for marine sensor data streams.” Internet of Things, vol. 28, p. 101414, 2024, doi: 10.1016/j.iot.2024.101414.
[22] “Indian Southwest Monsoon 2024: shipping risks and precautions ..” Jun. 24, 2023. https://maritime-mutual.com/risk-bulletins/indian-southwest-monsoon-2024-shipping-risks-and-precautions/ (accessed: Nov. 17, 2025).
[23] “Seasonal Outlook - Climate Prediction Center.” Nov. 03, 2023. https://www.cpc.ncep.noaa.gov/products/predictions/long_range/seasonal.php?lead=1 (accessed: Nov. 17, 2025).
[24] S. Chen, Y. Huang, and W. Lu, “Anomaly Detection and Restoration for AIS Raw Data.” Wireless Communications and Mobile Computing, vol. 2022, no. 1, 2022, doi: 10.1155/2022/5954483.
[25] H. M. Guzman, N. Hinojosa, and S. Kaiser, “Ship.” Marine Policy, vol. 120, p. 104113, 2020, doi: 10.1016/j.marpol.2020.104113.
[26] N. Saeed, K. Cullinane, V. Gekara, and P. Chhetri, “Reconfiguring maritime networks due to the Belt and Road Initiative: impact on bilateral trade flows.” Maritime Economics & Logistics, vol. 23, no. 3, pp. 381-400, 2021, doi: 10.1057/s41278-021-00192-9.
[27] C. Ferrari and A. Tei, “Effects of BRI strategy on Mediterranean shipping transport.” Journal of Shipping and Trade, vol. 5, no. 1, 2020, doi: 10.1186/s41072-020-00067-x.
[28] A. Rakha and K. El Aasar, “The impact of the belt and road initiative on the Suez Canal cargo trade.” Journal of Shipping and Trade, vol. 9, no. 1, 2024, doi: 10.1186/s41072-024-00167-y.
[29] D. Yazir, B. Şahin, T. L. Yip, and P.-H. Tseng, “Effects of COVID-19 on maritime industry: a review.” International Maritime Health, vol. 71, no. 4, pp. 253-264, 2020, doi: 10.5603/imh.2020.0044.
[30] L. M. Millefiori, “COVID-19 impact on global maritime mobility.” Scientific Reports, vol. 11, no. 1, 2021, doi: 10.1038/s41598-021-97461-7.
[31] A. Grzelakowski, “The Covid 19 Pandemic – Challenges for Maritime Transport and Global Logistics Supply Chains.” TransNav, the International Journal on Marine Navigation and Safety of Sea Transportation, vol. 16, no. 1, pp. 71-77, 2022, doi: 10.12716/1001.16.01.07.
[32] Z. Li, H. Li, Q. Zhang, and X. Qi, “Data-driven research on the impact of COVID-19 on the global container shipping network.” Ocean & Coastal Management, vol. 248, p. 106969, 2024, doi: 10.1016/j.ocecoaman.2023.106969.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Daffa Afaf Firmansyah, Erna Zuni Astuti

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).








