GEE: A Gradient-based Explainable Variational Autoencoder for Network Anomaly Detection

Quoc Phong Nguyen, Kar Wai Lim, Dinil Mon Divakaran, Kian Hsiang Low, Mun Choon ChanCNS 2019

Abstract

Network anomaly detection is critical for identifying malicious activities like DDoS attacks and port scans. Traditional supervised methods struggle with the lack of labeled data and the "black box" nature of deep learning. We present GEE, a framework that utilizes a Variational Autoencoder (VAE) for unsupervised anomaly detection and a novel gradient-based fingerprinting technique to explain detected anomalies. Evaluated on the UGR16 dataset, GEE achieves high detection accuracy (AUC of 0.947) and provides interpretable signatures for forensic analysis.

Introduction

The increasing complexity of network attacks necessitates robust and interpretable detection systems. Rule-based systems are ineffective against zero-day threats, while supervised machine learning requires extensive labeled datasets that are often unavailable in real-world ISP environments. Furthermore, existing deep learning solutions often lack explainability, leaving security analysts without the context needed for effective response. This paper introduces GEE (Gradient-based Explainable Variational Autoencoder) to address these gaps.

The GEE Framework

GEE is built on two core components: unsupervised detection and gradient-based explanation.

1. Unsupervised Detection via VAE

The system employs a VAE to learn the latent distribution of "normal" network traffic. Unlike standard autoencoders, VAEs model data as a probability distribution, enhancing robustness. Anomalies are identified by high reconstruction error—the difference between the input and the model's attempt to recreate it.

The VAE architecture used in GEE, featuring an encoder-decoder structure with a latent representation layer.

2. Gradient-based Fingerprinting

To explain why a flow is anomalous, GEE calculates the gradient of the VAE’s objective function with respect to each input feature. These gradients indicate which features contributed most to the reconstruction error. By aggregating these gradients, GEE creates a "fingerprint" or signature for specific attack types, enabling classification and forensic analysis without prior labels.

Experimental Evaluation

The framework was tested using the UGR16 dataset, which contains real-world NetFlow records from a Tier 3 ISP. Features were extracted using 3-minute sliding windows, resulting in 53-dimensional vectors representing traffic behavior (e.g., flow durations, byte rates, and port distributions).

Results and Discussion

GEE demonstrated superior performance compared to standard Autoencoders (AE) and Gaussian-based Thresholding (GBT). The VAE model achieved an average AUC of 0.947, significantly outperforming the baselines.

ROC curve comparing the performance of VAE, AE, and GBT in detecting network anomalies.

The fingerprinting technique also proved highly effective. Clustering the gradient fingerprints allowed for the identification of behavioral patterns; for instance, 92.4% of DoS attacks fell into just two clusters. This provides SOC analysts with actionable insights rather than just binary alerts. While the system struggled with non-behavioral anomalies (like blacklisted IPs that behave normally), its real-time inference speed (20ms) makes it viable for deployment.

Conclusion

GEE offers a powerful, unsupervised approach to network security that bridges the gap between detection and explanation. By leveraging gradients as forensic tools, it moves beyond the "black box" limitations of deep learning. Future work will explore Conditional VAEs to further refine detection across diverse traffic baselines.

Summary updated

BibTeX
@inproceedings{nguyen2019gee,
  author = {Quoc Phong Nguyen and Kar Wai Lim and Dinil Mon Divakaran and Kian Hsiang Low and Mun Choon Chan},
  title = {{GEE: A Gradient-based Explainable Variational Autoencoder for Network Anomaly Detection}},
  booktitle = {CNS},
  year = {2019},
  url = {https://openreview.net/forum?id=CpP3HsU4V0},
}
Figure