Understanding Self-Supervised Representation Learning for Encrypted Traffic
Zongxi Liu, Shuai Mao, Jie Chuai, Hongyang Du
Key points
From the paper's conclusion- We further examine cross-view contrastive learning through AlignTraffic and find that complementary supervision improves representation quality beyond contextual prediction alone.
Abstract
SSL has been adopted for encrypted traffic classification to learn representations from unlabeled traces and reduce reliance on manual feature engineering. However, recent studies show that data leakage can inflate reported performance and that pretrained models can underperform shallow classifiers once leakage is controlled. These findings raise questions about what information SSL can learn from encrypted traffic and how different pretraining mechanisms exploit this information. In this paper, we systematically investigate these questions by examining the sources of learnable information, the effectiveness of contextual pretraining, alternative self-supervision mechanisms, and the limits of representation learning. We first find that visible protocol fields retain contextual dependencies that are strongest between adjacent bytes, while payload interventions establish the classification value of retained plaintext structure. Guided by these insights, we investigate byte-level contextual learning through ByteBERT and TrafficDCNet, showing that aligning prediction granularity with local dependencies produces more discriminative representations. We further examine cross-view contrastive learning through AlignTraffic and find that complementary supervision improves representation quality beyond contextual prediction alone. Across four public classification tasks, AlignTraffic outperforms shallow learning by 5.97% to 30.70%, with additional evaluations on industrial traffic demonstrating its effectiveness in broader settings. Finally, evaluations on Tor traffic and individual packets reveal limitations when application information is concealed or unevenly distributed. These findings provide a systematic understanding of how observable information and self-supervision mechanisms shape the effectiveness and scope of representation learning for encrypted traffic.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- When Handshakes Go Dark: An Adaptive Semantic-Sequential Fusion Framework for Encrypted Traffic ClassificationarXiv · 2026
- TP-Net: Self-Supervised Pretrained Network Traffic Representations for Few-Shot Threat Detection in IoT and Sensor Networks.Sensors (Basel, Switzerland) · 2026
- TrafficLLM: LLMs for improved open-set encrypted traffic analysisComputer Networks · 2025
- Confidence-Gated Prototype-Guided Graph Contrastive Learning for Semi-Supervised Encrypted Traffic ClassificationComputers · 2026
- Open-set detection of training-time unseen attacks in encrypted traffic based on a multi-granularity pre-trained transformer and prototype contrastive learning.PloS one · 2026
- SEROA: Stable Encrypted-Traffic Representation and Online Adaptation for Service-Aware NetworksarXiv · 2026