三重防御机制提升RAG系统抗恶意文档攻击能力
TriShieldRAG: 3 Rings, One Blind Spot in Layered Defenses for Retrieval-Augmented Generation
- 构建三阶段防护:文档筛查、信任重排序、多模型共识验证
- 非自适应攻击下成功率从79%降至1%,但自适应攻击仍可绕过
- 揭示多模型一致结论可能误导,适合关注RAG安全的研究者
检索增强生成(RAG)依赖查询时检索的文档保证回答可靠性。先前研究显示,通过构造5个文档可使未防护系统在近90%情况下被误导。本文提出三重防御框架TriShieldRAG:文档级筛查模块(Ingest Guard)、基于信任的重排序模块(Retrieval Scorer)以及跨三类异构大模型的共识验证模块。我们假设联合筛选、重排序与验证能形成互补保护,阻止恶意文档通过单一环节失效而得逞。在268万条自然问题(NQ)语料库上,面对原始PoisonedRAG攻击,其攻击成功率从79±1.0%降至1±0.0%。然而自适应攻击暴露了分层防御的局限性:仅改变文档格式,不修改毒化文本或访问检索器,即可将Ingest Guard得分从0.500降至0.000,完全绕过该层,在三个语料库中500个测试样本均成功。剩余两层失效:在NQ上攻击成功率仍达62±0.8%(基线56±2.5%),在HotpotQA上为85±0.6%(基线86±0.6%)。依赖相同检索证据的各层同时失效;少数派毒化阈值为0.214、0.251、0.558,而非预设的0.5;所提闭式解法因未通过预注册预测而被撤回。跨模型一致性高达0.96,但攻击成功率接近99%。论文开源了框架、漏洞认证方法及实验资产。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) grounds LLM answers in query-time retrieved documents, so reliability depends on what the retriever returns. PoisonedRAG (Zou et al., USENIX Security'25) showed five crafted documents mislead an undefended system in nearly 90% of cases, and that single-stage defenses give limited robustness. We propose TriShieldRAG, a three-layered framework: an Ingest Guard for document-level screening, a Retrieval Scorer for trust-aware re-ranking, and a Cross-LLM Consensus over three diverse models. We reasoned that collectively screening, re-ranking and validating retrieved evidence would give complementary protection, limiting the ability of poisoned documents to succeed through any single failure. We evaluate against non-adaptive and adaptive poisoning. Non-adaptively, on the full 2.68M-passage Natural Questions (NQ) corpus with the original PoisonedRAG attack, it cuts attack success from 79 +/- 1.0% to 1 +/- 0.0%. Adaptive attacks expose fundamental limits of layering. By changing only the document formatting, without modifying the poison text or accessing the retriever, the attacker reduces the Ingest Guard score from 0.500 to 0.000 and bypasses it on all 500 tested documents across three corpora. The remaining layers then give no protection: 62 +/- 0.8% attack success against a 56 +/- 2.5% undefended baseline on NQ, and 85 +/- 0.6% against 86 +/- 0.6% on HotpotQA. Layered defenses relying on the same retrieved evidence fail together: poisoned context misleads both re-ranking and consensus validation. Minority-poison thresholds prove corpus-dependent, at 0.214, 0.251 and 0.558 rather than the derived 0.5; a closed form we proposed for these failed a pre-registered prediction and is retracted. Cross-model agreement is misleading, reaching 0.96 while attack success approaches 99%. We release the framework, the evasion-certification methodology and artifacts.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。