RAGSentinel: Certifiable Geometric Consensus for Robust Retrieval-Augmented Generation
作者: Yueyang Quan, Anjun Gao, Yufei Xia, Minghong Fang, Zhuqing Liu
分类: cs.CR, cs.AI, cs.IR, cs.LG
发布日期: 2026-08-25
备注: To appear in EMNLP 2026 (Main Conference)
💡 一句话要点
提出RAGSentinel以解决RAG系统的安全漏洞问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 检索增强生成 安全防御 恶意文档 鲁棒性 机器学习
📋 核心要点
- 现有的RAG系统面临恶意文档注入的安全风险,导致生成错误答案,现有防御方法易被攻击者优化。
- RAGSentinel通过测量查询条件下的隐状态变化,去除共享主题方向,利用多数共识过滤毒化文档,提供了一种新的防御机制。
- 实验结果显示,RAGSentinel在多个数据集上有效降低了攻击成功率,同时保持了较高的生成准确性,展现出对适应性攻击的抵抗力。
📝 摘要(中文)
检索增强生成(RAG)通过将响应与外部文档结合,提高了大型语言模型的事实性,但也暴露了一个关键的安全漏洞:恶意文档可能被注入知识数据库,导致模型生成错误答案。现有的后检索防御方法依赖于指令遵循、参数知识或文本级一致性,这些方法都可能被适应性攻击者模仿或优化。为此,本文提出了RAGSentinel,这是一种无训练、无标签的防御机制,旨在保护黑箱RAG系统。RAGSentinel利用替代编码器测量由检索文档引起的查询条件隐状态变化,去除共享主题方向,并通过稳健的多数共识过滤掉几何异常的毒化文档。我们证明,在诚实多数假设和表示级分离条件下,RAGSentinel能够准确恢复无毒化的多数上下文。实验结果表明,RAGSentinel在多个问答数据集、三种大型语言模型和多种毒化攻击下,始终保持较低的攻击成功率,同时保持竞争性的准确性,并对具有完整管道知识的适应性攻击仍然有效。
🔬 方法详解
问题定义:本文旨在解决检索增强生成(RAG)系统中由于恶意文档注入而导致的安全漏洞。现有的防御方法依赖于指令遵循和文本一致性,容易被适应性攻击者利用。
核心思路:RAGSentinel的核心思路是使用替代编码器来测量由检索文档引起的隐状态变化,去除共享主题方向,并通过稳健的多数共识来过滤掉毒化文档,从而保护生成的准确性。
技术框架:RAGSentinel的整体架构包括三个主要模块:替代编码器用于隐状态测量、主题方向去除模块和多数共识过滤模块。该流程确保了毒化文档的有效识别与去除。
关键创新:RAGSentinel的创新之处在于其无训练、无标签的防御机制,能够在黑箱环境中有效识别并过滤毒化文档,与现有依赖于模型训练的防御方法形成鲜明对比。
关键设计:在设计中,RAGSentinel采用了特定的参数设置以优化隐状态测量,并设计了稳健的共识算法以确保过滤效果,具体的损失函数和网络结构细节在论文中进行了详细描述。
🖼️ 关键图片
📊 实验亮点
实验结果表明,RAGSentinel在三个问答数据集上表现出色,攻击成功率显著低于现有基线,且在面对适应性攻击时仍能保持竞争性的准确性,展示了其强大的防御能力。
🎯 应用场景
RAGSentinel的研究成果在多个领域具有潜在应用价值,尤其是在需要高准确性和安全性的问答系统、信息检索和对话生成等场景中。随着对安全性的关注增加,该方法能够有效提升系统的鲁棒性,防止恶意攻击,确保生成内容的可靠性。
📄 摘要(原文)
Retrieval-augmented generation (RAG) improves the factuality of large language models by grounding responses in external documents, but it also exposes a critical security vulnerability: adversarial documents injected into the knowledge database can enter the context window and steer the model toward targeted incorrect answers. Existing post-retrieval defenses rely on instruction following, parametric knowledge, or text-level consistency, all of which can be imitated or optimized against by adaptive attackers. We propose RAGSentinel, a training-free, label-free defense for black-box RAG systems. RAGSentinel uses a surrogate encoder to measure query-conditioned hidden-state shifts induced by retrieved documents, removes shared topic directions, and filters poisoned documents as geometric outliers from a robust majority consensus. We prove that, under an honest-majority assumption and a representation-level separation condition, RAGSentinel exactly recovers a poison-free majority-sized context. Experiments across three question-answering datasets, three LLM families, and multiple poisoning attacks show that RAGSentinel consistently achieves low attack success rates while preserving competitive accuracy and remaining effective against adaptive attacks with full pipeline knowledge.