arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.04711cs.IRcs.AI
收藏

通过稀疏注意力缓解RAG中的语料知识污染攻击

Addressing Corpus Knowledge Poisoning Attacks on RAG Using Sparse Attention

Faculty of Data and Decision Sciences, Technion - Israel Institute of Technology, Haifa, Israel(数据与决策科学学院,技术Ion-以色列理工学院,海法,以色列)

Sagie Dekel, Moshe Tennenholtz, Oren Kurland

AI总结:

本文提出SDAG方法,通过稀疏注意力机制有效防御RAG中的语料知识污染攻击,显著提升防御性能。

摘要:

检索增强生成(RAG)是一种高效的范式,用于保持基于大语言模型(LLM)的响应最新,并减少幻觉的可能性。然而,最近研究表明RAG对语料知识污染攻击非常脆弱:攻击者将误导性文档注入语料库以引导LLM输出到期望的响应。我们主张LLM中的标准因果注意力机制使有害的跨文档交互成为可能,特别是在攻击情况下。因此,我们引入了一种新的防御方法RAG:稀疏文档注意力RAG(SDAG)。这是一种块稀疏注意力机制,禁止检索文档之间的跨注意力。SDAG仅需要最小的推理时间更改注意力掩码;此外,不需要微调或额外的架构更改。我们展示了基于LLM的问题回答(QA)在各种攻击策略下的实证评估。我们证明了我们的SDAG方法在攻击成功率方面明显优于标准因果注意力机制。我们进一步展示了将SDAG与最新RAG防御方法结合的明显优势。具体来说,这种结合导致的性能在统计上显著优于最新水平。

英文摘要:

Retrieval Augmented Generation (RAG) is a highly effective paradigm for keeping LLM-based responses up-to-date and reducing the likelihood of hallucinations. Yet, RAG was recently shown to be quite vulnerable to corpus knowledge poisoning: an attacker injects misleading documents to the corpus to steer an LLM's output to an undesired response. We argue that the standard causal attention mechanism in LLMs enables harmful cross-document interactions, specifically in cases of attacks. Accordingly, we introduce a novel defense approach for RAG: Sparse Document Attention RAG (SDAG). This is a block-sparse attention mechanism that disallows cross-attention between retrieved documents. SDAG requires a minimal inference-time change to the attention mask. We present an empirical evaluation of LLM-based question answering (QA) with a variety of attack strategies on RAG. We show that our SDAG method substantially outperforms the standard causal attention mechanism. We further demonstrate the clear merits of integrating SDAG with state-of-the-art RAG defense methods. Specifically, the integration results in performance that is statistically significantly better than the state-of-the-art.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑