TY - JOUR
T1 - Explainable Anomaly Detection in Network Traffic Using Normalizing Flows
AU - Shafir, Lior
AU - Giryes, Raja
AU - Wool, Avishai
N1 - Publisher Copyright:
© 2025 IEEE.
PY - 2025
Y1 - 2025
N2 - Anomaly detection in network traffic is critical for identifying deviations from normal behavior—including sophisticated cyber threats and previously unseen attacks—especially when anomalous examples are absent from the training data. The escalating complexity of cyber-attacks necessitates developing methods that not only identify low-likelihood traffic but also provide insights into its anomalous nature and deviations from normal behavior, enabling effective response and troubleshooting. In this work, we leverage the unique capabilities of normalizing flows (NF), a state-of-the-art reversible generative model for exact density estimation, to detect anomalies using only normal traffic. Our approach fundamentally differs from previous methods by utilizing NF’s exact likelihood computation for unsupervised detection and combining it with Shapley values to introduce a novel feature selection framework for guiding the selection of discriminative features in anomaly detection, while also providing statistically grounded enhanced explanations for detected anomalies, pinpointing potential root causes. Through experiments on CICIoT-2023, ISCXTor2016, and CICIDS2017, we demonstrate that our NF-based approach outperforms existing state-of-the-art methods for unsupervised anomaly detection. Notably, on the CICIoT-2023 dataset, we achieve an accuracy of 0.9951, comparable or higher than supervised methods, despite being trained solely on normal data.
AB - Anomaly detection in network traffic is critical for identifying deviations from normal behavior—including sophisticated cyber threats and previously unseen attacks—especially when anomalous examples are absent from the training data. The escalating complexity of cyber-attacks necessitates developing methods that not only identify low-likelihood traffic but also provide insights into its anomalous nature and deviations from normal behavior, enabling effective response and troubleshooting. In this work, we leverage the unique capabilities of normalizing flows (NF), a state-of-the-art reversible generative model for exact density estimation, to detect anomalies using only normal traffic. Our approach fundamentally differs from previous methods by utilizing NF’s exact likelihood computation for unsupervised detection and combining it with Shapley values to introduce a novel feature selection framework for guiding the selection of discriminative features in anomaly detection, while also providing statistically grounded enhanced explanations for detected anomalies, pinpointing potential root causes. Through experiments on CICIoT-2023, ISCXTor2016, and CICIDS2017, we demonstrate that our NF-based approach outperforms existing state-of-the-art methods for unsupervised anomaly detection. Notably, on the CICIoT-2023 dataset, we achieve an accuracy of 0.9951, comparable or higher than supervised methods, despite being trained solely on normal data.
KW - DDoS attacks
KW - flow-based network intrusion detection
KW - intrusion detection system
KW - network flow
UR - https://www.scopus.com/pages/publications/105019539168
U2 - 10.1109/TON.2025.3617580
DO - 10.1109/TON.2025.3617580
M3 - ???researchoutput.researchoutputtypes.contributiontojournal.article???
AN - SCOPUS:105019539168
SN - 1063-6692
JO - IEEE Transactions on Networking
JF - IEEE Transactions on Networking
ER -