为RAG大模型系统设计安全防火墙,防范数据泄露与攻击。
ControlNET: A Firewall for RAG-based LLM System
- 利用激活值偏移检测恶意查询,通过语义发散抑制攻击。
- 在4个数据集上检测准确率超0.909 AUROC,且不损害模型安全性。
- 适合医疗、金融等高敏感领域部署的RAG系统使用。
检索增强生成(RAG)显著提升了大语言模型的事实准确性与领域适应性,使其广泛应用于医疗、金融和企业等敏感领域。尽管RAG通过引入外部知识减少了幻觉,但仍带来隐私与安全风险,如数据泄露和数据投毒。现有研究多关注提示注入与投毒攻击,但对入站与出站查询流的控制仍缺乏系统性探索。本文提出AI防火墙ControlNET,通过激活值偏移现象检测恶意查询,并利用语义发散缓解其影响。我们在Msmarco、HotpotQA、FinQA和MedicalSys四个基准数据集上,使用Llama3、Vicuna和Mistral等开源模型进行实验。结果表明,ControlNET在检测与防御安全威胁时,AUROC超过0.909,同时保持系统无害性。ControlNET提供了一种有效、鲁棒且无害的防护机制,推动了RAG大模型系统的安全落地。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) has significantly enhanced the factual accuracy and domain adaptability of Large Language Models (LLMs). This advancement has enabled their widespread deployment across sensitive domains such as healthcare, finance, and enterprise applications. RAG mitigates hallucinations by integrating external knowledge, yet introduces privacy risk and security risk, notably data breaching risk and data poisoning risk. While recent studies have explored prompt injection and poisoning attacks, there remains a significant gap in comprehensive research on controlling inbound and outbound query flows to mitigate these threats. In this paper, we propose an AI firewall, ControlNET, designed to safeguard RAG-based LLM systems from these vulnerabilities. ControlNET controls query flows by leveraging activation shift phenomena to detect adversarial queries and mitigate their impact through semantic divergence. We conduct comprehensive experiments on four different benchmark datasets including Msmarco, HotpotQA, FinQA, and MedicalSys using state-of-the-art open source LLMs (Llama3, Vicuna, and Mistral). Our results demonstrate that ControlNET achieves over 0.909 AUROC in detecting and mitigating security threats while preserving system harmlessness. Overall, ControlNET offers an effective, robust, harmless defense mechanism, marking a significant advancement toward the secure deployment of RAG-based LLM systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。