Multi-Head Self-Attention Model for Anomaly Detection in Encrypted Network Traffic

Authors

  • Waldemar Brzozowski Faculty of Electrical, Electronic, Computer and Control Engineering, Łódź University of Technology, Łódź 90-924, Poland
  • Ignacy Gajewski Faculty of Electrical, Electronic, Computer and Control Engineering, Łódź University of Technology, Łódź 90-924, Poland
  • Leonidas Kaczorowski Faculty of Information Technology, Lublin University of Technology, Lublin 20-618, Poland

DOI:

https://doi.org/10.64972/jaat.2025v3.184p12e:145-158

Keywords:

Network Security, Anomaly Detection, Encrypted Traffic, Deep Learning, Self-Attention, Network Monitoring

Abstract

With the continuous development of encryption technology, it has become increasingly difficult to detect abnormal behavior in encrypted network traffic within current cybersecurity. To address the issue of detecting anomalies in encrypted traffic, this paper designs a multi-head self-attention neural network. A method using deep attention mechanisms and advanced feature engineering to model the complex feature dependencies in encrypted traffic streams, in order to more accurately distinguish between normal and abnormal behaviors. Extensive testing was conducted on a large-scale real-world encrypted traffic dataset with multiple protocols and operating environments. The new model achieved an accuracy of 98.6%, an F1-score of 97.7%, and a ROC-AUC of 0.996, indicating significant improvements over previous methods and those based on deep learning. The diversity of attention heads, feature selection, and composite loss design are crucial for the overall stability and detection performance of the system. Due to its good generalization ability and low-latency inference, this model can be used in high-throughput, dynamic network environments. Using multi-head self-attention and custom features to build a robust and scalable system for identifying anomalies in encrypted traffic lays a solid foundation for further research and applications in network security.

Downloads

Published

2025-04-02

How to Cite

Brzozowski, W., Gajewski, I., & Kaczorowski, L. (2025). Multi-Head Self-Attention Model for Anomaly Detection in Encrypted Network Traffic. Journal of Applied Automation Technologies, 3, 12e:145–158. https://doi.org/10.64972/jaat.2025v3.184p12e:145-158

Issue

Section

Articles