Fractal: Facilitating Robust Encrypted Traffic Classification Using Data Augmentation and Contrastive Learning

Yitong Cai, Shu Li, Hongfei Zhang, Yuyi Liu, Meijie Du, Binxing Fang

Published: 2024, Last Modified: 27 May 2026SMC 2024EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Encrypted traffic classification using deep learning models based on packet length sequences has shown promising results. However, in real-world network conditions, network-induced phenomena such as packet loss, packet retransmission, and packet disorder are prevalent, leading to a decline in performance. To address this challenge, we propose Fractal, a novel approach designed to enhance existing deep learning models by integrating data augmentation and contrastive learning, thereby facilitating robust encrypted traffic classification under various network conditions. Specifically, Fractal employs three data augmentations to simulate different network conditions, generating diverse packet length sequences from the same flow. Contrastive learning is then leveraged to distill robust features from these augmented sequences. Fractal enables deep learning model to discern the intrinsic patterns of each flow, regardless of the variance in packet length sequences caused by network-induced phenomena. Our comprehensive evaluations demonstrate that Fractal enhances the classification performance of deep learning models under different network conditions, achieving 23% increase in accuracy and 15% improvement in F1-score.
Loading