ADA-NAF: Semi-Supervised Anomaly Detection Based on the Neural Attention Forest
- Authors: Ageev A.Y.1, Konstantinov A.V1, Utkin L.V1
-
Affiliations:
- Peter the Great St. Petersburg Polytechnic University
- Issue: Vol 24, No 1 (2025)
- Pages: 329-357
- Section: Artificial intelligence, knowledge and data engineering
- URL: https://journal-vniispk.ru/2713-3192/article/view/278231
- DOI: https://doi.org/10.15622/ia.24.1.12
- ID: 278231
Cite item
Full Text
Abstract
In this study, we present a novel model called ADA-NAF (Anomaly Detection Autoencoder with the Neural Attention Forest) for semi-supervised anomaly detection that uniquely integrates the Neural Attention Forest (NAF) architecture which has been developed to combine a random forest classifier with a neural network computing attention weights to aggregate decision tree predictions. The key idea behind ADA-NAF is the incorporation of NAF into an autoencoder structure, where it implements functions of a compressor as well as a reconstructor of input vectors. Our approach introduces several technical advances. First, a proposed end-to-end training methodology over normal data minimizes the reconstruction errors while learning and optimizing neural attention weights to focus on hidden features. Second, a novel encoding mechanism leverages NAF’s hierarchical structure to capture complex data patterns. Third, an adaptive anomaly scoring framework combines the reconstruction errors with the attention-based feature importance. Through extensive experimentation across diverse datasets, ADA-NAF demonstrates superior performance compared to state-of-the-art methods. The model shows particular strength in handling high-dimensional data and capturing subtle anomalies that traditional methods often do not detect. Our results validate the ADA-NAF’s effectiveness and versatility as a robust solution for real-world anomaly detection challenges with promising applications in cybersecurity, industrial monitoring, and healthcare diagnostics. This work advances the field by introducing a novel architecture that combines the interpretability of attention mechanisms with the powerful feature learning capabilities of autoencoders.
About the authors
A. Yu Ageev
Peter the Great St. Petersburg Polytechnic University
Author for correspondence.
Email: andreyageev1@mail.ru
Polytechnicheskaya St. 29
A. V Konstantinov
Peter the Great St. Petersburg Polytechnic University
Email: andrue.konst@gmail.com
Polytechnicheskaya St. 29
L. V Utkin
Peter the Great St. Petersburg Polytechnic University
Email: lev.utkin@gmail.com
Polytechnicheskaya St. 29
References
- Chandola V., Banerjee A., Kumar V. Anomaly detection: A survey. ACM Computing Surveys. 2009. vol. 41. no. 3. pp. 1–58. doi: 10.1145/1541880.1541882.
- Barnett V., Lewis T. Outliers in statistical data. 3rd Edition. New York: Wiley, 1994. 608 p.
- Grubbs F.E. Procedures for detecting outlying observations in samples. Technometrics. 1969. vol. 11. pp. 1–21. doi: 10.1080/00401706.1969.10490657.
- Goldstein M. Special Issue on Unsupervised Anomaly Detection. Applied Sciences. 2023. vol. 13(10). doi: 10.3390/app13105916.
- Zhang C., Liu J., Chen W., Shi J., Yao M., Yan X., Xu N., Chen D. [Retracted] Unsupervised Anomaly Detection Based on Deep Autoencoding and Clustering. Security and Communication Networks. 2021. vol. 2021. doi: 10.1155/2021/7389943.
- Sarvari H., Domeniconi C., Prenkaj B., Stilo G. Unsupervised boosting-based autoencoder ensembles for outlier detection. Proceedings of Pacific-Asia Conference on Knowledge Discovery and Data Mining. 2021. pp. 91–103. doi: 10.1007/978-3-030-75762-5_8.
- Yoshihara K., Takahashi K. A simple method for unsupervised anomaly detection: An application to Web time series data. Plos one. 2022. vol. 17. no. 1. doi: 10.1371/journal.pone.0262463.
- Kiran B.R., Thomas D.M., Parakkal R. An overview of deep learning based methods for unsupervised and semi-supervised anomaly detection in videos. Journal of Imaging. 2018. vol. 4. no. 2. doi: 10.3390/jimaging4020036.
- Al-amri R., Murugesan R.K., Man M., Abdulateef A.F., Al-Sharafi M.A., Alkahtani A.A. A review of machine learning and deep learning techniques for anomaly detection in IoT data. Applied Sciences. 2021. vol. 11. no. 12. doi: 10.3390/app11125320.
- Finke T., Kramer M., Morandini A., Muck A., Oleksiyuk I. Autoencoders for unsupervised anomaly detection in high energy physics. Journal of High Energy Physics. 2021. vol. 2021. no. 6. doi: 10.1007/JHEP06(2021)161.
- Konstantinov A.V., Utkin L.V., Lukashin A.A., Muliukha V.A. Neural attention forests: Transformer-based forest improvement. Proceedings of International Conference on Intelligent Information Technologies for Industry. 2023. pp. 158–167.
- Liu F.T., Kai M.T., Zhou Z.H. Isolation forest. Proceedings of 8th IEEE International Conference on Data Mining. 2008. pp. 413–422. doi: 10.1109/ICDM.2008.17.
- Xu H., Pang G., Wang Y., Wang Y. Deep Isolation Forest for Anomaly Detection. IEEE Transactions on Knowledge and Data Engineering. 2023. vol. 35. no. 12. pp. 12591–12604. doi: 10.1109/TKDE.2023.3270293.
- Ahmed M., Mahmood A.N., Hu J. A survey of network anomaly detection techniques. Journal of Network and Computer Applications. 2016. vol. 60. pp. 19–31. doi: 10.1016/j.jnca.2015.11.016.
- Liao Y., Bartler A., Yang B. Anomaly detection based on selection and weighting in latent space. Proceedings of 2021 IEEE 17th International Conference on Automation Science and Engineering (CASE). 2021. pp. 409–415. doi: 10.1109/CASE49439.2021.9551267.
- Xu J., Wu H., Wang J., Long M. Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy. Proceedings of Tenth International Conference on Learning Representations. 2022.
- Hojjati H., Ho T.K.K., Armanfard N. Self-supervised anomaly detection: A survey and outlook. arXiv preprint arXiv:2205.05173. 2022.
- Perera P., Oza P., Patel V.M. One-class classification: A survey. arXiv preprint arXiv:2101.03064. 2021.
- Darban Z.Z., Webb G.I., Pan S., Aggarwal C.C., Salehi M. Deep learning for time series anomaly detection: A survey. ACM Computing Surveys. 2024. vol. 57. no. 1. doi: 10.1145/369133.
- Chalapathy R., Chawla S. Deep learning for anomaly detection: A survey. arXiv preprint arXiv:1901.03407. 2019.
- Landauer M., Onder S., Skopik F., Wurzenberger M. Deep learning for anomaly detection in log data: A survey. Machine Learning with Applications. 2023. vol. 12. doi: 10.1016/j.mlwa.2023.100470.
- Di Mattia F., Galeone P., De Simoni M., Ghelfi E. A survey on gans for anomaly detection. arXiv preprint arXiv:1906.11632. 2019.
- Suarez J.J.P., Naval Jr P.C. A survey on deep learning techniques for video anomaly detection. arXiv preprint arXiv:2009.14146. 2020.
- Tschuchnig M.E., Gadermayr M. Anomaly detection in medical imaging-a mini review. Proceedings of the 4th International Data Science Conference–iDSC 2021. 2022. pp. 33–38.
- Niu Z., Zhong G., Yu H. A review on the attention mechanism of deep learning. Neurocomputing. 2021. vol. 452. pp. 48–62. doi: 10.1016/j.neucom.2021.03.091.
- Bahdanau D., Cho K., Bengio Y. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473. 2014.
- Zhu Y., Newsam S. Motion-aware feature for improved video anomaly detection. arXiv preprint arXiv:1907.10211. 2019.
- Hashimoto M., Ide Y., Aritsugi M. Anomaly detection for sensor data of semiconductor manufacturing equipment using a GAN. Procedia Computer Science. 2021. vol. 192. pp. 873–882. doi: 10.1016/j.procs.2021.08.090.
- Wu X., Huang S., Li M., Deng Y. Vector magnetic anomaly detection via an attention mechanism deep-learning model. Applied Sciences. 2021. vol. 11. no. 23. doi: 10.3390/app112311533.
- Yu Y., Zha Z., Jin B., Wu G., Dong C. Graph-Based Anomaly Detection via Attention Mechanism. Proceedings of on: 18th International Conference on Intelligent Computing Theories and Application. 2022. pp. 401–411. doi: 10.1007/978-3-031-13870-6_33.
- Tang T.W., Hsu H., Huang W.R., Li K.M. Industrial Anomaly Detection with Skip Autoencoder and Deep Feature Extractor. Sensors. 2022. vol. 22. no. 23. doi: 10.3390/s22239327.
- Utkin L.V., Konstantinov A.V. Attention-based random forest and contamination model. Neural Networks: the official journal of the International Neural Network Society. 2022. vol. 154. pp. 346–359.
- Utkin L., Ageev A., Konstantinov A., Muliukha V. Improved Anomaly Detection by Using the Attention-Based Isolation Forest. Algorithms. 2023. vol. 16. no. 1. doi: 10.3390/a16010019.
- Cai Z. Weighted nadaraya–watson regression estimation. Statistics and probability letters. 2001. vol. 51. no. 3. pp. 307–318. doi: 10.1016/S0167-7152(00)00172-3.
- Rumelhart D.E., Hinton G.E., Williams R.J. Learning internal representations by error propagation. Parallel Distributed Processing: Explorations in the Microstructure of Cognition. 1986. vol. 1. pp. 318–362.
- Hawkins S., He H., Williams G., Baxter R. Outlier detection using replicator neural networks. International Conference on Data Warehousing and Knowledge Discovery. 2002. pp. 170–180. doi: 10.1007/3-540-46145-0_17.
- Vaswani A., Shazeer N., Parmar N., Uszkoreit J., Jones L., Gomez A.N., Kaiser L., Polosukhin I. Attention is all you need. Advances in neural information processing systems. 2017. vol. 30.
- Arrhythmia Dataset. Available at: https://www.kaggle.com/code/mtavares51/binary-classification-on-arrhythmia-dataset. (accessed 30.05.2024).
- Credit Card Fraud Detection Dataset. Available at: https://www.kaggle.com/code/shivamsekra/credit-card-fraud-detection-eda-isolation-forest. (accessed 30.05.2024).
- Pima Indians Diabetes Dataset. Available at: https://www.kaggle.com/code/hafizramadan/data-science-project-iii. (accessed 30.05.2024).
- Haberman’s Survival Dataset. Available at: https://www.kaggle.com/datasets/gilsousa/habermans-survival-data-set. (accessed 30.05.2024).
- Ionosphere Dataset. Available at: https://www.kaggle.com/code/zymzym/classification-of-the-ionosphere-dataset-by-knn. (accessed 30.05.2024).
- Seismic Bumps Dataset. Available at: https://www.kaggle.com/datasets/pranabroy94/seismic-bumps-data-set. (accessed 30.05.2024).
- Shuttle Dataset. Available at: https://github.com/xuhongzuo/deep-iforest/tree/main. (accessed 30.05.2024).
- Annthyroid Dataset. Available at: https://github.com/GuansongPang/deviation-network. (accessed 30.05.2024).
- Bank Additional Dataset. Available at: https://github.com/GuansongPang/deviation-network. (accessed 30.05.2024).
- CelebA Dataset. Available at: https://github.com/GuansongPang/deviation-network. (accessed 30.05.2024).
Supplementary files
