Abstract
Network traffic classification aims to recognize different application or traffic types by analyzing received data packets. This paper presents a neural network model with deep and parallel network-in-network (NIN) structures for classifying encrypted network traffic. Comparing with standard convolutional neural networks (CNN), NIN adopts a micro network after each convolution layer to enhance local modeling. Besides, NIN utilizes a global average pooling instead of traditional fully connected layers before final classification, which reduces the number of model parameters significantly. In our proposed method, deep NIN models with multiple MLP convolutional layers are built to map fixed-length packet vectors towards application or traffic labels. Furthermore, a parallel decision strategy of building two sub-networks to process packet header and packet body separately is designed considering that they may carry different kinds of clues for classification. The results of our experiments on the “ISCX VPN-nonVPN” encrypted traffic dataset show that NIN models can achieve a better balance between classification accuracy and model complexity than conventional CNNs. The parallel decision strategy can further improve the accuracy of using single NIN model for encrypted network traffic classification. Finally, the test set F1 scores of 0.983 and 0.985 are achieved for traffic characterization and application identification respectively.
Introduction
In the modern digital landscape, encryption has become the standard for network communication. While this enhances privacy, it renders traditional traffic classification methods—such as port-based analysis or Deep Packet Inspection (DPI)—largely ineffective. Modern encrypted protocols like HTTPS, SSH, and VPNs mask the plaintext patterns that DPI relies upon.
Researchers have increasingly turned to deep learning, specifically Convolutional Neural Networks (CNNs), to identify hidden patterns in encrypted bitstreams. However, standard CNNs face two primary challenges in this domain: linearity and overfitting. Standard convolution layers are linear, which may limit their capacity to model the complex, non-linear relationships inherent in encrypted data. Additionally, the heavy reliance on fully connected layers at the end of CNN architectures often leads to a parameter explosion, making models prone to overfitting on specific datasets.
Methodology
Network-in-Network (NIN) Architecture
To address the limitations of standard CNNs, this research proposes the use of Network-in-Network (NIN) structures. Unlike a traditional convolution layer that uses a simple linear filter, NIN integrates a "micro-network"—specifically a Multilayer Perceptron (MLP)—after each convolution layer. This allows the model to learn significantly more complex, non-linear interactions across data channels within the local receptive field.
Furthermore, the proposed model replaces traditional, parameter-heavy fully connected layers with Global Average Pooling (GAP). In this approach, the average value of each feature map in the final layer is taken and fed directly into the softmax classifier. This change drastically reduces the total number of parameters, making the model lighter and more robust against overfitting.
Parallel Decision Strategy
The researchers observed that network packets are not monolithic; the header (Network and Transport layers) and the body (Application layer) contain distinct types of information. To exploit this, they developed a parallel architecture ($NIN_{parallel}$):
- Header Sub-network: Processes the first 40 bytes of the packet.
- Body Sub-network: Processes the remaining 1460 bytes.
- Fusion: The outputs of these sub-networks are combined using a weighted linear combination to produce the final classification.
Experimental Results
The study utilized the ISCX VPN-nonVPN dataset, a benchmark containing pcap files for various applications (e.g., Skype, Netflix) in both standard and VPN formats. The models were tested on two tasks: Application Identification (14 classes) and Traffic Characterization (12 classes).
Performance and Complexity
The $NIN_{parallel}$ model demonstrated superior performance compared to standard CNN baselines and previous state-of-the-art models:
- Task A (Application Identification): Achieved a test set F1 score of 0.985.
- Task B (Traffic Characterization): Achieved a test set F1 score of 0.983.
- Efficiency: The $NIN_{small}$ variant utilized approximately 1.1 million parameters, a significant reduction from the 12.1 million parameters used by the benchmark "Deep Packet" model, while maintaining higher accuracy.
Key Insights
A critical finding was the disproportionate importance of packet headers. Models trained solely on the 40-byte header performed nearly as well as those using the entire packet. In contrast, models relying only on the encrypted body struggled, achieving F1 scores between 0.58 and 0.68. This suggests that while encryption masks the payload, the structural metadata in headers remains a highly discriminative feature.
Conclusion
By replacing linear convolution layers with MLP-based micro-networks and adopting a parallel processing strategy for headers and bodies, the NIN architecture provides a powerful tool for encrypted traffic classification. It achieves state-of-the-art accuracy with a fraction of the parameters required by traditional deep learning models. Future research will focus on improving feature extraction from encrypted payloads and optimizing these models for real-time deployment in high-throughput network environments.
Summary updated