{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,22]],"date-time":"2026-07-22T04:01:55Z","timestamp":1784692915534,"version":"3.55.0"},"reference-count":47,"publisher":"Springer Science and Business Media LLC","issue":"1","license":[{"start":{"date-parts":[[2026,7,22]],"date-time":"2026-07-22T00:00:00Z","timestamp":1784678400000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2026,7,22]],"date-time":"2026-07-22T00:00:00Z","timestamp":1784678400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"funder":[{"DOI":"10.13039\/501100012165","name":"Key Technologies Research and Development Program","doi-asserted-by":"publisher","award":["2023YFC2206402"],"award-info":[{"award-number":["2023YFC2206402"]}],"id":[{"id":"10.13039\/501100012165","id-type":"DOI","asserted-by":"publisher"}]},{"name":"the Strategic Priority Research Program of the Chinese Academy of Sciences","award":["XDA0460100"],"award-info":[{"award-number":["XDA0460100"]}]},{"name":"Key Laboratory of Cyberspace Security, Ministry of Education of China","award":["KLCS20240206"],"award-info":[{"award-number":["KLCS20240206"]}]},{"name":"Key Laboratory of Network Assessment Technology, Chinese Academy of Sciences"},{"name":"Beijing Key Laboratory of Network Security and Protection Technology"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["Cybersecurity"],"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>Encrypted web traffic and evolving Internet technologies pose an increasing challenge to network traffic analysis. However, existing traffic classification methods, though effective, require large labeled datasets and complex training. This makes sustaining them prohibitively expensive and difficult in real-world scenarios. To narrow this gap, we propose a novel training-free few-shot network traffic classification framework based on large language models (LLMs). By integrating meta-learning with LLMs, it reduces reliance on labeled data, eliminates task-specific training, and improves performance. Specifically, we first apply an efficient feature extraction method to extract features from traffic flows. We then design meta-tasks that combine task descriptions with textualized features to produce natural language meta-task formulations. Building on these meta-tasks, the LLM performs reasoning to carry out traffic classification. Finally, to mitigate hallucination in the LLM outputs, we exploit the temporal characteristics of network traffic and aggregate predictions over samples within a defined time window. Extensive experiments on three widely-used encrypted traffic datasets demonstrate that our proposed framework outperforms the state-of-the-art methods, achieving an average absolute improvement in F1 score of 9.75, 9.82, and 12.06 percentage points on the three datasets, respectively.<\/jats:p>","DOI":"10.1186\/s42400-026-00622-2","type":"journal-article","created":{"date-parts":[[2026,7,22]],"date-time":"2026-07-22T03:11:24Z","timestamp":1784689884000},"update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["No train, no pain: a training-free few-shot traffic classifier based on LLMs"],"prefix":"10.1186","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0009-0006-0295-802X","authenticated-orcid":false,"given":"Xingmao","family":"Guan","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ning","family":"Li","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Xueying","family":"Han","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ding","family":"Wang","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jinlai","family":"Huang","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Tao","family":"Wang","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Zelin","family":"Cui","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Zhigang","family":"Lu","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Baoxu","family":"Liu","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"297","published-online":{"date-parts":[[2026,7,22]]},"reference":[{"key":"622_CR1","unstructured":"Aky\u00fcrek E, Schuurmans D, Andreas J, Ma T, Zhou D (2022) What learning algorithm is in-context learning? investigations with linear models. arXiv:2211.15661"},{"key":"622_CR2","doi-asserted-by":"crossref","unstructured":"Althubiti SA, Jones EM, Roy K (2018) Lstm for anomaly-based network intrusion detection. In: 2018 28th International Telecommunication Networks and Applications Conference (ITNAC). IEEE, pp 1\u20133","DOI":"10.1109\/ATNAC.2018.8615300"},{"key":"622_CR3","doi-asserted-by":"publisher","first-page":"108","DOI":"10.1016\/j.future.2021.04.017","volume":"123","author":"G Andresini","year":"2021","unstructured":"Andresini G, Appice A, De Rose L, Malerba D (2021) Gan augmentation to deal with imbalance in imaging-based intrusion detection. Futur Gener Comput Syst 123:108\u2013127","journal-title":"Futur Gener Comput Syst"},{"key":"622_CR5","first-page":"1877","volume":"33","author":"T Brown","year":"2020","unstructured":"Brown T, Mann B, Ryder N, Subbiah M, Kaplan JD, Dhariwal P, Neelakantan A, Shyam P, Sastry G, Askell A et al (2020) Language models are few-shot learners. Adv Neural Inf Process Syst 33:1877\u20131901","journal-title":"Adv Neural Inf Process Syst"},{"key":"622_CR6","doi-asserted-by":"crossref","unstructured":"Chen X-Y, Han L, Zhan D-C, Ye H-J (2025) Miett: multi-instance encrypted traffic transformer for encrypted traffic classification. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol 39. pp 15922\u201315929","DOI":"10.1609\/aaai.v39i15.33748"},{"key":"622_CR8","unstructured":"Cui T, Lin X, Li S, Chen M, Yin Q, Li Q, Xu K (2025) TrafficLLM: enhancing large language models for network traffic analysis with generic traffic representation. arXiv:2504.04222"},{"key":"622_CR9","doi-asserted-by":"crossref","unstructured":"Dadkhah S, Mahdikhani H, Danso PK, Zohourian A, Truong KA, Ghorbani AA (2022) Towards the development of a realistic multidimensional iot profiling dataset. In: 2022 19th Annual International Conference on Privacy, Security & Trust (PST). IEEE, pp 1\u201311","DOI":"10.1109\/PST55820.2022.9851966"},{"key":"622_CR10","doi-asserted-by":"crossref","unstructured":"Devlin J, Chang M-W, Lee K, Toutanova K (2019) Bert: pre-training of deep bidirectional transformers for language understanding. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (long and Short Papers), pp 4171\u20134186","DOI":"10.18653\/v1\/N19-1423"},{"key":"622_CR11","doi-asserted-by":"crossref","unstructured":"Draper-Gil G, Lashkari AH, Mamun MSI, Ghorbani AA (2016) Characterization of encrypted and vpn traffic using time-related.In: proceedings of the 2nd international conference on information systems security and privacy (ICISSP). pp 407\u2013414","DOI":"10.5220\/0005740704070414"},{"key":"622_CR12","unstructured":"Entezari R, Wortsman M, Saukh O, Shariatnia MM, Sedghi H, Schmidt L (2023) The role of pre-training data in transfer learning. arXiv:2302.13602"},{"key":"622_CR13","doi-asserted-by":"crossref","unstructured":"Fu C, Li Q, Shen M, Xu K (2024) Detecting tunneled flooding traffic via deep semantic analysis of packet length patterns. In: proceedings of the 2024 on ACM SIGSAC conference on computer and communications security. pp 3659\u20133673","DOI":"10.1145\/3658644.3670353"},{"key":"622_CR14","doi-asserted-by":"crossref","unstructured":"He HY, Yang ZG, Chen XN (2020) Pert: payload encoding representation from transformer for encrypted traffic classification. 2020 ITU Kaleidoscope: industry-driven digital transformation (ITU K). IEEE, pp 1\u20138","DOI":"10.23919\/ITUK50268.2020.9303204"},{"key":"622_CR15","doi-asserted-by":"crossref","unstructured":"Holland J, Schmitt P, Feamster N, Mittal P (2021) New directions in automated traffic analysis. In: proceedings of the 2021 ACM SIGSAC conference on computer and communications security. pp 3366\u20133383","DOI":"10.1145\/3460120.3484758"},{"key":"622_CR16","doi-asserted-by":"crossref","unstructured":"Horowicz E, Shapira T, Shavitt Y (2022) A few shots traffic classification with mini-flowpic augmentations. In: proceedings of the 22nd ACM internet measurement conference. pp 647\u2013654","DOI":"10.1145\/3517745.3561436"},{"key":"622_CR17","unstructured":"Hu M, Chang H, Guo Z, Ma B, Shan S, Chen X.: Task attribute distance for few-shot learning: theoretical analysis and applications. arXiv:2403.03535"},{"key":"622_CR18","doi-asserted-by":"crossref","unstructured":"Hu P, Liang R, Chen K (2024b) Degpt: optimizing decompiler output with llm. In: Proceedings 2024 network and distributed system security symposium, vol. 267622140","DOI":"10.14722\/ndss.2024.24401"},{"key":"622_CR20","doi-asserted-by":"publisher","first-page":"118","DOI":"10.1109\/ACCESS.2019.2962106","volume":"8","author":"AS Iliyasu","year":"2019","unstructured":"Iliyasu AS, Deng H (2019) Semi-supervised encrypted traffic classification with deep convolutional generative adversarial networks. Ieee Access 8:118\u2013126","journal-title":"Ieee Access"},{"key":"622_CR21","unstructured":"Jiang X, Cheng X, Li Z (2024) Why pre-training is beneficial for downstream classification tasks? arXiv:2410.08455"},{"key":"622_CR22","doi-asserted-by":"crossref","unstructured":"Lin X, Xiong G, Gou G, Li Z, Shi J, Yu J (2022) Et-bert: a contextualized datagram representation with pre-training transformers for encrypted traffic classification.In: proceedings of the ACM web conference 2022. pp 633\u2013642","DOI":"10.1145\/3485447.3512217"},{"issue":"9","key":"622_CR23","doi-asserted-by":"publisher","first-page":"243","DOI":"10.1007\/s10462-024-10896-y","volume":"57","author":"Z Lin","year":"2024","unstructured":"Lin Z, Guan S, Zhang W, Zhang H, Li Y, Zhang H (2024) Towards trustworthy llms: a review on debiasing and dehallucinating in large language models. Artif Intell Rev 57(9):243","journal-title":"Artif Intell Rev"},{"key":"622_CR24","doi-asserted-by":"crossref","unstructured":"Liu C, He L, Xiong G, Cao Z, Li Z (2019) Fs-net: A flow sequence network for encrypted traffic classification. In: IEEE INFOCOM 2019-IEEE conference on computer communications. IEEE, pp 1171\u20131179","DOI":"10.1109\/INFOCOM.2019.8737507"},{"key":"622_CR25","doi-asserted-by":"publisher","first-page":"569","DOI":"10.1007\/s10115-018-1306-7","volume":"60","author":"M Lopez-Martin","year":"2019","unstructured":"Lopez-Martin M, Carro B, Sanchez-Esguevillas A (2019) Variational data generative model for intrusion detection. Knowl Inf Syst 60:569\u2013590","journal-title":"Knowl Inf Syst"},{"key":"622_CR26","doi-asserted-by":"publisher","DOI":"10.1016\/j.eswa.2023.122223","volume":"238","author":"M Macas","year":"2024","unstructured":"Macas M, Wu C, Fuertes W (2024) Adversarial examples: a survey of attacks and defenses in deep learning-enabled cybersecurity systems. Expert Syst Appl 238:122223","journal-title":"Expert Syst Appl"},{"key":"622_CR27","doi-asserted-by":"crossref","unstructured":"Panchenko A, Lanze F, Pennekamp J, Engel T, Zinnen A, Henze M, Wehrle K (2016) Website fingerprinting at internet scale. In: NDSS, vol. 1, p 23477","DOI":"10.14722\/ndss.2016.23477"},{"issue":"6","key":"622_CR28","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3457904","volume":"54","author":"E Papadogiannaki","year":"2021","unstructured":"Papadogiannaki E, Ioannidis S (2021) A survey on encrypted network traffic analysis applications, techniques, and countermeasures. ACM Comput Surv (CSUR) 54(6):1\u201335","journal-title":"ACM Comput Surv (CSUR)"},{"key":"622_CR30","doi-asserted-by":"crossref","unstructured":"Qiu X, Cheng G, Zhu W, Niu D, Fu N (2025) Dual-channel interactive graph transformer for traffic classification with message-aware flow representation. In: proceedings of the AAAI conference on artificial intelligence, vol 39. pp 685\u2013693","DOI":"10.1609\/aaai.v39i1.32050"},{"key":"622_CR33","doi-asserted-by":"crossref","unstructured":"Rezaei S, Liu X (2020) Multitask learning for network traffic classification. In: 2020 29th international conference on computer communications and networks (ICCCN). IEEE, pp 1\u20139","DOI":"10.1109\/ICCCN49398.2020.9209652"},{"issue":"2018","key":"622_CR34","first-page":"108","volume":"1","author":"I Sharafaldin","year":"2018","unstructured":"Sharafaldin I, Lashkari AH, Ghorbani AA et al (2018) Toward generating a new intrusion detection dataset and intrusion traffic characterization. ICISSp 1(2018):108\u2013116","journal-title":"ICISSp"},{"key":"622_CR36","first-page":"596","volume":"33","author":"K Sohn","year":"2020","unstructured":"Sohn K, Berthelot D, Carlini N, Zhang Z, Zhang H, Raffel CA, Cubuk ED, Kurakin A, Li C-L (2020) Fixmatch: simplifying semi-supervised learning with consistency and confidence. Adv Neural Inf Process Syst 33:596\u2013608","journal-title":"Adv Neural Inf Process Syst"},{"key":"622_CR37","unstructured":"Tarvainen A, Valpola H (2017) Mean teachers are better role models: weight-averaged consistency targets improve semi-supervised deep learning results. Adv neural inf process syst. p 30"},{"key":"622_CR38","doi-asserted-by":"crossref","unstructured":"Taylor VF, Spolaor R, Conti M, Martinovic I (2016) Appscanner: Automatic fingerprinting of smartphone apps from encrypted network traffic. In: 2016 IEEE European Symposium on Security and Privacy (EuroS&P). IEEE, pp 439\u2013454","DOI":"10.1109\/EuroSP.2016.40"},{"key":"622_CR39","unstructured":"Vinyals O, Blundell C, Lillicrap T, Wierstra D (2016) Matching networks for one shot learning. Adv Neural Inf Process Syst 29"},{"issue":"14","key":"622_CR40","doi-asserted-by":"publisher","first-page":"5243","DOI":"10.3390\/s22145243","volume":"22","author":"J Wang","year":"2022","unstructured":"Wang J, Yan X, Liu L, Li L, Yu Y (2022) Cttgan: traffic data synthesizing scheme based on conditional gan. Sensors 22(14):5243","journal-title":"Sensors"},{"key":"622_CR41","doi-asserted-by":"crossref","unstructured":"Wang J, Tang J, Xu Z, Wang Y, Xue G, Zhang X, Yang D (2017a) Spatiotemporal modeling and prediction in cellular networks: A big data enabled deep learning approach. In: IEEE INFOCOM 2017-IEEE Conference on Computer Communications. IEEE, pp 1\u20139","DOI":"10.1109\/INFOCOM.2017.8057090"},{"key":"622_CR42","doi-asserted-by":"crossref","unstructured":"Wang W, Zhu M, Zeng X, Ye X, Sheng Y (2017b) Malware traffic classification using convolutional neural network for representation learning. In: 2017 international conference on information networking (ICOIN). IEEE, pp 712\u2013717","DOI":"10.1109\/ICOIN.2017.7899588"},{"key":"622_CR43","doi-asserted-by":"crossref","unstructured":"Xie G, Xie K, Huang J, Wang X, Chen Y, Wen J (2017) Fast low-rank matrix approximation with locality sensitive hashing for quick anomaly detection. In: IEEE INFOCOM 2017-IEEE conference on computer communications. IEEE, pp 1\u20139","DOI":"10.1109\/INFOCOM.2017.8057217"},{"key":"622_CR44","doi-asserted-by":"publisher","first-page":"3540","DOI":"10.1109\/TIFS.2020.2991876","volume":"15","author":"C Xu","year":"2020","unstructured":"Xu C, Shen J, Du X (2020) A method of few-shot network intrusion detection based on meta-learning framework. IEEE Trans Inf Forensics Secur 15:3540\u20133552","journal-title":"IEEE Trans Inf Forensics Secur"},{"key":"622_CR45","doi-asserted-by":"crossref","unstructured":"Yan Y, Qi L, Wang J, Lin Y, Chen L (2020) A network intrusion detection method based on stacked autoencoder and lstm. In: ICC 2020-2020 IEEE international conference on communications (ICC). IEEE, pp 1\u20136","DOI":"10.1109\/ICC40277.2020.9149384"},{"issue":"1","key":"622_CR46","doi-asserted-by":"publisher","first-page":"241","DOI":"10.1109\/TBDATA.2019.2940675","volume":"8","author":"H Yao","year":"2019","unstructured":"Yao H, Liu C, Zhang P, Wu S, Jiang C, Yu S (2019) Identification of encrypted traffic through attention mechanism based long short term memory. IEEE trans big data 8(1):241\u2013252","journal-title":"IEEE trans big data"},{"key":"622_CR47","doi-asserted-by":"crossref","unstructured":"Zhang H, Yue H, Xiao X, Yu L, Li Q, Ling Z, Zhang Y (2025) Revolutionizing encrypted traffic classification with mh-net: a multi-view heterogeneous graph model. In: proceedings of the AAAI conference on artificial intelligence, vol. 39, pp 1048\u20131056","DOI":"10.1609\/aaai.v39i1.32091"},{"key":"622_CR48","doi-asserted-by":"crossref","unstructured":"Zhao R, Deng X, Yan Z, Ma J, Xue Z, Wang Y (2022) Mt-flowformer: A semi-supervised flow transformer for encrypted traffic classification. In: proceedings of the 28th ACM SIGKDD conference on knowledge discovery and data mining. pp 2576\u20132584","DOI":"10.1145\/3534678.3539314"},{"key":"622_CR49","doi-asserted-by":"crossref","unstructured":"Zhao R, Zhan M, Deng X, Wang Y, Wang Y, Gui G, Xue Z (2023) Yet another traffic classifier: a masked autoencoder based traffic transformer with multi-level flow representation. In: Proceedings of the AAAI conference on artificial intelligence, vol. 37, pp 5420\u20135427","DOI":"10.1609\/aaai.v37i4.25674"},{"key":"622_CR50","doi-asserted-by":"crossref","unstructured":"Zhao Z, Song Z, Xie X, Li Z, Yu J, Zhang F, Li T (2025) Towards context-aware traffic classification via time-wavelet fusion network. In: proceedings of the 31st ACM SIGKDD conference on knowledge discovery and data mining V. 1, pp 2089\u20132100","DOI":"10.1145\/3690624.3709315"},{"key":"622_CR51","doi-asserted-by":"crossref","unstructured":"Zheng W, Gou C, Yan L, Mo S (2020) Learning to classify: A flow-based relation network for encrypted traffic classification. In: proceedings of the web conference 2020. pp 13\u201322","DOI":"10.1145\/3366423.3380090"},{"key":"622_CR52","doi-asserted-by":"publisher","DOI":"10.1016\/j.knosys.2023.110798","volume":"277","author":"Y Zheng","year":"2023","unstructured":"Zheng Y, Zhang X, Tian Z, Zeng W, Du S (2023) Detach and unite: a simple meta-transfer for few-shot learning. Knowl Based Syst 277:110798","journal-title":"Knowl Based Syst"},{"key":"622_CR54","doi-asserted-by":"crossref","unstructured":"Zhou G, Guo X, Liu Z, Li T, Li Q, Xu K (2025) Trafficformer: an efficient pre-trained model for traffic data. In: 2025 IEEE symposium on security and privacy (SP). IEEE, pp 1844\u20131860","DOI":"10.1109\/SP61157.2025.00102"},{"issue":"8","key":"622_CR55","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3547330","volume":"55","author":"S Zhou","year":"2022","unstructured":"Zhou S, Liu C, Ye D, Zhu T, Zhou W, Yu PS (2022) Adversarial attacks and defenses in deep learning: from a perspective of cybersecurity. ACM Comput Surv 55(8):1\u201339","journal-title":"ACM Comput Surv"}],"container-title":["Cybersecurity"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1186\/s42400-026-00622-2.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/article\/10.1186\/s42400-026-00622-2","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1186\/s42400-026-00622-2.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,22]],"date-time":"2026-07-22T03:11:42Z","timestamp":1784689902000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1186\/s42400-026-00622-2"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,7,22]]},"references-count":47,"journal-issue":{"issue":"1","published-online":{"date-parts":[[2026,12]]}},"alternative-id":["622"],"URL":"https:\/\/doi.org\/10.1186\/s42400-026-00622-2","relation":{},"ISSN":["2523-3246"],"issn-type":[{"value":"2523-3246","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,7,22]]},"assertion":[{"value":"26 March 2026","order":1,"name":"received","label":"Received","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"14 June 2026","order":2,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"22 July 2026","order":3,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"The authors declare that they have no conflict of interest.","order":1,"name":"Ethics","label":"Competing interests","group":{"name":"EthicsHeading","label":"Declarations"}}],"article-number":"194"}}