Abstract
Accurate and efficient classification of large-scale network traffic is fundamental to ensuring network Quality of Service (QoS) and security. However, existing methodologies face critical challenges. While payload-based pre-trained models have achieved success, they often rely on memorizing session-specific encryption artifacts, leading to catastrophic performance degradation under realistic “inter-flow” splitting scenarios. Furthermore, the scarcity of labeled samples and the high computational cost of large models hinder their practical deployment. To address these limitations, this paper proposes an integrated framework, IHUD-BERT, which integrates robust feature representation with knowledge distillation. We first introduce the IP Header Unit (IHU) scheme, applying a sliding window over IP packet headers. Unlike payload-based approaches, this method captures invariant behavioral patterns that remain consistent across encrypted sessions, ensuring robustness against encryption randomization while augmenting limited training data. Subsequently, a pre-trained Transformer (IHU-BERT) is constructed as a teacher model, and its comprehensive knowledge is transferred to a lightweight student model (IHUD-BERT) via hierarchical knowledge distillation. Comprehensive evaluations on multiple datasets validate our approach. The results demonstrate that while payload-based baselines collapse under strict inter-flow evaluation on encrypted traffic, our method maintains high accuracy. Notably, the lightweight IHUD-BERT achieves only a marginal performance degradation compared to its teacher counterpart while delivering millisecond-level inference latency. These results establish the proposed framework as a robust, high-precision, and efficient solution for modern encrypted traffic classification.
Funding Information
  • 2026 Enhancement of Independent Innovation - Disciplinary Interdisciplinary Innovation Project through the project Construction of Multi-mode Fusion Communication Platform for Mine Leaky Cable (81001203A56)
  • Fundamental Research Funds for the Central Universities (2025ZKPYZN02)
  • National Key Research and Development Program of China (2024YFB2908700)
  • Chinese Academy of Sciences (2021168)
  • Guoneng Zhishen Control Technology Co., Ltd. through the project Research and Development of Boundary-aware Intelligent Coal Sorting Technology Using Weakly Supervised Training