One-Class Intrusion Detection with Dynamic Graphs

Aleksei Liuliakov, Alexander Schulz, Luca Hermes, Barbara HammerICANN 2023

Abstract

With the growing digitalization all over the globe, the relevance of network security becomes increasingly important. Machine learning-based intrusion detection constitutes a promising approach for improving security, but it bears several challenges. These include the requirement to detect novel and unseen network events, as well as specific data properties, such as events over time together with the inherent graph structure of network communication. In this work, we propose a novel intrusion detection method, TGN-SVDD, which builds upon modern dynamic graph modelling and deep anomaly detection. We demonstrate its superiority over several baselines for realistic intrusion detection data and suggest a more challenging variant of the latter.

Introduction

Traditional Network Intrusion Detection Systems (NIDS) are increasingly challenged by the complexity of modern network traffic. Two primary hurdles exist: the inherent graph-structured and temporal nature of network data, and the emergence of "zero-day" threats that supervised models fail to recognize. While one-class classification—learning a representation of "normal" behavior—offers a solution for detecting unknown attacks, existing methods often fail to capture the dynamic evolution of network topologies.

Methodology: The TGN-SVDD Framework

We introduce TGN-SVDD, an unsupervised framework that treats network traffic as a dynamic, evolving graph. The architecture fuses two powerful components:

  1. Temporal Graph Network (TGN) Encoder: This component maintains a persistent memory for every node (IP address). As connections occur, an attention mechanism updates node embeddings based on temporal history and neighborhood context.
  2. Deep SVDD Decoder: Based on Deep Support Vector Data Description principles, the model maps "normal" network events into a compact hypersphere in a high-dimensional feature space during training.

Anomalies are detected by calculating the distance of concatenated source and destination embeddings from the center of this "normal" hypersphere. Vectors falling outside a defined threshold (e.g., the 99th percentile) are flagged as potential intrusions.

Experimental Evaluation

The model was evaluated using the CIC-IDS2017 dataset, which includes realistic background traffic and various attack profiles like DoS, DDoS, and Botnets. We utilized the NFStream framework to convert raw PCAP files into timestamped NetFlow events. Following a "Monday-plus-one" setup, the model was trained on benign Monday traffic and tested on subsequent days containing attacks.

Table 1: Statistics of the CIC-IDS2017 dataset subsets used for evaluation.

Results and Discussion

TGN-SVDD consistently outperformed standard baselines, including Isolation Forest (IF) and Local Outlier Factor (LOF). On "Tuesday" and "Wednesday" subsets, the model achieved a near-perfect ROC AUC of 0.999.

Figure 1: Visualization of distances from the hypersphere center over time (left) and the corresponding KDE plot (right). The red line indicates the 99th percentile threshold, effectively separating normal traffic (purple) from attacks (yellow).

Key Insights

  • Structural Sufficiency: Remarkably, TGN-SVDD maintained high performance (ROC AUC ~0.999) even in a "featureless" scenario where packet-related features were zeroed out, relying solely on graph topology and timing.
  • Pattern Learning vs. Memorization: To address potential bias regarding specific IP addresses (e.g., "Node 32" appearing only during attacks), we injected such nodes into training as benign. The model successfully learned the behavioral patterns rather than just memorizing IDs, correctly flagging malicious activity from these nodes during testing.
  • Objective Clarity: While standard TGNs are designed for edge prediction, the SVDD objective provides a significantly cleaner signal for anomaly detection, reducing the "noise" inherent in vanilla temporal graph models.

Conclusion

TGN-SVDD demonstrates the power of combining dynamic graph modeling with one-class deep learning for network security. While highly effective against most attack types, the model faced challenges with 'Bot' and 'Infiltration' attacks that closely mimic normal traffic. Future research will explore semi-supervised SVDD to incorporate limited labeled attack data and investigate methods to reduce the computational overhead of maintaining per-node memory in global-scale networks.

Summary updated

BibTeX
@inproceedings{liuliakov2023one,
  author = {Aleksei Liuliakov and Alexander Schulz and Luca Hermes and Barbara Hammer},
  title = {{One-Class Intrusion Detection with Dynamic Graphs}},
  booktitle = {ICANN},
  year = {2023},
  url = {https://openreview.net/forum?id=26ZdwChDvV},
}
Figure