Computer Science ›› 2026, Vol. 53 ›› Issue (10): 92-101.doi: 10.11896/jsjkx.260300110

• Large Models and Multimodal Intelligent Perception • Previous Articles     Next Articles

Cross-modal Contrastive Learning for Encrypted Traffic Classification

CAO Yang1, LI Peng1,2, CHEN Shuhan1, MO Yongmei1   

  1. 1 School of Computer Science,Nanjing University of Posts and Telecommunications,Nanjing 210023, China
    2 Institute of Network Security and Trusted Computing,Nanjing University of Posts and Telecommunications,Nanjing 210023, China
  • Received:2026-03-23 Revised:2026-07-15 Published:2026-10-13
  • About author:CAO Yang,born in 2002,postgraduate.His main research interests include encryption traffic analysis and large language model.
    LI Peng,born in 1979,Ph.D,professor,Ph.D supervisor,is a member of CCF(No.48573M).His main research interests include computer communication networks,cloud computing and information security.
  • Supported by:
    Six Talent Peaks Project of Jiangsu Province(RJFW-111) and Postgraduate Research and Practice Innovation Program of Jiangsu Province(KYCX23_1048).

Abstract: In response to the challenges caused by the continuous evolution of current encryption protocols,such as the limited characterization ability of traditional single-modal detection methods and the insufficient robustness of models in highly confused environments,a multi-modal encryption traffic classification method named CMCL-ETC is proposed.This method utilizes a multi-level flow representation matrix(FLR) that retains byte logic and temporal-spatial texture,combines with fine-tuning of large language models(LLM) to extract traffic semantic features.The proposed method overcomes the limitations of single-modal detection capabilities and the difficulty in aligning heterogeneous features.A bidirectional cross-modal attention interaction mechanism and an adaptive gated fusion strategy are designed.By leveraging shared semantic space mapping and contrastive loss constraints,the byte physical distribution and semantic features of the traffic are aligned and complemented.Experimental results on two encryption traffic datasets,CSTNET-TLS 1.3 and CipherSpectrum,demonstrate that the accuracy of CMCL-ETC reaches 93.65% and 97.33% respectively under full data,outperforming current advanced benchmark models.The experiments confirm that by introducing LLM and cross-modal interaction mechanisms,the performance of large-scale encryption traffic classification tasks can be improved.

Key words: Encrypted traffic classification, Large language models, Multimodal fusion, Contrastive learning, Cybersecurity

CLC Number: 

  • TP393.08
[1] AKBARI I,SALAHUDDIN M A,ANIVA L,et al.Traffic classification in an increasingly encrypted web[J].Communications of the ACM,2022,65(10):75-83.
[2] CHEN Z H,CHENG G,XU Z H,et al.A Survey on Internet Encrypted Traffic Detection,Classification and Identification[J].Chinese Journal of Computers,2023,46(5):1060-1085.
[3] HOU J,LU H,LIU F A,et al.Detection and Counter-measureof Encrypted Malicious Traffic:A Survey[J].Journal of Software,2024,35(1):333-355.
[4] VAN EDE T,BORTOLAMEOTTI R,CONTINELLA A,et al.FlowPrint:Semi-Supervised Mobile-App Fingerprinting on Encrypted Network Traffic[C]//Proceedings 2020 Network and Distributed System Security Symposium.San Diego,CA:Internet Society,2020.
[5] PANCHENKO A,LANZE F,ZINNEN A,et al.Website Fin-gerprinting at Internet Scale[C]//Proceedings 2016 Network and Distributed System Security Symposium.San Diego,CA:Internet Society,2016.
[6] TAYLOR V F,SPOLAOR R,CONTI M,et al.AppScanner:Automatic Fingerprinting of Smartphone Apps from Encrypted Network Traffic[C]//2016 IEEE European Symposium on Security and Privacy(EuroS&P).IEEE,2016:439-454.
[7] LOTFOLLAHI M,JAFARI SIAVOSHANI M,SHIRALIHOSSEIN ZADE R,et al.Deep packet:a novel approach for encrypted traffic classification using deep learning[J].Soft Computing,2020,24(3):1999-2012.
[8] ZHOU H,HU C,YUAN Y,et al.Large Language Model(LLM) for Telecommunications:A Comprehensive Survey on Principles,Key Techniques,and Opportunities[J].IEEE Communications Surveys & Tutorials,2025,27(3):1955-2005.
[9] SHEN M,JI K,GAO Z,et al.Subverting Website Fingerprin-ting Defenses with Robust Traffic Representation[C]//32nd USENIX Security Symposium(USENIX Security 23).2023:607-624.
[10] WANG W,ZHU M,ZENG X W,et al.Malware traffic classification using convolutional neural network for representation learning[C]//2017 International Conference on Information Networking(ICOIN).IEEE,2017:712-717.
[11] NGUYEN T T T,ARMITAGE G.A survey of techniques for internet traffic classification using machine learning[J].IEEE Communications Surveys & Tutorials,2008,10(4):56-76.
[12] CAI Z,JIANG B,LU Z,et al.isAnon:Flow-Based Anonymity Network Traffic Identification Using Extreme Gradient Boosting[C]//2019 International Joint Conference on Neural Networks(IJCNN).2019:1-8.
[13] AL-NAAMI K,CHANDRA S,MUSTAFA A,et al.Adaptiveencrypted traffic fingerprinting with bi-directional dependence[C]//Proceedings of the 32nd Annual Conference on Computer Security Applications.ACM,2016:177-188.
[14] LIU C,HE L,XIONG G,et al.FS-Net:A Flow Sequence Network For Encrypted Traffic Classification[C]//IEEE INFOCOM 2019-IEEE Conference on Computer Communications.IEEE,2019:1171-1179.
[15] LIN K,XU X,GAO H.TSCRNN:A novel classification scheme of encrypted traffic based on flow spatiotemporal features for efficient management of IIoT[J].Computer Networks,2021,190:107974.
[16] ZHANG H,YU L,XIAO X,et al.TFE-GNN:A Temporal Fusion Encoder Using Graph Neural Networks for Fine-grained Encrypted Traffic Classification[C]//Proceedings of the ACM Web Conference 2023.New York:ACM,2023:2066-2075.
[17] ZHANG H,YUE H,XIAO X,et al.Revolutionizing Encrypted Traffic Classification with MH-Net:A Multi-View Heterogeneous Graph Model[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2025:1048-1056.
[18] LIN X,XIONG G,GOU G,et al.ET-BERT:A Contextualized Datagram Representation with Pre-training Transformers for Encrypted Traffic Classification[C]//Proceedings of the ACM Web Conference 2022.New York:ACM,2022:633-642.
[19] ZHAO R,ZHAN M,DENG X,et al.Yet Another Traffic Classifier:A Masked Autoencoder Based Traffic Transformer with Multi-Level Flow Representation[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2023:5420-5427.
[20] ZHOU G,GUO X,LIU Z,et al.TrafficFormer:An EfficientPre-trained Model for Traffic Data[C]//2025 IEEE Symposium on Security and Privacy(SP).2025:1844-1860.
[21] GINIGE Y,DAHANAYAKA T,SENEVIRATNE S.Traffic-GPT:An LLM Approach for Open-Set Encrypted Traffic Classification[C]//Proceedings of the Asian Internet Engineering Conference 2024.New York:ACM,2024:26-35.
[22] CUI T,LIN X,LI S,et al.TrafficLLM:Enhancing Large Language Models for Network Traffic Analysis with Generic Traffic Representation[PP/OL].arXiv [2026-08-05].https://arxiv.org/abs/2504.04222.
[23] ZHANG Y,ZHANG R,ZHANG J,et al.LlamaFactory:Unified Efficient Fine-Tuning of 100+ Language Models[PP/OL].ar-Xiv [2026-08-05].https://arxiv.org/abs/2403.13372.
[24] ZHU J,WANG W,CHEN Z,et al.InternVL3:Exploring Advanced Training and Test-Time Recipes for Open-Source Multimodal Models[PP/OL].arXiv [2026-08-05].https://arxiv.org/abs/2504.10479.
[25] HOU Q,ZHOU D,FENG J.Coordinate Attention for EfficientMobile Network Design[C]//2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR).2021:13708-13717.
[26] WICKRAMASINGHE N,SHAGHAGHI A,TSUDIK G,et al.SoK:Decoding the Enigma of Encrypted Network Traffic Classifiers[C]//2025 IEEE Symposium on Security and Privacy(SP).2025:1825-1843.
[1] ZHANG Rongjie, PANG Xiongwen, WANG Fengling. Review of Large Language Model-based Time Series Modeling via Fine-tuning and AgentArchitecture [J]. Computer Science, 2026, 53(9): 55-70.
[2] GUO Yuyang, SHI Lei, LIU Huan, DONG Yixiang, LI Rui. Domain-adapted and Dynamically Retrieval-augmented Approach for Large-scale History Discipline Model Construction [J]. Computer Science, 2026, 53(9): 92-100.
[3] HE Jiaojun, LI Xin. Review of Graph Learning Based on Large Language Models:Methods,Benchmarks and Advances [J]. Computer Science, 2026, 53(9): 1-15.
[4] LI Luozheng, LI Lingbo, YUAN Quan. Survey of Chinese Datasets for LLM Safety Alignment:Landscape and Prospects [J]. Computer Science, 2026, 53(9): 16-23.
[5] LI Zhennan, QIAN Jiayan, WANG Xinzhi, ZHANG Hui. Technology Risk Structure Recognition Based on Multi-granularity Semantic Dual Reflection [J]. Computer Science, 2026, 53(9): 395-404.
[6] WANG Chenxu, WANG Shihao, WANG Zhanggong, SHEN Yancheng, MENG Panpan. Momentum Contrast and GAN-Enhanced Sampling for Graph Contrastive Learning [J]. Computer Science, 2026, 53(9): 432-438.
[7] LIU Yanze, HAN Bo, YUAN Jidong, SU Dongliang, REN Jia, CAI Zhiming, WANG Zhihai. Anomaly Detection in Time Series Based on Time-Frequency Contrastive Learning [J]. Computer Science, 2026, 53(8): 20-28.
[8] LIU Jing. Review of Music Artificial Intelligence Driven by Large Language Models [J]. Computer Science, 2026, 53(8): 229-244.
[9] ZHOU Haobin, LU Yunhao, QIN Jun, JIAO Xintao, ZENG Biqing. CCSFR:Collaborative-Content Semantic Fusion for Review-enhanced Recommendation [J]. Computer Science, 2026, 53(8): 276-284.
[10] ZHANG Haoran, HAO Wenning, JIN Dawei, CHENG Kai, LIU Junyang. Agentic Retrieval Augmented Generation Framework Based on Retrieval Task Planning and Reflection Mechanism [J]. Computer Science, 2026, 53(8): 285-297.
[11] CHEN Zhixiang, XIE Zhipeng. Event Causal Data Augmentation Method Based on Large Language Model [J]. Computer Science, 2026, 53(7): 125-131.
[12] YANG Hang, HUANG Ruizhang, XUE Jingjing, QIN Yongbin, CHEN Yanping, LIN Chuan. Graph-structure-aware Single-cell Transcriptomic Embedding Clustering Model [J]. Computer Science, 2026, 53(7): 280-288.
[13] XU Rui, LIU Jin, LIU Xudong, GUAN Jian, DONG Wei. Exploring the Generalization Ability of Prompt-based Large Language Models for TextClassification [J]. Computer Science, 2026, 53(6A): 250400092-7.
[14] WEI Qing, ZHANG Yupeng, LIU Shaoxun, ZHANG Jinfeng, ZHANG Yuezhong, CHEN Haoyang. Fuzzing Driver Generation Based on Large Language Models [J]. Computer Science, 2026, 53(6A): 250400113-8.
[15] ZHANG Yongyu, GUO Chenjuan, FEI Xueqin, LI Feng. Study on Financial Text Sentiment Analysis Method Based on Large Language Models with Market Feedback Supervision [J]. Computer Science, 2026, 53(6A): 250500073-14.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!