TL;DR
This paper introduces a novel network traffic classification method using an MLP-Mixer neural network that leverages multi-view inputs (packet header, body, and flow features) and a multi-label learning approach. This approach aims to overcome the limitations of traditional CNNs by better capturing global packet structure and inter-scenario correlations, leading to improved anomaly detection performance.
What Problem Does This Paper Address?
Network traffic classification is crucial for cybersecurity applications, enabling the identification of malicious activities and ensuring quality of service. Existing methods, particularly those based on Convolutional Neural Networks (CNNs), often focus on local patterns within packet data. However, this can be suboptimal for network traffic, where protocols at different layers have distinct structures and global information is vital. Furthermore, many approaches treat different classification scenarios (e.g., normal vs. abnormal, different application types) in isolation, missing potential correlations that could enhance learning. This paper addresses these limitations by proposing a method that considers multiple perspectives of network traffic data and learns across related classification tasks simultaneously.
Methods
The core of the proposed method is an MLP-Mixer neural network architecture. Unlike CNNs that rely on local feature extraction, MLP-Mixer uses simple Multi-Layer Perceptrons (MLPs) to mix information across different "tokens" (patches of the input) and "channels," making it more suitable for the structured, sequential nature of network packets.
Key methodological innovations include:
- Multi-view Feature Extraction: The input packet is divided into three distinct "views":
- Packet Header: Focuses on the structured and information-rich header fields.
- Packet Body: Captures the potentially complex and encrypted payload.
-
Flow Features: Incorporates statistical features derived from the traffic flow to which the packet belongs. These views are processed in parallel to extract features from different perspectives.
-
MLP-Mixer Architecture: The MLP-Mixer is employed for feature extraction within each view. The authors argue that its ability to mix information globally is more aligned with packet structure than CNNs.
- Hierarchical Feature Mixing: Features from the different views are combined and processed through a hierarchical mixing module using multiple Mixer layers. This module aims to maximize mutual information between views and extract specialized features for different label levels.
- Multi-label Learning: The model is designed to handle multiple labels simultaneously. This allows it to learn correlations between different classification scenarios (e.g., anomaly detection and specific application types), improving overall classification efficiency and accuracy. A combinatorial loss function is used, incorporating parent-level, child-level, and hierarchical constraint losses.
- Byte Encoding: Packets are represented as one-dimensional vectors using byte encoding, preserving all raw packet information and reducing the need for manual feature engineering.
Datasets
The authors evaluated their method on three publicly available network traffic datasets:
- Tor and non-Tor Dataset: Collected by Lashkari et al., distinguishing traffic routed through the Tor network from non-Tor traffic.
- VPN and non-VPN Dataset: Collected by Draper-Gil et al., differentiating VPN traffic from non-VPN traffic.
- USTC-TFC2016 Dataset: Collected by Wei et al., containing normal and malware traffic.
These datasets were preprocessed, including packet cleaning, byte encoding, and flow feature extraction using ISCXFlowMeter. The datasets were then balanced using sampling techniques for experimental evaluation.
Key Insights and Ideas
- MLP-Mixer's Suitability for Network Traffic: The paper strongly advocates for MLP-Mixer over CNNs for network traffic classification, positing that its global mixing mechanism better reflects the protocol structure of packets than CNNs' local pattern focus.
- Value of Multi-view Inputs: Combining packet header, body, and flow features provides a more comprehensive understanding of network traffic, leading to improved performance, especially at the traffic level.
- Synergy of Multi-label Learning: Learning across related classification tasks simultaneously (e.g., anomaly detection and specific application types) leverages inter-scenario correlations to boost overall accuracy and efficiency.
- Hierarchical Structure Matters: The proposed hierarchical feature mixing and loss function effectively capture and utilize the relationships between different levels of classification granularity.
Key Results
The proposed multi-view multi-label MLP-Mixer model demonstrated superior performance across the evaluated datasets.
- Anomaly Detection: The model achieved excellent results, often outperforming other methods, particularly on the VPN dataset. While the binary anomaly detection task was relatively simple for all models, the proposed method showed robust performance.
- Traffic Label Classification: In multi-class traffic classification tasks, the proposed model consistently outperformed 1D-CNN, Mixer, and multi-view multi-label MLP baselines. For instance, on the Tor and non-Tor dataset, the model achieved an average F1 score of 0.9999, compared to 0.9998 for the Mixer model.
- Robustness to Imbalanced Data: The model showed remarkable resilience to imbalanced datasets, with performance degradation being minimal compared to other methods. This is attributed to its strong feature extraction capabilities and the hierarchical loss function that helps focus on minority classes.
- Visualization Insights: Input importance visualizations indicated that the header part of the packet significantly impacts classification, and the multi-view approach effectively leverages this and other features.
Limitations and Future Work
- Computational Cost: While MLP-Mixer is simpler than some complex CNN architectures, the multi-view and multi-label aspects can increase computational demands. The paper does not explicitly detail the computational complexity or inference speed.
- Dataset Specificity: While three public datasets were used, the performance might vary on different types of network traffic or under evolving threat landscapes.
- Future Work: The authors suggest further exploration of the MLP-Mixer architecture for network traffic classification and the potential for more advanced multi-label learning strategies. The paper also hints at the possibility of extending the multi-view approach to incorporate more diverse data sources.
Summary updated