SimSeq: A Robust TLS Traffic Classification Method
摘要
With the increasing deployment of encrypted protocols such as TLS, traditional deep packet inspection techniques have become ineffective, posing challenges to traffic classification. In this paper, we propose SimSeq, a robust TLS traffic classification method that relies solely on packet length sequences. To simulate real-world network conditions, we design two perturbation scenarios that emulate fast retransmission and timeout retransmission behaviors. Each scenario is configured with multiple packet loss rates, where smaller rates represent mild congestion and larger rates reflect more congested network conditions. We generate perturbation views of packet sequences using reliable transmission logic and leverage a contrastive learning framework to learn robust and discriminative representations. The encoder, composed of a BiLSTM and attention pooling module, is pretrained with a SimCLR-style contrastive loss and then finetuned with scenario-specific classification heads. Experimental results on the CESNET-TLS22 dataset show that SimSeq achieves strong and stable performance under both scenarios, with average F1-scores of 0.88 and 0.93, respectively.