In today’s digital landscape, where cyber threats are constantly evolving, the ability to accurately classify malicious network traffic is crucial for safeguarding cybersecurity. However, the deep learning models currently employed to tackle this challenge often require substantial volumes of data, which can be difficult to obtain and accurately label, especially when it comes to malicious traffic. Moreover, the computational demands of these large-scale models can be a significant obstacle for deployment on edge network devices, such as routers, which are vulnerable to cyber-attacks.
Researchers from the Institute of Systems Engineering, Academy of Military Sciences, PLA, have developed an innovative approach to address these challenges. Their lightweight model design method, called STPN, offers a precise, efficient, and highly generalizable solution for few-shot malicious traffic classification. By leveraging a stepwise transfer learning technique and an adversarial learning concept, the STPN method is able to extract robust and transferable features from limited data samples, while also significantly reducing the model’s parameter count and computational requirements. Deep learning, transfer learning, and adversarial learning are at the heart of this groundbreaking research.
Tackling the Challenges of Malicious Traffic Classification
The rapid evolution of cyber threats, such as Advanced Persistent Threats (APTs), has made the task of accurately classifying malicious network traffic increasingly challenging. Malicious actors often employ encryption and other techniques to obscure their activities, making it difficult for traditional inspection methods to identify threats. Additionally, the low-profile nature of some attacks, with sporadic data transfers or connection attempts, can lead to a scarcity of labeled malicious traffic data, a problem known as the “few-shot” scenario.
Conventional deep learning approaches, while powerful, require substantial volumes of data to train effectively. This poses a significant hurdle, as acquiring and accurately labeling malicious traffic data can be a daunting task. Furthermore, the computational demands of these deep learning models often exceed the capabilities of edge network devices, such as routers, which are themselves vulnerable to cyber-attacks.
Introducing the STPN Method
To address these challenges, the researchers at the Institute of Systems Engineering developed the STPN (Stepwise Transfer and Pruning) method, a lightweight model design approach for few-shot malicious traffic classification. The STPN method leverages the transferability of deep learning models and introduces several innovative techniques to enhance the model’s accuracy, efficiency, and generalization capabilities.

Stepwise Transfer Learning
The STPN method begins by training a source model, a fully convolutional neural network (FCNN), on a larger dataset of network traffic data. This source model serves as the foundation for the transfer learning process. The researchers then divide the source model into two components: a public feature extractor and a private feature extractor.
The public feature extractor is responsible for extracting common features that are shared between the source and target datasets. To achieve this, the researchers introduce an adversarial learning concept, which guides the public feature extractor to uncover invariant representations within the data, enhancing the model’s generalization capabilities.
The private feature extractor, on the other hand, is fine-tuned exclusively on the target dataset, focusing on extracting features specific to the few-shot malicious traffic classification task.
Targeted Pruning for Lightweight Design
To further optimize the model’s efficiency, the STPN method employs a targeted pruning approach. By analyzing the importance of neurons in both the public and private feature extractors, the researchers are able to selectively remove redundant model structures, resulting in a highly lightweight design.

Fig. 2
The key to the pruning process is the accurate identification of redundant neurons. The STPN method leverages the step-by-step transfer approach to ensure that the neuron weights are positively correlated with the target classification task, enabling more effective pruning.
Exceptional Performance and Generalization
The STPN method consistently achieves over 97% classification accuracy on various few-shot malicious traffic datasets, outperforming current mainstream approaches. Notably, the method reduces the model’s parameter count by over 85% while limiting accuracy loss to within 1%, demonstrating its superior generalization capabilities.

Fig. 3
Broader Impact and Future Directions
The STPN method’s ability to deliver accurate, lightweight, and highly generalizable models for few-shot malicious traffic classification has significant implications for the field of cybersecurity. By enabling the deployment of effective threat detection solutions on resource-constrained edge devices, the STPN method can help strengthen the security of critical infrastructure and protect against evolving cyber threats.
Looking ahead, the researchers plan to explore ways to further enhance the STPN method’s adaptability, allowing the model to keep pace with changes in network environments and accommodate new categories of malicious traffic. Additionally, they aim to address the data privacy concerns associated with model retraining, ensuring the security of the training data used in the few-shot scenario.

Algorithm 1
Overall, the STPN method represents a significant advancement in the field of malicious traffic classification, paving the way for more robust and efficient cybersecurity solutions that can adapt to the rapidly changing landscape of cyber threats.
Author Credit: This article is based on research by Ruonan Wang, Minhuan Huang, Jinjing Zhao, Hongzheng Zhang, Wenjing Zhong, Zhaowei Zhang, Liqiang He.
For More Related Articles Click Here