TY - JOUR
T1 - Janus
T2 - Heterogeneous Contrastive Pre-training for Encrypted Traffic Detection in IoT Environments
AU - Chen, Kewei
AU - Yuan, Qingjun
AU - Tao, Jing
AU - Wang, Pinghui
AU - Yu, Yong
AU - Yu, Gang
AU - Wang, Yongjuan
N1 - Publisher Copyright:
© 2014 IEEE.
PY - 2026
Y1 - 2026
N2 - Pre-training has effectively addressed the challenge of scarce labeled data in encrypted traffic analysis, particularly in IoT scenarios where diverse device types and highly heterogeneous protocols make labeled data acquisition even more difficult. The paradigm of learning general representations from large-scale unlabeled data and adapting them to downstream tasks has gained widespread attention in traffic analysis across both traditional networks and IoT environments. Current mainstream methods predominantly adopt masked reconstruction as the pre-training objective, which aims to recover masked features. However, these masked reconstruction-based pre-training approaches force models to overfocus on fine-grained, semanticsagnostic details - such as exactly reconstructing packet length mean values or port numbers - while neglecting the overall semantic invariance that traffic should maintain under different perturbations. To address this issue, we propose Janus, a heterogeneous augmentation-enhanced contrastive pre-training framework. Janus explicitly partitions traffic features into metric features and attribute features, and applies Gaussian noise and random masking as tailored augmentation operations, respectively. Through independent stochastic augmentation, two complete views with semantically consistent yet distinct perturbation patterns are generated for each original sample, enabling contrastive pre-training that pulls positive pairs closer and pushes negative pairs apart. This design forces the encoder to learn universal traffic representations robust to both numerical fluctuations and discrete missing, fundamentally avoiding the semantic destruction of either feature type caused by a uniform augmentation strategy, and guiding the model to focus on cross-sample global semantic invariance rather than precise reconstruction of local values. Experiments conducted on public encrypted traffic datasets covering both traditional network and IoT scenarios show that Janus achieves an average classification accuracy exceeding 98%. Controlled ablations confirm that the heterogeneous augmentation strategy, rather than the input representation, drives the performance gains, validating the effectiveness of Janus in encrypted traffic detection tasks.
AB - Pre-training has effectively addressed the challenge of scarce labeled data in encrypted traffic analysis, particularly in IoT scenarios where diverse device types and highly heterogeneous protocols make labeled data acquisition even more difficult. The paradigm of learning general representations from large-scale unlabeled data and adapting them to downstream tasks has gained widespread attention in traffic analysis across both traditional networks and IoT environments. Current mainstream methods predominantly adopt masked reconstruction as the pre-training objective, which aims to recover masked features. However, these masked reconstruction-based pre-training approaches force models to overfocus on fine-grained, semanticsagnostic details - such as exactly reconstructing packet length mean values or port numbers - while neglecting the overall semantic invariance that traffic should maintain under different perturbations. To address this issue, we propose Janus, a heterogeneous augmentation-enhanced contrastive pre-training framework. Janus explicitly partitions traffic features into metric features and attribute features, and applies Gaussian noise and random masking as tailored augmentation operations, respectively. Through independent stochastic augmentation, two complete views with semantically consistent yet distinct perturbation patterns are generated for each original sample, enabling contrastive pre-training that pulls positive pairs closer and pushes negative pairs apart. This design forces the encoder to learn universal traffic representations robust to both numerical fluctuations and discrete missing, fundamentally avoiding the semantic destruction of either feature type caused by a uniform augmentation strategy, and guiding the model to focus on cross-sample global semantic invariance rather than precise reconstruction of local values. Experiments conducted on public encrypted traffic datasets covering both traditional network and IoT scenarios show that Janus achieves an average classification accuracy exceeding 98%. Controlled ablations confirm that the heterogeneous augmentation strategy, rather than the input representation, drives the performance gains, validating the effectiveness of Janus in encrypted traffic detection tasks.
KW - Contrastive learning
KW - Heterogeneous augmentation
KW - pre-training
KW - traffic detection
UR - https://www.scopus.com/pages/publications/105053452605
U2 - 10.1109/JIOT.2026.3740583
DO - 10.1109/JIOT.2026.3740583
M3 - 文章
AN - SCOPUS:105053452605
SN - 2327-4662
JO - IEEE Internet of Things Journal
JF - IEEE Internet of Things Journal
ER -