用AI Agent+知识库实现可解释、持续进化的物联网入侵检测
MA-IDS: Multi-Agent RAG Framework for IoT Network Intrusion Detection with an Experience Library
- 设计双代理协作框架,通过向量库检索历史经验进行推理
- 在两个数据集上分别达89.75%和85.22%的宏平均F1分数
- 适合需要可解释性与自进化能力的物联网安全场景
网络入侵检测系统(NIDS)面临显著挑战。基于特征的检测方法对已知攻击有效,但难以识别零日攻击及变种,而多数机器学习方法缺乏可解释性。这些挑战在资源受限且协议异构的物联网环境中尤为突出。为此,我们提出MA-IDS,一种结合大语言模型(LLM)与检索增强生成(RAG)的多智能体入侵检测框架。该框架通过一个持续构建的经验库赋予LLM推理能力。两个专用代理通过基于FAISS的向量数据库协同工作:流量分类代理在每次推理前检索过往错误规则,错误分析代理将误判转化为可读检测规则并存入库中,实现无需修改底层模型的持续学习。在NF-BoT-IoT与NF-ToN-IoT基准数据集上,MA-IDS分别取得89.75%和85.22%的宏平均F1分数,较零样本基线提升超过72和80个百分点。结果媲美SVM,同时提供每条分类决策的规则级解释,证明检索增强推理为可解释、自进化物联网入侵检测提供了可行路径。
原文摘要 · Abstract (English)
Network Intrusion Detection Systems (NIDS) face important limitations. Signature-based methods are effective for known attack patterns, but they struggle to detect zero-day attacks and often miss modified variants of previously known attacks, while many machine learning approaches offer limited interpretability. These challenges become even more severe in IoT environments because of resource constraints and heterogeneous protocols. To address these issues, we propose MA-IDS, a Multi-Agent Intrusion Detection System that combines Large Language Models (LLMs) with Retrieval Augmented Generation (RAG) for reasoning-driven intrusion detection. The proposed framework grounds LLM reasoning through a persistent, self-building Experience Library. Two specialized agents collaborate through a FAISS-based vector database: a Traffic Classification Agent that retrieves past error rules before each inference, and an Error Analysis Agent that converts misclassifications into human-readable detection rules stored for future retrieval, enabling continual learning through external knowledge accumulation, without modifying the underlying language model. Evaluated on NF-BoT-IoT and NF-ToN-IoT benchmark datasets, MA-IDS achieves Macro F1-Scores of 89.75% and 85.22%, improving over zero-shot baselines of 17% and 4.96% by more than 72 and 80 percentage points. These results are competitive with SVM while providing rule-level explanations for every classification decision, demonstrating that retrieval-augmented reasoning offers a principled path toward explainable, self-improving intrusion detection for IoT networks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。