arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.14129cs.CRcs.LG
收藏

MalRAG:一种用于开集恶意流量识别的检索增强大语言模型框架

MalRAG: A Retrieval-Augmented LLM Framework for Open-set Malicious Traffic Identification

Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络安全学院)

Xiang Luo, Chang Liu, Gang Xiong, Chen Yang, Gaopeng Gou, Yaochen Ren, Zhen Li

AI总结:

针对现有深度模型可迁移性差、需逐数据集调优的问题,提出首个LLM驱动的检索增强框架MalRAG,通过多视图知识库构建、自适应检索与提示工程,在开集恶意流量识别任务上取得SOTA效果。

摘要:

对入侵检测系统(IDS)标记的可疑流量进行细粒度识别在网络安全领域至关重要。实际场景中,网络威胁持续演变,因此除了识别已知类别恶意流量外,发现新型恶意流量也成为关键需求。近期研究借助深度模型推动了该目标的实现,但这类模型通常依赖特定任务架构,可迁移性受限,且需要针对每个数据集单独调优。本文提出MalRAG,这是首个由大语言模型(LLM)驱动的面向开集恶意流量识别的检索增强框架。MalRAG冻结LLM参数,通过全维度流量知识构建、自适应检索与提示工程实现功能。具体而言,我们从内容、结构、时间三个维度挖掘已知恶意流量,构建多视图流量数据库;进一步提出覆盖增强检索算法,跨上述多视图查询以拼接最可能的候选结果,从而提升正确证据的覆盖率;随后采用流量感知自适应剪枝方法,基于流量感知相似度分数从候选结果中选取可变子集,抑制错误匹配,生成可靠的检索证据;此外,我们设计了一套引导提示,将任务指令、证据引用、决策引导与检索到的证据相结合,以提升LLM的性能。在多个真实世界数据集与不同设置下,MalRAG在已知类别细粒度识别和新型恶意流量发现任务上均取得了当前最优结果。消融实验与深度分析进一步表明,MalRAG可有效利用LLM能力,且无需依赖特定LLM即可实现开集恶意流量识别。

英文摘要:

Fine-grained identification of IDS-flagged suspicious traffic is crucial in cybersecurity. In practice, cyber threats evolve continuously, making the discovery of novel malicious traffic a critical necessity as well as the identification of known classes. Recent studies have advanced this goal with deep models, but they often rely on task-specific architectures that limit transferability and require per-dataset tuning. In this paper we introduce MalRAG, the first LLM driven retrieval-augmented framework for open-set malicious traffic identification. MalRAG freezes the LLM and operates via comprehensive traffic knowledge construction, adaptive retrieval, and prompt engineering. Concretely, we construct a multi-view traffic database by mining prior malicious traffic from content, structural, and temporal perspectives. Furthermore, we introduce a Coverage-Enhanced Retrieval Algorithm that queries across these views to assemble the most probable candidates, thereby improving the inclusion of correct evidence. We then employ Traffic-Aware Adaptive Pruning to select a variable subset of these candidates based on traffic-aware similarity scores, suppressing incorrect matches and yielding reliable retrieved evidence. Moreover, we develop a suite of guidance prompts where task instruction, evidence referencing, and decision guidance are integrated with the retrieved evidence to improve LLM performance. Across diverse real-world datasets and settings, MalRAG delivers state-of-the-art results in both fine-grained identification of known classes and novel malicious traffic discovery. Ablation and deep-dive analyses further show that MalRAG effective leverages LLM capabilities yet achieves open-set malicious traffic identification without relying on a specific LLM.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑