arXiv:2607.20437cs.CLcs.CR2026-07

用图论方法识别RAG系统中组合文档的恶意关联,防住隐蔽攻击。

TopoGuard: Graph Theory Based Defenses Against Split-Knowledge Attacks on RAG

论文配图:TopoGuard: Graph Theory Based Defenses Against Split-Knowledge Attacks on RAG
图 1 · 摘自论文原文
  • 构建文档语义相似图,通过拓扑结构检测恶意组合。
  • 在HotpotQA上比LlamaGuard多捕获21倍攻击,1%误报率下召回率32.6%。
  • 轻量高效,毫秒级延迟,适合生产环境防御自适应攻击。

生产级检索增强生成(RAG)系统依赖多个外部文档回答复杂问题,但这些文档引入了新威胁面,可被用于发动分裂知识攻击。在此类攻击中,攻击者注入看似无害的文档,但组合后会诱导语言模型产生虚假关联。本文指出,现有逐文档过滤器(如LlamaGuard)无法察觉此类结构化威胁。为此,本文提出基于图论的TopoGuard系列方法,通过构建检索文档的语义相似图,检测具有恶意拓扑特征的上下文。理论分析表明,TopoGuard在噪声输入下仍具有效性和鲁棒性。在两个检索数据集上的大量实验显示,TopoGuard-λ₂+Entity在HotpotQA数据集上以1%假阳性率(FPR)达到32.6%召回率,相比LlamaGuard-2-8B提升21倍(1.5%召回率)。相较于依赖大模型的生产级检测系统,所提方法实现亚毫秒级延迟,且对自适应攻击和跨领域良性查询保持稳健。

原文摘要 · Abstract (English)

Production Retrieval Augmented Generation (RAG) systems rely on aggregating multiple external documents to answer complex queries. However, the retrieved documents introduce a new threat surface that can be exploited to launch split-knowledge attacks. In this attack, the adversary injects documents that are individually benign but create false associations when combined and fed to language models. This paper shows that the new attack is structurally invisible to existing per-document filters, like LlamaGuard. To address this issue in RAG, this work introduces TopoGuard, a family of graph theory-based methods specifically targeting the split-knowledge attacks by building a semantic similarity graph from retrieved documents and detecting contexts with malicious topology. Grounded on the theoretical analysis, the TopoGuard family has been proven to be effective and robust even with noisy inputs. Extensive experiments are conducted on two retrieval datasets and compared with multiple baseline methods. Specifically, the TopoGuard-$λ_2$+Entity catches 21$\times$ more attacks than LlamaGuard-2-8B at 1\% FPR (32.6\% vs 1.5\% recall) on the HotpotQA dataset. Compared with production RAG detection systems using large language models, the proposed TopoGuard variants run efficiently at sub-millisecond latency and stay robust under adaptive adversaries and benign cross-domain queries.

RAG安全图论对抗攻击检测系统

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。