Journal of Applied Sciences ›› 2025, Vol. 43 ›› Issue (3): 437-450.doi: 10.3969/j.issn.0255-8297.2025.03.006

• Computer Science and Applications • Previous Articles    

Semi-supervised Encrypted Traffic Classification Model Based on Contrastive Learning

JIN Yanliang1,2, FANG Jie1,2, GAO Yuan1,2, ZHOU Jiahao1,2   

  1. 1. School of Communication and Information Engineering, Shanghai University, Shanghai 200444, China;
    2. Shanghai Institute for Advanced Communication and Data Science, Shanghai University, Shanghai 200444, China
  • Received:2023-07-04 Published:2025-06-23

Abstract: To address the performance degradation of most encrypted traffic classification (ETC) models due to scarce labeled data, this paper proposes a semi-supervised encrypted traffic classification model based on contrastive learning (SSETC-CL). By comparing the similarities and differences between samples, SSETC-CL is capable of learning useful representations from large amounts of unlabeled data, thereby obtaining a versatile and effective feature encoding network, and reducing dependence on labeled data for downstream tasks. The performance of SSETC-CL is evaluated on the public dataset ISCXVPN2016 as well as two self-collected datasets. Compared to other baseline models, SSETC-CL achieved a maximum accuracy improvement of 8.92% on the specified task, showing its superior performance. Experimental results clearly demonstrate that SSETC-CL not only achieves high accuracy on traffic seen during pretraining but also exhibits the ability to transfer the knowledge gained from pretraining to unknown traffic.

Key words: encrypted traffic classification (ETC), contrastive learning, semi-supervised, data augmentation, transfer learning

CLC Number: