ADA-NAF: Semi-Supervised Anomaly Detection Based on the Neural Attention Forest

Cover Page

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

  1. 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.
  2. Barnett V., Lewis T. Outliers in statistical data. 3rd Edition. New York: Wiley, 1994. 608 p.
  3. Grubbs F.E. Procedures for detecting outlying observations in samples. Technometrics. 1969. vol. 11. pp. 1–21. doi: 10.1080/00401706.1969.10490657.
  4. Goldstein M. Special Issue on Unsupervised Anomaly Detection. Applied Sciences. 2023. vol. 13(10). doi: 10.3390/app13105916.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. Hojjati H., Ho T.K.K., Armanfard N. Self-supervised anomaly detection: A survey and outlook. arXiv preprint arXiv:2205.05173. 2022.
  18. Perera P., Oza P., Patel V.M. One-class classification: A survey. arXiv preprint arXiv:2101.03064. 2021.
  19. 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.
  20. Chalapathy R., Chawla S. Deep learning for anomaly detection: A survey. arXiv preprint arXiv:1901.03407. 2019.
  21. 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.
  22. Di Mattia F., Galeone P., De Simoni M., Ghelfi E. A survey on gans for anomaly detection. arXiv preprint arXiv:1906.11632. 2019.
  23. Suarez J.J.P., Naval Jr P.C. A survey on deep learning techniques for video anomaly detection. arXiv preprint arXiv:2009.14146. 2020.
  24. 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.
  25. 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.
  26. Bahdanau D., Cho K., Bengio Y. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473. 2014.
  27. Zhu Y., Newsam S. Motion-aware feature for improved video anomaly detection. arXiv preprint arXiv:1907.10211. 2019.
  28. 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.
  29. 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.
  30. 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.
  31. 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.
  32. 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.
  33. 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.
  34. 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.
  35. 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.
  36. 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.
  37. 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.
  38. Arrhythmia Dataset. Available at: https://www.kaggle.com/code/mtavares51/binary-classification-on-arrhythmia-dataset. (accessed 30.05.2024).
  39. Credit Card Fraud Detection Dataset. Available at: https://www.kaggle.com/code/shivamsekra/credit-card-fraud-detection-eda-isolation-forest. (accessed 30.05.2024).
  40. Pima Indians Diabetes Dataset. Available at: https://www.kaggle.com/code/hafizramadan/data-science-project-iii. (accessed 30.05.2024).
  41. Haberman’s Survival Dataset. Available at: https://www.kaggle.com/datasets/gilsousa/habermans-survival-data-set. (accessed 30.05.2024).
  42. Ionosphere Dataset. Available at: https://www.kaggle.com/code/zymzym/classification-of-the-ionosphere-dataset-by-knn. (accessed 30.05.2024).
  43. Seismic Bumps Dataset. Available at: https://www.kaggle.com/datasets/pranabroy94/seismic-bumps-data-set. (accessed 30.05.2024).
  44. Shuttle Dataset. Available at: https://github.com/xuhongzuo/deep-iforest/tree/main. (accessed 30.05.2024).
  45. Annthyroid Dataset. Available at: https://github.com/GuansongPang/deviation-network. (accessed 30.05.2024).
  46. Bank Additional Dataset. Available at: https://github.com/GuansongPang/deviation-network. (accessed 30.05.2024).
  47. CelebA Dataset. Available at: https://github.com/GuansongPang/deviation-network. (accessed 30.05.2024).

Supplementary files

Supplementary Files
Action
1. JATS XML

Согласие на обработку персональных данных с помощью сервиса «Яндекс.Метрика»

1. Я (далее – «Пользователь» или «Субъект персональных данных»), осуществляя использование сайта https://journals.rcsi.science/ (далее – «Сайт»), подтверждая свою полную дееспособность даю согласие на обработку персональных данных с использованием средств автоматизации Оператору - федеральному государственному бюджетному учреждению «Российский центр научной информации» (РЦНИ), далее – «Оператор», расположенному по адресу: 119991, г. Москва, Ленинский просп., д.32А, со следующими условиями.

2. Категории обрабатываемых данных: файлы «cookies» (куки-файлы). Файлы «cookie» – это небольшой текстовый файл, который веб-сервер может хранить в браузере Пользователя. Данные файлы веб-сервер загружает на устройство Пользователя при посещении им Сайта. При каждом следующем посещении Пользователем Сайта «cookie» файлы отправляются на Сайт Оператора. Данные файлы позволяют Сайту распознавать устройство Пользователя. Содержимое такого файла может как относиться, так и не относиться к персональным данным, в зависимости от того, содержит ли такой файл персональные данные или содержит обезличенные технические данные.

3. Цель обработки персональных данных: анализ пользовательской активности с помощью сервиса «Яндекс.Метрика».

4. Категории субъектов персональных данных: все Пользователи Сайта, которые дали согласие на обработку файлов «cookie».

5. Способы обработки: сбор, запись, систематизация, накопление, хранение, уточнение (обновление, изменение), извлечение, использование, передача (доступ, предоставление), блокирование, удаление, уничтожение персональных данных.

6. Срок обработки и хранения: до получения от Субъекта персональных данных требования о прекращении обработки/отзыва согласия.

7. Способ отзыва: заявление об отзыве в письменном виде путём его направления на адрес электронной почты Оператора: info@rcsi.science или путем письменного обращения по юридическому адресу: 119991, г. Москва, Ленинский просп., д.32А

8. Субъект персональных данных вправе запретить своему оборудованию прием этих данных или ограничить прием этих данных. При отказе от получения таких данных или при ограничении приема данных некоторые функции Сайта могут работать некорректно. Субъект персональных данных обязуется сам настроить свое оборудование таким способом, чтобы оно обеспечивало адекватный его желаниям режим работы и уровень защиты данных файлов «cookie», Оператор не предоставляет технологических и правовых консультаций на темы подобного характера.

9. Порядок уничтожения персональных данных при достижении цели их обработки или при наступлении иных законных оснований определяется Оператором в соответствии с законодательством Российской Федерации.

10. Я согласен/согласна квалифицировать в качестве своей простой электронной подписи под настоящим Согласием и под Политикой обработки персональных данных выполнение мною следующего действия на сайте: https://journals.rcsi.science/ нажатие мною на интерфейсе с текстом: «Сайт использует сервис «Яндекс.Метрика» (который использует файлы «cookie») на элемент с текстом «Принять и продолжить».