Blocking is not protection: what attack success rate conceals about problems in RAG defensesPrevented is Not Protected: What Attack Success Rate Hides about RAG
The authors propose the Aligned RAG Evaluation protocol, which uses four-condition matching records to evaluate RAG poisoning defenses; the authors state that existing defenses introduce new target answers and that scoring rules change the ranking of defenses.
- RAG poisoning defenses are usually evaluated only by attack success rate (ASR), which the authors argue masks side effects such as new target answers introduced by the defense and changes in clean-query behavior, making leaderboards unable to reflect the overall safety of the system after defense.
- Proposes Aligned RAG Evaluation: for each query, save four matched answers (clean/poisoned retrieval × defense on/off), combine string matching with gpt-4o-mini judge endorsement, passage-removal controls, and split-knowledge probes to distinguish prevention from introduction, mention from endorsement, and single-passage dominance from evidence combination.
- PoisonedRAG and three pipeline defenses were evaluated on 100 queries each from HotpotQA and NQ: TrustRAG under string labels blocked 20 and introduced 20 target answers; LLM judging changed the ranking of defenses; the interception rate of the score-gap/dispersion detector dropped to 0 with 5 injection passages; most poisoning successes require only a single injection passage.
- The authors note that each unit has only 100 queries and that queries share ten injection passages, and that the defense results are adapted versions rather than exact reproductions of the original papers; the experiments are limited to two English question-answering datasets, the PoisonedRAG attack and a small number of defenses, Mistral is only checked as a detector, and clean-answer utility cannot be concluded due to the high uncertainty rate of the judges.
- Threat model
- RAG knowledge poisoning: attackers inject constructed passages into the retrieval corpus (PoisonedRAG) so that they are retrieved at inference time and steer the model to output the attacker-specified target answer; the victim system is a RAG question-answering system that retrieves the top-5 passages using Contriever.
- Evaluated models
- Llama-3-8B-InstructLlama-3.1-70B-Instruct-AWQMistral-7B-Instruct-v0.3
- Benchmarks
- HotpotQANatural Questions (NQ)BEIR corpora
- Metrics
- target-positive rate (ASR)Prevention P / Introduction J / Net reduction Nclean-target change Hfactorial contrast ΓLLM-judged endorsementdetector interception ratehuman-judge agreement (kappa)
The paper proposes Aligned RAG Evaluation, a matched-query evaluation protocol for distinguishing "blocked" failures from "introduced" failures in RAG poisoning defenses. The protocol examines both clean and poisoned responses to the same query under conditions with and without defenses, and combines LLM-judged endorsement with retrieval-dependence controls to separate target mention from LLM endorsement, and the influence of a single passage from evidence combination. On HotpotQA and Natural Questions, experiments show that existing defenses, while blocking some attacks, introduce unexpected positive answers about the target, and that the evaluation criteria themselves change the ranking of defenses. The authors accordingly point out blind spots in evaluations based on attack success rate (ASR); code and evaluation artifacts have been released.
Paper analysis
What problem does this paper attempt to solve?
The authors argue that evaluating RAG poisoning defenses with ASR alone masks new failures introduced by the defense, and propose a query-matched evaluation protocol.
Core problem: RAG poisoning defenses are evaluated only by attack success rate (ASR), which the authors argue masks failures introduced by the defense itself and the mechanisms behind surface-level blocking.
- Scenario and importance: RAG incorporates external corpora into the model input; an attacker can inject crafted passages into the corpus so that they are retrieved and steer the model to output an attacker-specified answer; a defense should eliminate this influence without harming clean-query performance.
- Shortcomings of existing evaluation: the authors state that most defenses only evaluate whether they can prevent attacks from hitting the target, but a defense may simultaneously prevent some poisoned answers, introduce new target answers on other poisoned queries, or make the model refuse; a leaderboard that only looks at block counts cannot reflect the overall safety of the system after defense.
- Core observations: on the same batch of saved outputs, string matching and LLM-judged endorsement give different defense rankings; detectors fail when the retrieval context is filled with poisoned passages.
- The paper proposes: the Aligned RAG Evaluation protocol (including four-condition matched records, LLM-judge endorsement, and retrieval-dependence controls), the split-knowledge probe, and a pip-installable evaluation tool ALIGNED RAG-EVAL.
- Threat model (evaluation object, following the paper's setting):
- Attacker goal: make the model output an attacker-chosen answer (malicious or desired output) for a target query.
- Attack method: inject a passage set P into the retrieval corpus C (PoisonedRAG), which is retrieved into the context at inference time.
- Victim system: a RAG question-answering system using Contriever to retrieve top-5 passages and models such as Llama-3-8B-Instruct to answer.
- Success criterion: the answer contains the target string (string match), or is judged by the LLM judge to semantically endorse the target answer.
What related research exists?
Related work is divided into four groups: corpus poisoning attacks, RAG defenses, benchmarks and evaluation protocols, and attribution and passage dependence.
Corpus poisoning attacks
- Zhong et al. (2023)—early corpus poisoning work showing that a small number of adversarial passages can be retrieved by a large number of queries.
- PoisonedRAG (Zou et al., 2025)—makes poisoning targeted: each injected passage targets a specific query and asserts an attacker-chosen answer; this paper uses it as the attack under evaluation.
- Later variants: blocker documents interfering with retrieval (Shafran et al., 2025), single-document attacks (Chang et al., 2025), graph-structured retrieval poisoning (Liang et al., 2026); indirect prompt injection is a neighboring threat (Perez and Ribeiro, 2022; Greshake et al., 2023). The paper notes that this paper's split-knowledge probe differs from existing poisoning attacks: injected passages are designed to be insufficient on their own and to take effect only when combined with legitimate evidence.
RAG defenses
- RobustRAG (Xiang et al., 2026)—answers from isolated passages or passage groups and aggregates; this paper's KeywordAgg adapter follows its keyword-based variant.
- TrustRAG (Zhou et al., 2025)—filters suspicious retrieved content and uses model self-assessment to resolve inconsistency between retrieved knowledge and parametric knowledge.
- Prompting methods such as InstructRAG (Wei et al., 2025) have the model explicitly reason about which passages to trust; this paper's prompt-only control is its minimal version; RAGuard (Kumar et al., 2026) is a layered system. The paper notes that these defenses are usually evaluated by how many known attacks they block, whereas this paper additionally asks what the defense introduces, how it changes clean answers, and whether the target string is actually endorsed.
Benchmarks and evaluation protocols
- Zhang et al. (2025)—benchmarks RAG poisoning attacks and defenses across datasets, retrievers, and models; AgentDojo (Debenedetti et al., 2024) evaluates both safety and utility in agent scenarios. The paper notes that these benchmarks report results as aggregate rates, whereas this paper saves four matched answers per query, allowing re-scoring after generation, consistent with the idea of dynamic evaluation (Kiela et al., 2021).
Attribution and passage dependence
- ContextCite (Cohen-Wang et al., 2024) attributes generations to context segments; RAGOrigin (Zhang et al., 2026) performs responsibility attribution; TRACE (Chen et al., 2026) uses token-influence attribution to detect poisoning. The paper notes that this paper's removal, poison-only, and individual-poison controls use the same ablation idea but are used to label result types (whether the result depends on injected passages, whether a single passage suffices, whether combination is necessary).
Baselines and benchmarks: the defenses evaluated are KeywordAgg (adapted from RobustRAG), TrustRAG, and the paper's own prompt control baseline; the attack is PoisonedRAG; the datasets are HotpotQA and Natural Questions (BEIR corpus). The authors position this paper as a complement to, not a replacement for, existing ASR-style evaluation.
How does the paper address this problem?
For each query, four matched answers are saved, and an auditable evaluation is performed combining dual scoring, removal controls and split-knowledge probes.
Overall idea: evaluate a defense as an intervention on the whole system. Aligned RAG Evaluation saves four answers per query (clean/poisoned retrieval × defense on/off) under a fixed query, target, victim model, and decoding strategy, then layers on dual scoring and passage-level controls.
Four-condition matched records and transition metrics
- For each query q, fix attack target t, take clean context c from the original corpus C and poisoned context p from C ∪ P, and generate answers without defense (0) and with defense (1), forming the 2×2 matrix in Table 1 (Tc0, Tc1, Tp0, Tp1).
- Target positive is defined by the scoring criteria: string match (answer contains the target string, case-insensitive) or LLM-judged semantic endorsement; rsd is the target-positive rate under the corresponding condition.
- Three metrics are defined and always reported alongside the absolute poisoned target rate: Prevention P (proportion of Tp0=1→Tp1=0), Introduction J (proportion of Tp0=0→Tp1=1), and net reduction N = P − J = rp0 − rp1; clean-side change H = rc1 − rc0; factorial contrast Γ = (rp0 − rc0) − (rp1 − rc1) = N + H. The paper emphasizes that a positive Γ is not necessarily safer (it may come from more target answers under clean retrieval) and must be interpreted jointly with N and H.
Retrieval and passage-dependence controls
- Record each query's retrieved passages, poisoned-context proportion, and whether legitimate supporting evidence exists, and run a passage-removal control: remove the injected passages while keeping the order of the remaining passages unchanged and without re-retrieval; if the target-positive label disappears, record it as injection-dependent.
- Two small-scale controls: poison-only (keep only the injected passages) and individual-poison (keep only one injected passage at a time), to determine whether poisoning works as a group or a single passage suffices.
split-knowledge probe
- Construct queries where the target answer appears only when injected passage B is combined with legitimate evidence A in the corpus; evaluate under four context combinations {A+B+H, A+H, B+H, H} (H is the remaining retrieved passages).
- strict case: target positive only under A+B+H, negative under all other combinations; strict newly induced case additionally requires the clean answer to be negative. Used to distinguish evidence-combination poisoning from single-passage dominance.
Scoring and statistics
- Dual scoring: string matching (comparable with existing research) + gpt-4o-mini as LLM judge, distinguishing mention from endorsement, assessing reference-answer correctness, identifying refusals, and allowing uncertain.
- Reliability: a blinded manual audit of 100 outputs (oversampling label flips, TrustRAG cases, and judge-uncertain samples), reporting kappa agreement.
- Statistical uncertainty: paired defense effects use nonparametric bootstrap 95% confidence intervals clustered by shared injection group; individual result rates use 95% Wilson intervals; McNemar test p-values are also reported (pMcN column in Table 2).
Experimental configuration
- Attack: PoisonedRAG, 100 queries each for HotpotQA and NQ, queries grouped in tens, with budget p giving each group 10p injected passages; the main setting uses Contriever top-5 retrieval (corpus passages encoded at 128 tokens, queries and poison at 512 tokens, dot-product scoring), with two additional encoding controls, Dot512 and Cosine512; split-knowledge additionally uses BGE-base English (BAAI/bge-base-en-v1.5).
- Victim models: mainly Llama-3-8B-Instruct; generalization checks use Llama-3.1-70B-Instruct-AWQ (vLLM) and Mistral-7B-Instruct-v0.3 (detector experiments only, since the pipeline adapters were built only for the Llama family).
- Defenses: detector-based (graph features or retrieval-score statistics, refusing when a threshold calibrated on clean retrieval is exceeded) and pipeline-based (KeywordAgg, TrustRAG filtering plus conflict resolution, prompt control); context input, model calls, decoding, and scoring are unified, and evaluation is on the same batch of saved retrieval contexts.
What experiments did the paper conduct?
Three pipeline defenses and six types of detectors were evaluated on 100 queries each from HotpotQA/NQ, organized around four RQs.
Experimental Setup
- Models under test: victim models are Llama-3-8B-Instruct (main), Llama-3.1-70B-Instruct-AWQ, and Mistral-7B-Instruct-v0.3 (detector only); the judge is gpt-4o-mini-2024-07-18.
- Datasets and attack: PoisonedRAG with 100 queries each for HotpotQA and NQ (BEIR corpus, top-5 retrieval, budgets p=1 and p=5); the split-knowledge probe uses 311 HotpotQA candidates.
- Defenses evaluated: pipeline-based KeywordAgg, prompt control, TrustRAG; detector-based six scores (spectral connectivity, conductance, modularity, minimum retrieval score, score gap, score dispersion), calibrated to a nominal 1% FPR on 500 held-out clean queries.
- Metrics: target-positive rate (string match and LLM-judged endorsement), N/H/Γ, detector block rate, removal-control labels (newly induced, injection-dependent, single-passage sufficient).
- Judging and agreement: blinded manual audit of 100 outputs, reporting kappa; paired effects use group-clustered bootstrap 95% CI.
- Repeats and scale: 100 queries per cell; clean-utility diagnostics use 200 held-out clean queries per dataset.
Main Results
Figure 2 (string labels, 100 queries per panel) and Table 2 (p=1 diagnostics, in percentage points):
Swipe horizontally to read the table
Setting Defense Prevented/Introduced Target positive after defense N [95% CI] H HotpotQA p=1 KeywordAgg 15 / +15 60 0 [−10, 9] −10 HotpotQA p=1 Prompt control 7 / +19 72 −12 [−21, −4] −13 HotpotQA p=1 TrustRAG 20 / +20 60 0 [−12, 13] 12 HotpotQA p=5 TrustRAG 65 / +1 32 — — NQ p=1 KeywordAgg 29 / +7 42 22 [15, 28] 1 NQ p=1 TrustRAG 25 / +7 46 18 [10, 26] 9 NQ p=5 TrustRAG 79 / +1 14 — — (No-defense baselines: HotpotQA 60/96, NQ 64/92; for p=5 N/H/Γ see Table 9, e.g., TrustRAG on HotpotQA p=5 has N=64 [55, 73].)
- The authors state that prevention does not equal risk reduction: on HotpotQA p=1, TrustRAG prevents 20 and introduces 20, leaving the final count unchanged; KeywordAgg likewise is flat at 15/15.
- The authors state that Γ cannot be used alone for comparison: TrustRAG's Γ=12 on HotpotQA p=1 comes entirely from more target answers on the clean side (N=0, H=12).
- At p=5, TrustRAG substantially lowers target positives on both datasets (96→32, 92→14), whereas prompt control raises target positives.
Scoring rules change defense rankings (RQ2)
- What was measured: the same batch of saved outputs scored separately by string matching and LLM-judged endorsement (Figure 3). On HotpotQA p=1, TrustRAG and no defense both have 60 string positives, but endorsement is 11 vs 35; on NQ p=1, TrustRAG has more string positives than KeywordAgg (46 vs 42) but lower endorsement (7 vs 20).
- Manual review: manual audit of all 40 label-flip pairs for TrustRAG on HotpotQA p=1 finds 16 of 20 preventions are true preventions, and only 6 of 20 introductions are true introductions, with the other 14 being mentions that question or reject the poisoned evidence. The authors state that string matching treats mentions or refusals as attack success, overestimating attacks introduced by the defense.
- Paired comparison: in Table 3, on the 77 queries with decisive labels shared on NQ p=1, TrustRAG's endorsement is 14.3 percentage points lower than KeywordAgg (CI [−24.3, −3.9]); prompt control instead raises endorsement from 35% to 61% (HotpotQA p=1) and from 42% to 55% (NQ p=1).
- Judge reliability: in Table 11, overall human-machine agreement on target endorsement is 69/100 (κ=.39), and 64/69 (κ=.74) on the decisive-judgment subset; agreement on reference-answer correctness is lower (overall 50/98, κ=.20).
Detectors fail when poisoned passages fill the context (RQ3)
- What was measured: the proportion of target-positive outputs blocked by six detectors at a nominal 1% calibrated FPR (Figure 4). On HotpotQA, score-gap and score-dispersion each block 59/60 at p=1 and 0/96 at p=5; on NQ they block 32/64 and 36/64 at p=1, and only 1/92 at p=5.
- Controls: the failure persists with unified 512-token encoding (Dot512) and cosine similarity (Cosine512) (Table 15: 65/66→0/95 under Dot512); relaxing to a nominal 20% FPR, no detector blocks more than 4/96 at p=5; AUROC drops from 0.999 at p=1 to 0.46 at p=5.
- Generalization: the attack remains effective on Mistral-7B-Instruct-v0.3 (HotpotQA clean 19%→80%/100%, NQ 5%→72%/98%), and score-gap block rate drops from 78/80 to 0/100 (HotpotQA) and from 38/72 to 1/98 (NQ) (Appendix B, Figure 5). The authors state that this failure is not specific to Llama-3-8B.
Evidence dependence and split-knowledge (RQ4)
- Single-passage sufficiency: in Table 4, 91 of the 92 poisoned positives on NQ p=5 can be reproduced by at least one injected passage alone; HotpotQA p=5 is 96/96; on Llama-3.1-70B it is 95/95 (Table 5). The authors state that most newly introduced target answers depend on injected evidence, but rarely require multiple injected passages acting jointly.
- split-knowledge: in Table 6, Contriever/Llama-3-8B produces 27 poisoned positives on 311 candidates (23 newly introduced), only 7 of which satisfy the strict combination condition, and 17/27 can be triggered by a single injected passage; under BGE retrieval there are 2 strict cases, and 0 under Llama-3.1-70B. The authors state that split-knowledge is a diagnostic for evidence combination, not evidence of a stronger attack.
- Defense on strict cases: in Table 13, TrustRAG suppresses 6 of the 7 strict cases, but the final target positives are 37, higher than the 27 without defense (20 introduced).
Other ablations and analyses
- Clean utility (Table 7, 200 held-out clean queries per dataset): TrustRAG has 147/200 (HotpotQA) and 139/200 (NQ) reference-answer correctness labels marked uncertain; the authors state that reliable conclusions about clean-answer utility cannot be drawn.
- Encoding-arm sensitivity (Table 16): KeywordAgg's introduction counts at p=1 across the three encoding arms are 15, 9, and 21 respectively; the authors therefore base defense conclusions on paired tables with intervals.
- Exposure stratification (Appendix H): the 60 target positives on HotpotQA p=1 are distributed across 21/57/22 contexts retaining all/partial/no supporting evidence (containing 10/31/19 respectively); at p=5 all top-5 contexts are filled with injected passages.
- Output repair (Appendix J): an early adapter saved only the first line of KeywordAgg output; after recovering 290 full outputs from the original traces, its HotpotQA target counts were corrected from 23/100 and 26/100 to 60/100 and 91/100.
What are some points that can be further explored?
The authors explicitly state two limitations: the sample size and shared injections, and that the defenses are adapted versions; the experiments cover two datasets and a small number of defenses.
Limitations and future directions noted by the authors
- Sample size and independence (Limitations): PoisonedRAG has only 100 queries per cell, and queries share injected passages in groups of ten; the authors handle this with group-level bootstrap intervals and paired tests rather than treating each query as fully independent.
- Defenses are adapted versions (Limitations): results should be read as an evaluation of this paper's adapted KeywordAgg, TrustRAG, and prompt-control pipelines, not an exact reproduction of the original papers' systems; the authors state this does not affect the core methodological claim that "defenses cannot be judged by block counts alone."
- Clean-utility conclusions are limited (§4.2 and Appendix C): on 200 held-out clean queries, TrustRAG has 147/200 (HotpotQA) and 139/200 (NQ) correctness labels marked uncertain; the authors state that reliable conclusions about clean-answer utility cannot be drawn, and place that table in the appendix rather than using it as a headline defense ranking.
- NQ corpus fingerprint pending independent documentation (Appendix K): NQ uses a downloaded BEIR corpus whose exact fingerprint still needs independent documentation, and NQ's support alignment was not separately verified.
Scope of experimental coverage
- Victim models tested: Llama-3-8B-Instruct, Llama-3.1-70B-Instruct-AWQ, and Mistral-7B-Instruct-v0.3, 3 in total; Mistral was used only for detector checks and did not run the pipeline defenses (§3, Appendix B).
- Attack is PoisonedRAG only (including this paper's split-knowledge variant), with 100 queries each for HotpotQA and NQ, p ∈ {1, 5}; the split-knowledge probe uses 311 HotpotQA candidates (§3).
- Defenses evaluated are 3 pipeline defenses (KeywordAgg, prompt control, TrustRAG) and 6 detector scores; the 70B check reuses saved retrieval contexts and is a victim-scale check rather than a full defense rerun (Appendix K).
- Judging uses a single model, gpt-4o-mini-2024-07-18; a blinded manual audit of 100 outputs gives 69/100 agreement on target endorsement (κ=.39) and 50/98 agreement on reference-answer correctness (κ=.20) (Appendix D, Table 11).
- The paper does not report the number of repeated generations per query cell; the decoding strategy is only stated to be fixed across conditions, without specific sampling parameters.
Summarize the main content of the paper
The authors propose a four-condition matching evaluation protocol, arguing that ASR-style evaluation obscures the failures and mechanism differences introduced by RAG defenses.
A paper on evaluation methods for RAG poisoning defenses, whose core claim is "blocked does not equal protected": looking only at attack success rate misses the target answers and mechanism information that defenses themselves introduce.
- Problem: RAG retrieval corpora can be injected with poisoned passages (PoisonedRAG), and existing defenses are mostly evaluated by ASR, which the authors argue cannot reflect the overall safety of the defended system.
- Method: Aligned RAG Evaluation saves, for each query, four matched answers from clean/poisoned retrieval × defense on/off, and reports the net reduction N, the clean-side change H and the factorial contrast Γ; it adds endorsement judgments by a gpt-4o-mini judge, passage-removal controls and split-knowledge probes, and provides a pip-installable tool.
- Blocking and introduction coexist: Under HotpotQA p=1 with string labels, TrustRAG blocked 20 target answers while introducing 20, for a net reduction of 0; at p=5 it blocked 65 and introduced only 1 (96→32) (Figure 2, Table 2).
- Scoring rules change rankings: On the same outputs, TrustRAG under string matching has 60 positives, the same as no defense, whereas LLM judgment endorses 11 vs 35; prompt control raises the endorsement rate from 35% to 61% (Figure 3).
- Detector failure: The score-gap/dispersion detector intercepts 59/60 with 1 injection passage and drops to 0/96 with 5 (HotpotQA, nominal 1% FPR), and this also holds under Mistral-7B and an encoding control (Figure 4, Appendix B).
- Mechanism: Of the 92 poisoning positives at NQ p=5, 91 can be reproduced with a single injection passage; strict composition cases in split-knowledge are few (only 7 of 27 positives), which the authors describe as a diagnostic of evidence composition rather than evidence of a stronger attack.
- Authors' conclusion: RAG defenses should be evaluated as interventions on the whole system, and a complete report should state what was blocked, what was introduced, the impact on clean queries, and whether the target string is actually endorsed; the authors also note limitations such as 100 queries per unit, queries sharing injection passages, and defenses being adapted versions.