RAG Poisoning Defenses Need Matched-Condition Audits, Not Just ASR
An attack-success-rate-only audit conflates prevented attacks with introduced ones; a defense should be judged on four matched conditions per query, with net reduction and clean-set drift reported alongside absolute poisoned target rates.
On this page
A team with 100 queries and a vendor's defense report must decide whether to sign, but the report shows only one attack-success number. The usual advice is to compare attack success rate before and after the defense and accept the drop as evidence of safety. This paper argues that the readout hides half of what a defense does, and it introduces a matched-query protocol called Aligned RAG Evaluation to expose the other half [1]. The authors test it on HotpotQA and Natural Questions, 100 queries each, and conclude that prevented is not protected.
Why the Default ASR Readout Misleads
Most teams audit a defense with one leaderboard number: attack success rate (ASR), the share of questions where poisoned evidence steers the answer to the attacker's target. ASR counts only one direction, from target-positive without defense to target-negative with defense. It does not count the reverse, where a question that was clean without defense becomes target-positive after the defense. The paper names the first direction Prevention and the second Introduction, and writes the net change as N = P − J, with both terms taken over all queries [1].
The argument is that a defense is an intervention on the whole retrieval-augmented generation (RAG) system, a setup that retrieves external passages before the model answers. It changes behavior on malicious and clean questions at once. On HotpotQA with one poison passage, the TrustRAG adapter prevented 20 target-positive answers and introduced 20 new ones, leaving the count at 60/100, exactly where it was without defense.
Four Matched Conditions per Query
Aligned RAG Evaluation fixes the query, the attacker target, the answering model, and the decoding policy, then varies two things: whether retrieval is clean or poisoned, and whether the defense is off or on. That yields four matched records per query [1].
- Clean retrieval, defense off: T_c0
- Clean retrieval, defense on: T_c1
- Poisoned retrieval, defense off: T_p0
- Poisoned retrieval, defense on: T_p1
Each answer is labelled target-positive if it contains the target string or if an LLM judge endorses the target as the answer. From the four rates the paper derives net reduction N = r_p0 − r_p1, clean-target change H = r_c1 − r_c0, and the factorial contrast Γ = N + H. Γ measures how much of the poisoning-induced increase over clean retrieval the defense removes, but a positive Γ can come entirely from more target-positive clean answers, so the authors report N, H, Γ, and the absolute poisoned target rate together [1].
Twenty Prevented, Twenty Introduced, Net Zero
On HotpotQA with one poison passage, TrustRAG prevented 20 target-positive answers and introduced 20, leaving 60/100; KeywordAgg prevented 15 and introduced 15. With five poison passages, TrustRAG prevented 65 and introduced only 1, cutting target-positive answers from 96 to 32 [1]. The same defense looks excellent or useless depending on the attack budget, which a single ASR figure cannot show.
| Dataset (1 poison passage) | Defense | Net reduction N | Clean-target change H | Gamma |
|---|---|---|---|---|
| HotpotQA | TrustRAG | 0 [-12, 13] | 12 [5, 21] | 12 [4, 22] |
| HotpotQA | KeywordAgg | 0 [-10, 9] | -10 [-17, -3] | -10 [-25, 3] |
| HotpotQA | Prompt control | -12 [-21, -4] | -13 [-20, -6] | -25 [-39, -13] |
| NQ | TrustRAG | 18 [10, 26] | 9 [6, 12] | 27 [18, 36] |
| NQ | KeywordAgg | 22 [15, 28] | 1 [0, 3] | 23 [16, 29] |
The table also shows why Γ alone cannot rank defenses. On HotpotQA with one poison, TrustRAG has Γ=12 but N=0 and H=12: the positive contrast comes entirely from more target-positive clean answers, with no reduction in poisoned positives. On NQ, TrustRAG has a higher Γ than KeywordAgg (27 versus 23), yet KeywordAgg has fewer poisoned positives (42 versus 46) and a smaller clean-target increase (H=1 versus 9) [1].
Changing the Scorer Changes the Ranking
String matching checks whether the attacker target appears in the answer; it does not separate mentioning the target from endorsing it. The paper re-scores saved outputs with gpt-4o-mini as an LLM judge and runs a blinded human audit. Among 40 HotpotQA one-poison TrustRAG pairs whose string labels changed, only 16 of 20 claimed preventions were genuine, and only 6 of 20 claimed introductions were genuine; the other 14 mentioned the target while questioning or rejecting the poisoned evidence [1].
Scorer choice therefore changes conclusions: the same saved outputs can make a defense look ineffective under string matching and strongest under LLM-judged endorsement, and the paper states that evaluation criteria can change defense rankings. For anyone buying data or running model evaluations, the practical question is whether a safety report counts string hits or actual endorsement of the target.
Detectors Collapse When Poison Dominates
Detection-based defenses use graph features or retrieval-score statistics and abstain when a threshold is crossed. The paper reports that with one poison passage in the context, the detector intercepts 59 of 60 target-positive outputs; with five poison passages, it intercepts none [1]. The mechanism is straightforward: when most retrieved passages are poisoned, the retrieval-score distribution no longer looks anomalous, so the threshold rule fails.
For acceptance testing, this means a detector must be evaluated at several injection counts. Testing only one poison passage would turn a detector that fails completely at five into a 59/60 success story.
Evidence Dependence and the Limits of the Protocol
The four conditions show whether an answer changed; removal controls show why. The paper records retrieved passages, the poisoned share, whether legitimate supporting evidence was present, and reruns answers after removing poisoned passages. It also introduces a split-knowledge probe in which the target appears only when injected passage B is combined with legitimate evidence A, evaluating {A+B+H, A+H, B+H, H}; a strict case requires target-positive only for A+B+H and target-negative for the other three [1]. This separates single-passage dominance from composition-dependent poisoning.
The protocol does not apply when a team cannot save per-query outputs under all four conditions, because the audit cannot be reconstructed afterwards. It is also out of scope for claims beyond the tested setting: 100 queries each from HotpotQA and Natural Questions, PoisonedRAG plus one split-knowledge probe, Contriever top-5 retrieval, and Llama-3-8B-Instruct as the primary victim, with 70B and Mistral-7B used only for partial checks; pipeline adapters were built for the Llama family, and Mistral was evaluated only with detection-based defenses [1]. The finding is narrower and firmer than a general verdict: ASR-only audits hide prevented versus introduced failures, clean-set drift, scorer sensitivity, and detector collapse. A defense can prevent attacks and still leave the system no safer.
