Skip to content
Open access

No train, no pain: a training-free few-shot traffic classifier based on LLMs

Jul 2026 · Cybersecurity · Vol 9 · 0 citations · 48 references
Computer Science

TL;DR

This work proposes a novel training-free few-shot network traffic classification framework based on large language models based on large language models (LLMs) that reduces reliance on labeled data, eliminates task-specific training, and improves performance.

Abstract

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.

Read PDF

Similar papers

Conference Open access 2026

A Lightweight NLP-CNN Framework Based on Semantic Flow Representation for Network Intrusion Detection

One lesson emerges from the experiments: putting the effort into how traffic is written down, instead of making the classifier heavier, offers an economical and workable path to intrusion detection across heterogeneous network environments.

Asmaa Benchama, Khalid Zebbara · 0 citations
Open access Aug 2026

Label space reduction for transductive zero-shot classification with large language models

This work proposes distilling the model into a probabilistic classifier, enabling lightweight deployment without repeated LLM calls, and demonstrates that LSR improves macro-F1 scores by an average of 7.0% compared to standard zero-shot classification baselines.

Nathan Vandemoortele, Bram Steenwinckel, F. Ongenae et al. · 0 citations
Conference Open access Sep 2026

Gradient Enhancement Task Aware Post-training Quantization

This paper introduces Gradient Enhancement Task Aware Post-training Quantization, i.e., GTAQ, to address the generalization issue of Large Language Models, and extensively evaluates the LLaMA family of language models on WikiText, C4, and MMLU.

Yi-Hua Shao, Yang-Yang Gu, Min-Xi Yan et al. · 1 citation

: Making

This work presents ShortcutCatcher, an automated, model-agnostic framework that detects and mitigates shortcuts with the help of explainable AI, and exposes dataset limitations where collection artefacts act as silent shortcuts that have gone so far unnoticed.

Politecnico Yuqi Zhao, I. di Torino, Politecnico Di et al. · 0 citations
Preprint Aug 2026

FETERS: Few-Shot Early Time-Series Classification via Effective Ratio Selection

FETERS is proposed, a few-shot ETSC framework that selects a dataset-level stopping ratio through class-wise leave-one-out (LOO) evaluation on the support set and uses a penalty-based reward function to manage the accuracy-earliness trade-off, thereby avoiding the need to train an additional stopping module.

Chen-An Tai, Yujia Wu, Vincent S. Tseng · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.