Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Through the Stealth Lens: Attention-Aware Defenses Against Poisoning in RAG

About

Retrieval-augmented generation (RAG) systems are vulnerable to attacks that inject poisoned passages into the retrieved context, even at low corruption rates. We show that existing attacks are not designed to be stealthy, allowing reliable detection and mitigation. We formalize a distinguishability-based security game to quantify stealth for such attacks. If a few poisoned passages control the response, they must bias the inference process more than the benign ones, inherently compromising stealth. This motivates analyzing intermediate signals of LLMs, such as attention weights, to approximate the influence of different passages on the response. Leveraging attention weights, we introduce the $\textbf{Normalized Passage Attention Score}$ (NPAS) and a lightweight $\textbf{Attention-Variance Filter}$ (AV Filter) that flags anomalous passages. Our method improves robustness, yielding up to $\sim$ $\textbf{20%}$ higher accuracy than baseline defenses. We also develop adaptive attacks that attempt to conceal such anomalies, achieving up to $\textbf{35%}$ success rate and underscoring the challenges of achieving true stealth in poisoning RAG systems.

Sarthak Choudhary, Nils Palumbo, Ashish Hooda, Krishnamurthy Dj Dvijotham, Somesh Jha• 2025

Related benchmarks

TaskDatasetResultRank
Question AnsweringRQA
ASR25.6
130
Question AnsweringNQ--
113
Question AnsweringHotpotQA PIA (test)
ASR44
62
Question AnsweringRQA-MC
RACC (Accuracy)77.2
58
Question AnsweringNQ Poison Attack (test)
Attack Success Rate25.8
35
Question AnsweringNQ
RACC58.8
29
Question AnsweringHotpotQA Poison (test)
Retrieval Accuracy (RACC)48.8
17
Question AnsweringNQ PIA (test)
RACC49.8
17
RAG Poisoning Attack MitigationRQA
ASR (PIA)2.4
15
RAG Poisoning Attack MitigationNQ
ASR (PIA)5.8
15
Showing 10 of 14 rows

Other info

Follow for update