[Paper Review] Self-Supervised and Interpretable Anomaly Detection using Network Transformers
This paper proposes the Network Transformer (NeT), a self-supervised, interpretable deep learning model for anomaly detection in network traffic that leverages the graph structure of computer networks. By using a Transformer-based architecture to learn hierarchical features from raw packet data, NeT enables detection of anomalies while identifying affected devices and connections, achieving high interpretability without requiring labeled data.
Monitoring traffic in computer networks is one of the core approaches for defending critical infrastructure against cyber attacks. Machine Learning (ML) and Deep Neural Networks (DNNs) have been proposed in the past as a tool to identify anomalies in computer networks. Although detecting these anomalies provides an indication of an attack, just detecting an anomaly is not enough information for a user to understand the anomaly. The black-box nature of off-the-shelf ML models prevents extracting important information that is fundamental to isolate the source of the fault/attack and take corrective measures. In this paper, we introduce the Network Transformer (NeT), a DNN model for anomaly detection that incorporates the graph structure of the communication network in order to improve interpretability. The presented approach has the following advantages: 1) enhanced interpretability by incorporating the graph structure of computer networks; 2) provides a hierarchical set of features that enables analysis at different levels of granularity; 3) self-supervised training that does not require labeled data. The presented approach was tested by evaluating the successful detection of anomalies in an Industrial Control System (ICS). The presented approach successfully identified anomalies, the devices affected, and the specific connections causing the anomalies, providing a data-driven hierarchical approach to analyze the behavior of a cyber network.
Motivation & Objective
- To address the lack of interpretability in black-box machine learning models for network anomaly detection.
- To develop a method that identifies not only anomalies but also the specific devices and connections responsible.
- To enable training without labeled data through self-supervised learning.
- To incorporate the inherent graph topology of network communication into the model for improved explainability.
- To provide a hierarchical feature representation enabling analysis at multiple levels of granularity.
Proposed method
- The model processes raw network packet data by grouping packets by source and destination addresses to form a communication graph.
- A Transformer neural network learns embedded representations of nodes and edges in the network graph from sequential packet data.
- An aggregator module extracts hierarchical features representing network-level, device-level, and connection-level behaviors.
- Self-supervised pre-training is performed using contrastive learning objectives on unlabeled data to learn meaningful representations without ground-truth labels.
- Downstream anomaly detection is performed using unsupervised models (OCSVM, LOF, AE) on the hierarchical features.
- The end-to-end differentiable pipeline allows backtracking from global anomalies to individual nodes and connections for interpretability.
Experimental results
Research questions
- RQ1Can a self-supervised deep learning model detect network anomalies while preserving interpretability through graph structure?
- RQ2How effective is the hierarchical feature extraction in identifying the root cause of anomalies at different levels of granularity?
- RQ3To what extent can self-supervised pre-training improve anomaly detection performance without labeled data?
- RQ4Can the model’s internal representations be used to explain which devices and connections are involved in an anomaly?
- RQ5How does incorporating network topology into the model architecture improve diagnostic capability compared to black-box models?
Key findings
- The Network Transformer successfully detected anomalies in an industrial control system (ICS) network using only unlabeled data.
- The model provided interpretable results by identifying specific devices and connections responsible for anomalies, enabling targeted diagnosis.
- Hierarchical feature extraction allowed analysis from global network behavior down to individual node and edge activity.
- The self-supervised pre-training strategy enabled effective representation learning without requiring labeled anomalies.
- The approach demonstrated an end-to-end differentiable pipeline from raw packet bytes to global network representations, supporting explainability at multiple levels.
- The integration of graph structure into the Transformer architecture enhanced model interpretability and diagnostic utility.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.