用检索增强生成技术让网络流量分析更准更透明
ReGAIN: Retrieval-Grounded AI Framework for Network Traffic Analysis
- 将流量数据转为自然语言,通过多层检索确保大模型回答有据可依
- 在真实攻击数据上准确率达95.95%至98.82%,误报率显著降低
- 适合安全分析师和需要可解释性决策的网络运维场景
现代网络产生海量异构流量,需持续分析以保障安全与性能。传统基于规则或机器学习的流量分析系统常存在高误报率且缺乏可解释性,限制了分析师信任。本文提出ReGAIN,一种多阶段框架,结合流量摘要、检索增强生成(RAG)与大语言模型(LLM)推理,实现透明高效的网络流量分析。ReGAIN将网络流量生成自然语言摘要,嵌入多集合向量数据库,采用分层检索管道,通过元数据过滤、MMR采样、两阶段交叉编码重排序及拒答机制,确保LLM响应基于证据并减少幻觉。在真实世界数据集的ICMP ping洪泛和TCP SYN洪泛攻击样本上评估,准确率在95.95%至98.82%之间,结果经数据集真值与人工专家评估双重验证。ReGAIN优于规则、经典机器学习与深度学习基线,且提供可信赖、可验证的解释性输出。
原文摘要 · Abstract (English)
Modern networks generate vast, heterogeneous traffic that must be continuously analyzed for security and performance. Traditional network traffic analysis systems, whether rule-based or machine learning-driven, often suffer from high false positives and lack interpretability, limiting analyst trust. In this paper, we present ReGAIN, a multi-stage framework that combines traffic summarization, retrieval-augmented generation (RAG), and Large Language Model (LLM) reasoning for transparent and accurate network traffic analysis. ReGAIN creates natural-language summaries from network traffic, embeds them into a multi-collection vector database, and utilizes a hierarchical retrieval pipeline to ground LLM responses with evidence citations. The pipeline features metadata-based filtering, MMR sampling, a two-stage cross-encoder reranking mechanism, and an abstention mechanism to reduce hallucinations and ensure grounded reasoning. Evaluated on ICMP ping flood and TCP SYN flood traces from the real-world traffic dataset, it demonstrates robust performance, achieving accuracy between 95.95% and 98.82% across different attack types and evaluation benchmarks. These results are validated against two complementary sources: dataset ground truth and human expert assessments. ReGAIN also outperforms rule-based, classical ML, and deep learning baselines while providing unique explainability through trustworthy, verifiable responses.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。