acceptodds
Under review as a conference paper at ICLR 2027

Sweeping Promptable Spoofs under the DirtyRAG: A Practical, Query-Blind RAG Attack Done Right

Abstract

Retrieval-Augmented Generation (RAG) enables LLMs to efficiently review query-relevant material and deliver better answers. However, the same pipeline also introduces an additional attack surface: adversarial passages (a.k.a. "spoofs") can be injected into the knowledge bank, and thereby mislead LLM outputs upon retrieval. Despite the widespread demand for RAG, the handful of existing attacks often share three critical shortcomings: (1) They are query-dependent, demanding an unrealistic level of privilege escalation and cost — such as real-time conversation surveillance, spoof crafting, and injection — making them entirely neutralizable by simple system measures like data freezes or timeouts. (2) Their constructed spoofs diverge so sharply from benign text, to the point that a trivial perplexity filter can reach >= 0.9 AUC. (3) These spoofs lack steerability, meaning that even successful retrievals may fail to influence the LLM to reflect the attacker’s intent. To bridge the gap, we present DirtyRAG: a query-blind, black-box, generation-based RAG attack that bypasses all three issues. DirtyRAG can be flexibly prompted to deliver any intended payload while remaining robust against standard defenses. Additionally, we identify several lapses in existing RAG attack evaluations and introduce RAGAttack Bench, a rigorous benchmark designed to reflect real-world attack scenarios, providing a polished testbed for future research in this critical domain.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
ML security, RAG, RAG attack, poisoning, Defense

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 2 reviews, above 27% of the others.
Reviewer_57F7OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This work proposes DirtyRAG, a query-blind poisoning attack against Retrieval-Augmented Generation (RAG). The proposed method aims to generate adversarial passages that can be retrieved without knowing the user's query while misleading the victim LLM toward attacker-desired answers.

The proposed method first generates adversarial passages using an LLM and then paraphrases them through embedding-aware beam search to maintain both semantic fluency and similarity to a target benign passage. It also introduces index perturbation to improve top-k packing, allowing adversarial passages to dominate retrieval results.

The authors further introduce RAGAttack Bench to evaluate retrieval success, end-to-end attack effectiveness, and robustness against defenses. The experiments cover three victim LLMs and five dense retrievers, including black-box transfer settings. With 128 injected adversarial passages, DirtyRAG achieves average accuracy drops exceeding 40 percentage points in most evaluated settings. The authors also demonstrate attack effectiveness with 10 or 20 injected passages and evaluate robustness against filtering and reranking defenses.

Critical strengths
  • This work addresses an interesting problem of query-blind RAG poisoning and proposes a top-k packing strategy to improve attack effectiveness.
  • The paper provides extensive experiments across different LLMs, retrievers, and retrieval settings, including black-box transfer evaluations.
Critical weaknesses
  • The motivation mischaracterizes previous query-dependent attacks. In Sections 1.1 and D.1, the authors argue that these attacks require real-time query surveillance and online document injection. However, PoisonedRAG can prepare and inject adversarial documents offline for predetermined target queries. Although Appendix A discusses the distinction between knowing a target query and a target passage, the main motivation overstates the practical limitations of existing attacks.

  • The experimental evaluation is limited. The main end-to-end evaluation uses only 100 selected query–passage pairs. The TrustRAG evaluation in Appendix G covers only 16 handpicked queries. After applying TrustRAG, only 1/16 queries are successfully steered, while only 1/16 are answered correctly. These results make it difficult to establish the broader claims about defense robustness and practical effectiveness.

Questions for authors
  • Can the authors clarify why query-dependent attacks are assumed to require real-time query surveillance, given that attacks such as PoisonedRAG can prepare adversarial documents offline?
  • How do the authors interpret the TrustRAG results in Appendix G, where both attack success and correct answering decrease to 1/16?
  • How representative are the 100 selected query–passage pairs of broader RAG applications?
  • Can the authors clarify how DirtyRAG performs when the exact stored benign passage is unavailable due to chunking, rewriting, or deduplication? Appendix E.2 discusses these cases, but no experimental results are provided.
5 comments
AuthorsOpenReview ↗

Initial Response to Reviewer 57F7 (1/2)

W1/Q1 - "PoisonedRAG can prepare and inject adversarial documents offline for predetermined target queries... the main motivation overstates the practical limitations of existing attacks." PoisonedRAG uses the exact query for spoof crafting, which means it must either predict the exact user query or have real-time access to it.

The reviewer is correct that PoisonedRAG technically can prepare its spoofs offline. However, it might be important to note that PoisonedRAG crafts spoofs upon the exact query it evaluates on (queries are sampled from the benchmark's testset, and each spoof is then prefixed with that exact query). This means PoisonedRAG must either have a way to predict the exact user query, craft spoofs, and inject them before the query arrives; or craft spoofs in real time, after the query lands.

We respectfully hold that this is a major limitation of existing works like PoisonedRAG: it is highly unlikely for an attacker to access user queries in real time, and it might be even more difficult to know the exact user query before that query is even initiated. DirtyRAG requires neither, as no query enters its pipeline, making query-blind a more realistic threat model.

That said, we agree our original description focused only on the real-time route, and we have since updated our wording in Section 1.1 and Appendix D.1 to cover both.


W2.1/Q3 - "How representative are the 100 selected query-passage pairs of broader RAG applications?" Surprisingly plenty: 100 pairs are in line with much prior art, and we are far more comprehensive on many other axes.

We are glad you asked, since we actually discussed this exact matter in Appendix A. Surprisingly, 100 queries is in line with many prior end-to-end RAG attack evaluations: Corpus Poisoning conducts no end-to-end evaluation; PoisonedRAG and CPA-RAG both evaluate 100 target queries per dataset (10 per trial over 10 trials, without repeats); and CorruptRAG evaluates 100 queries per dataset. We do concede that some works feature more datasets than we do.

In our defense, the scale of queries is only one aspect of the evaluation scale. For our DirtyRAG, the same 100 queries are evaluated under 5 dense retrievers (Qwen, GritLM, Granite, Stella, GTE), 3 top-kk settings (10, 25, 50), 3 reader LLMs (Llama-3.2-3B, Qwen3-4B, gpt-oss-20b), 2 settings (Controlled and Noisy), and 2 embedding verifiers (Granite and Qwen), i.e., 180 configurations per query (Tables 5 and 16–19); plus a reranker defense with 10/20 injected spoofs (Table 6) and 10 temperature-sampling runs (Tables 20–21).

Moreover, end-to-end evaluation is only one part of our results. Retrieval and defense evaluations do not require manual payload verification, so we run them at a much larger scale: RSR@k covers 1,400 multi-query query–passage pairs from BeIR/hotpot_qa and BeIR/nq under both white-box and black-box retrievers (Appendix H.1.2), and defense robustness uses 500 query–passage pairs from BeIR/msmarco (Appendix H.1.5).

To our knowledge, this is considerably more comprehensive than existing RAG attack evaluations, which mostly default to a small top-kk (e.g., k=5k{=}5 in PoisonedRAG).

AuthorsOpenReview ↗

Initial Response to Reviewer 57F7 (2/2)

W2.2/Q2 - "The TrustRAG evaluation in Appendix G covers only 16 handpicked queries... How do the authors interpret the TrustRAG results in Appendix G, where both attack success and correct answering decrease to 1/16?" We concede the scale, and have replaced it with a 42-query, four-setting evaluation that shows the same trend.

The reviewer is correct that 16 hand-picked queries are too few to interpret, and that our original report lacked the clean-system references needed to read them. We have thus replaced Appendix G with all four {no attack, DirtyRAG} × {no defense, TrustRAG} settings on the 42 contextual queries (those the LLM answers wrong without retrieval) out of our 100 end-to-end ones (Granite top-10, Llama, 128 spoofs per passage as in Table 5).

SettingCorrectPassages to LLMSpoofs to LLMGolden passage to LLMNo passage left≥1 spoof to LLM
No attack, no defense2410.0–330–
No attack, TrustRAG115.88–259–
DirtyRAG, no defense310.08.057041
DirtyRAG, TrustRAG50.640.101372

(Passage columns are per-query averages; others are query counts out of 42.)

The larger scale shows the same trend as our original 16 queries, and now with the references to interpret it. With TrustRAG, only 2 of 42 queries have a spoof reaching the LLM. TrustRAG thus does stop DirtyRAG from steering, but by essentially disabling RAG (37 of 42 queries are left with no passage at all). Without the attack, TrustRAG leaves only 9 queries with no passage and keeps most golden passages (33 → 25 of 42). Yet, with DirtyRAG spoofs in the corpus, the golden passage survives for only 1 of 42 queries, as our spoofs are grounded to the benign passage's embedding and kk-means cannot separate the two (Appendix G). These results replace our original 16 hand-picked queries in Appendix G (Table 10).

We thus maintain that TrustRAG is not an effective defense against DirtyRAG. A RAG defense should let users still get correct answers under attack, yet accuracy under attack is 5/42 with TrustRAG versus 3/42 without — far from the 24/42 of an unattacked system. We have revised our paper to clarify that TrustRAG prevents targeted steering only by discarding nearly all retrieved passages, which does not restore a usable RAG system.


Q4 - "Can the authors clarify how DirtyRAG performs when the exact stored benign passage is unavailable due to chunking, rewriting, or deduplication?" Sure! DirtyRAG remains just as effective when the stored passage is chunked or rewritten.

To test this, we keep the same 128 spoofs per passage (crafted against the original passage), but replace the target benign passage in the knowledge bank with: its 2 or 3 sentence-boundary chunks (Chunk ×2, Chunk ×3), or an LLM-rewritten version (Rewrite, by Qwen3.5-35B). Each chunk or rewrite is ranked by its own similarity to the query.

Knowledge baseLlama @10Llama @20Qwen @10Qwen @20Avg
Original81 → 3281 → 3183 → 3783 → 3082.0 → 32.5
Chunk ×280 → 3479 → 3183 → 3686 → 2982.0 → 32.5
Chunk ×378 → 3581 → 3180 → 3583 → 2880.5 → 32.3
Rewrite75 → 3477 → 3082 → 3481 → 2878.8 → 31.5

(Values are accuracy (%) without → with DirtyRAG over 100 queries; Noisy setting, Granite retrieval. The Original row here and the one in our query-paraphrase experiment (Appendix H.5, Table 24) come from independent runs of the same configuration, hence the small differences.)

Across all variants, DirtyRAG still cuts accuracy from ~80% to ~32%, on par with the original knowledge base. We consider this to be much expected: DirtyRAG spoofs are grounded to (perturbations of) the original passage's embedding, and chunks or rewrites of the same content typically land in the same embedding neighborhood. As for deduplication, it removes duplicate copies of the benign passages rather than altering the passage itself, so the attacker's copy will still match the stored one, making no difference in its pipeline. We have added these results to Appendix E.2 (Table 8).

Thank you for the clarifications and additional experiments.

In the revised TrustRAG evaluation, accuracy decreases from 24/42 to 11/42 even without an attack. Could the authors clarify what causes this substantial degradation on clean queries?

Reviewer_JbA5OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper proposes a RAG poisoning attack for a query-blind setting. Many prior attacks require access to user queries, while the proposed attack instead takes a benign passage in a corpora and generates adversarial content whose embeddings lie close to the target passage, but contain malicious content. Empirically the attack is effective able to transfer between many different retrievers and models.

Critical strengths
  1. Empirically the attack is effective with strong ASR under differing defences and models. One of the strong results is that the attack maintains asr across transfer attacks between different retrievers.

  2. The framing of the attack around top-k packing was interesting, with the attack explicitly trying to exploit the geometric properties of the embedding space, rather than classical prompt injection type of attack.

  3. Following from this, the broader discussion of the many-to-one nature of retrieval (i.e. multi-query) is a general take-home-message that can be applied to RAG poisoning work as an important aspect to consider explicitly in future research.

Critical weaknesses
  1. The baselines in Section 5 (Corpus Poisoning and PoisonedRAG) are originally query-dependent attacks, and the paper replaces the optimization target query embeddings with the embedding of the target benign passage (Line 883). Although to a degree understandable, this deliberately places the related works outside the setting for which they were designed. To me, this weakens some of the claims as rather than showing DirtyRAG outperforming comparable methods, it demonstrates that DirtyRAG is better suited to DirtyRAG's threat model.

  2. Building on that there is a fairly extensive related works section but several conceptually closer attacks are not included experimentally. Although the omissions are explained, it doesn't automatically improve the experimental results. Further, the wording around the query dependance on background work is strong: for example Corpus Poisoning can function on unseen queries (and it was not run in this mode for the paper, linking back to weakness (1)).

  3. Query-Agnostic vs. Query-Blind in Appendix C is an important distinction which clarifies the scope. A more succinct version can be helpful in the main body of the text.

  4. The experimental setup for Query-Blind attacks will likely give favourable results to the attacker compared to the overall framing of the problem: although also discussed in the appendix, as the benchmark retains query-passage samples only when the query is addressed by the target passage. So although the attacker does not know the query there is strong semantic alignment between attacker objective, target passage, and evaluated query.

Minor: the presentation needs improving: too much random boldface, excessive em-dashes, switching between boldface, underline, and italic for emphasis, etc.

Minor: As Corpus Poisoning is highlighted as having the drawback of 4h per spoof, runtime and compute for generating the 128 beam-search spoofs per target would be needed for comparison.

Questions for authors

See weakness

4 comments
AuthorsOpenReview ↗

Initial Response to Reviewer JbA5 (1/3)

We thank the reviewer for the detailed feedback. Before we engage in the rebuttal, we want to note that your review is the only one (across all the papers we submitted) that came back as 100% human-written per Pangram. Although Pangram is, of course, not too reliable a source, our experience is that it is reasonably decent at detecting human-driven text — e.g., all reviews produced by our lead author are also 100% human-written per Pangram. We believe there is strong evidence that you put effort into reviewing our work, and for that we appreciate you regardless of your verdict on our work.

We do think many of the concerns you raised are framing-centric, addressable through better delivery, instead of being "too core to fix." We will present our arguments below, and you can be the judge of that.


W1 - Baselines are moved out of their native setting, so results only show DirtyRAG suits its own threat model. Yes, but this threat model is more realistic, and adapting baselines to it checks whether a new method is needed.

We agree that DirtyRAG targets the query-blind threat model and the baselines do not. The practical reason is simply that there was no usable method targeting this query-blind setting when we developed DirtyRAG, so we modified established query-dependent methods to form an equal playground. We consider this modification fair, because:

  1. Query-blind is a more realistic threat model than query-dependent, for the many reasons we list in Section 1 and Appendix D.1. So in our view, the question is less about whether "DirtyRAG is better suited to DirtyRAG's threat model" and more about whether any method — DirtyRAG or not — is better suited to a more realistic threat model; where DirtyRAG just happened to be one of such methods.

    • It might also be worth noting that our query-blind threat model is set up quite generally: all methods have access to the same mundane materials (e.g., the target benign passage in text and a proxy dense retriever) with reasonable optimization (embedding grounding), without playing into any idiosyncrasy.
  2. One important question is whether this query-blind threat model even requires a new method. If existing query-dependent/agnostic methods performed well with simple modifications, there would be no need for DirtyRAG, and we would be happy to present RAGAttackBench as an evaluation benchmark. However, our comparison (with modified baseline methods) shows this is not the case, thus calling for development of new methods.

    • In other words, this is less about placing established methods "outside the setting for which they were designed" to make them look bad, and more about establishing the necessity of building new methods like DirtyRAG.

That said, we take the reviewer's point as a general framing issue and have updated our text to make our message clear: we modify these baselines to sanity-check the necessity of DirtyRAG, rather than to establish DirtyRAG's superiority under a threat model it is more accustomed to. As the reviewer noted, we have already explicitly disclosed our modifications in Lines 406–410 and Lines 890–902, and we have added accompanying text there too.

AuthorsOpenReview ↗

Initial Response to Reviewer JbA5 (2/3)


W2.1 - Several conceptually closer attacks are not included experimentally. No closer attack shares our query-blind threat model, so we had to choose which ones to adapt.

We thank the reviewer for recognizing that we feature a "fairly extensive related works section"; being respectful to prior art is always a top priority of our research, and we are glad that came across well.

As for the notion that "several conceptually closer attacks are not included experimentally," we respectfully note that none of the attacks we feature in Appendix C is query-blind (apart from RAG Paradox, discussed below): they either use specific target queries (e.g., PoisonedRAG, CorruptRAG, CPA-RAG — i.e., query-dependent), use a real or synthetic query set (e.g., Corpus Poisoning, AdvDec, POISONCRAFT, MIRAGE — i.e., query-agnostic), or operate under more distant threat models, such as editing the knowledge bank (Topic-FlipRAG). Any of them must thus be adapted (where possible) to run query-blind, and we chose Corpus Poisoning and PoisonedRAG because they are well-established RAG attacks whose optimization target can be cleanly swapped to the benign passage embedding (Appendix A).

The one attack that is likely "conceptually closer" to DirtyRAG is RAG Paradox https://arxiv.org/abs/2502.20995. However, a) it has no opensource implementation, and b) upon re-checking, it is apparently no longer query-blind in its recent versions. Its first arXiv version (v1, Feb 2025) builds spoofs by extracting knowledge triples from benign documents and negating their relations, as we describe in Lines 1111–1115 and 1323–1327. Its later versions (v2, May 2025; v3, Oct 2025) instead define the attack over "a set of target queries," "decompose each query into its core components," and use an LLM to infer why documents are retrieved for each query. We do not know why the authors changed their threat model and do not wish to speculate, but as an end result, RAG Paradox no longer shares DirtyRAG's threat model, and the two works are therefore not conceptually close. We have updated Appendix C to note this.

We understand the reviewer's interest in closer comparisons. However, as query-blind is a relatively under-explored threat model with few directly comparable methods, we had to choose which prior methods to adapt, and we hope for the reviewer's understanding on this front.


W2.2 & W3 - Corpus Poisoning can function on unseen queries; the query-agnostic vs. query-blind discussion should be in the main text. We concede that Corpus Poisoning has a query-agnostic variant, and we have moved this distinction into the main text.

The reviewer is correct, we concede that we misrepresented Corpus Poisoning and we thank them for the catch. While Corpus Poisoning is commonly used in a query-dependent way (e.g., Table 4 of PoisonedRAG), its original design is indeed query-agnostic: it runs kk-means on a set of training queries (e.g., the 132K NQ training queries), optimizes one adversarial passage per query cluster, and is evaluated on held-out test queries.

That said, neither variant is query-blind. Query-agnostic methods typically need a sizable set of real or synthesized queries to optimize against. One might argue that accessing a pool of real user queries to approximate their distribution is not much less privileged than knowing the exact wording of a few of them, though it requires less real-time escalation. Our take is that grounding spoofs to simulated queries can cause them to cluster tightly around such "fake" embeddings, so if a real query differs, the spoofs may fail to be retrieved (Lines 825–829). Grounding to (perturbations of) the target benign passage is by design less subject to this concern, which motivated DirtyRAG's design.

As the reviewer suggests, we have revised our wording in Section 1 and Appendix C accordingly, and promoted a succinct discussion of query-blind vs. query-dependent vs. query-agnostic attacks to the main text.

AuthorsOpenReview ↗

Initial Response to Reviewer JbA5 (3/3)

W4 - The benchmark retains only queries addressed by the target passage, so there is strong semantic alignment between attacker objective, target passage, and evaluated query. We agree some alignment always exists, as it should in any meaningful query-passage pair; but our method never sees the query and performs well even with varying query wording.

We don't necessarily disagree with the reviewer's observation that some level of alignment between query and passage (and, by extension, attacker objective) exists. But we want to respectfully emphasize that such alignment is innate to any meaningful query-passage pair. If there is no semantic link between the two, they are very unlikely to be matched under clean RAG. Similarly, if the attacker's objective has no connection with a certain benign passage, then such a passage might not be suitable to anchor the attack in the first place.

Additionally, we want to present two arguments backed by evidence:

  • First, our filter is set up in a way that does not favor the attacker. Since we ensure that the target benign passage addresses the query, clean retrieval is naturally strong (e.g., in the "1B" column of Table 1, retrieving the right passage alone results in ~92% accuracy). DirtyRAG therefore needs to either achieve top-kk packing so that the LLM never sees this target benign passage, or confuse the LLM enough that it trusts the DirtyRAG spoofs instead.

  • Second, we find that DirtyRAG is not sensitive to query wording. Below, we use an LLM (Qwen3.5-35B) to generate 3 paraphrases of each of the 100 queries while keeping DirtyRAG's spoofs constant, and find that DirtyRAG performs similarly across different query wordings — which is what an attacker cares about under a query-blind threat model. This is not much of a surprise, as DirtyRAG's spoofs are crafted without seeing the query, but we thought it would be nice to confirm this via experiments.

QueryLlama @10Llama @20Qwen @10Qwen @20Avg
Original82 → 3480 → 3284 → 3782 → 3082.0 → 33.3
Paraphrase 182 → 2682 → 3084 → 3487 → 3383.8 → 30.8
Paraphrase 280 → 2783 → 2980 → 3783 → 3681.5 → 32.3
Paraphrase 376 → 3078 → 2582 → 3283 → 3379.8 → 30.0

(Values are accuracy (%) without → with DirtyRAG over 100 queries; Noisy setting, Granite retrieval.)

(These paraphrases do retrieve differently: without the attack, a paraphrase shares only about 6.5–7.1 of its top-10 passages with the original query on average, and for 15–22 of 100 queries, the paraphrases retrieve passages outside the original query's top-150. Yet, the same set of DirtyRAG spoofs still cuts accuracy from ~80% to ~30%.) We have added these results to Appendix H.5 (Table 24).


And regarding your two minor concerns:

  • Generation speed: With the retriever held fixed, DirtyRAG takes on average 25.6s per spoof across the five retrievers we tested, versus 48.0s for Corpus Poisoning and 49.5s for PoisonedRAG (Appendix A.2, Table 7). It might be worth noting that the ~4h runtime we cited from Li et al., 2025b for Corpus Poisoning is mainly due to its original budget of 5,000 iterations, which later works often do not use. We elaborate on this nuance in Footnote 2 to give these methods a faithful depiction.
  • Punctuation and emphasis: Thanks for noting; we have toned them down.
AuthorsOpenReview ↗

5 hours left. Chance to discuss?

You spent considerable effort drafting your initial review, which we appreciate, and we have met your feedback with a detailed rebuttal. Most of your concerns are framing-related, so we can't tell whether you are satisfied without some signal from your end.

We have dedicated ourselves to delivering a comprehensive account (as evidenced by our experiment coverage and limitations sections), though we understand that research is always a nuance-rich activity, so we'd like to engage with you while we still have the chance.

Comments on the paper

5 comments
AuthorsOpenReview ↗

Initial Response to Reviewer CQCa (1/2)

W1.1/Q1 - Accuracy drops may reflect abstention, confusion, or unrelated errors rather than payload adoption. Report such adoption with human audit. Sure! 87.7% of successful attacks adopt the payload-intended answer.

This is a good question — an attacker has an objective in mind, and would hardly be satisfied if the victim LLM merely becomes inaccurate instead of fulfilling such an objective. We concede that our original report missed this, and thank the reviewer for pointing it out.

We relabel the responses behind Table 5 as correct (the paper's accuracy judge, unchanged), untargeted wrong (wrong but not conforming to the payload, including abstentions and empty responses), or targeted wrong (wrong and conforming to the payload).

ReaderSettingCorrectUntargeted wrongTargeted wrong
Llama-3.2-3BControlled24.711.264.1
Llama-3.2-3BNoisy20.713.166.2
Qwen3-4BControlled32.95.361.8
Qwen3-4BNoisy30.67.661.8
gpt-oss-20bControlled44.44.551.1
gpt-oss-20bNoisy45.97.646.5
All33.28.258.6

(Values are % of responses)

Targeted wrong accounts for 87.7% of wrong answers (10,548 of 12,025), while untargeted wrong makes up only 8.2% of responses. For human auditing, we randomly sample 30 query-payload-answer triplets and find GPT-4o–human agreement on 30/30. For transparency, this audit was done by one of our core authors, so some implicit bias may be involved, though we find such judging rather straightforward.


W1.2/Q2.1 - How often do the same spoofs steer multiple held-out queries about the intended topic? BeIR datasets do not support this kind of setup, but we can paraphrase queries to provide proxy results

The reviewer is correct that our multi-query setup covers retrieval only, which we openly discussed in our Limitations section. However, this is really a dataset constraint: no BeIR dataset we explored yields multiple queries that all retrieve the same passage within a reasonable top-k and are answered by its content (e.g., as disclosed in Appendix H.1.2, BeIR/msmarco only yields one query per passage under our top-k constraints). Retrieval-only evaluation (RSR@k) does not need the latter, but end-to-end evaluation does. Thus, raw BeIR data does not support multi-query end-to-end results.

That said, we can use an LLM (Qwen3.5-35B here) to generate 3 paraphrases of each of the 100 queries, retrieve for each paraphrase from the full corpus, and rank the same spoofs against it to get a proxy reading:

QueryLlama @10Llama @20Qwen @10Qwen @20Avg
Original82 → 3480 → 3284 → 3782 → 3082.0 → 33.3
Paraphrase 182 → 2682 → 3084 → 3487 → 3383.8 → 30.8
Paraphrase 280 → 2783 → 2980 → 3783 → 3681.5 → 32.3
Paraphrase 376 → 3078 → 2582 → 3283 → 3379.8 → 30.0

(Values are accuracy (%) without → with DirtyRAG over 100 queries; Noisy setting, Granite retrieval.)

We confirmed that these paraphrases do retrieve differently: without the attack, a paraphrase shares only about 6.5–7.1 of its top-10 passages with the original query on average, and for 15–22 of 100 queries, the paraphrases retrieve passages outside the original query's top-150. Yet, the same set of DirtyRAG spoofs still cuts accuracy from ~80% to ~30%, showing that DirtyRAG is not sensitive to query wording. We have added these results to Appendix H.5 (Table 24).


Q2.2 - Report the proportion of candidate query-passage pairs excluded by the payload-alignment filtering? About 50%, though we caution against reading into it too much.

For each eligible candidate query–passage pair, we generate an adversarial payload based on the passage and keep the pair only if that payload would actually address the query. We screened 199 candidates to reach our 100 pairs, so about half were excluded.

That said, we would caution against reading much into this ratio. It mainly reflects whether the generated open-ended adversarial passage happens to address the query, which is a matter of luck and not something our method controls (since the payload is written by GPT-4o-mini rather than DirtyRAG). This ratio is also not too reflective of real-world scenarios, as in practice, an attacker would pick the target benign passage and payload to serve their objective, instead of scanning many passages and making up different objectives on the fly.

AuthorsOpenReview ↗

Initial Response to Reviewer CQCa (2/2)

W2/Q4 - TrustRAG: "What are clean and attacked answer quality and payload-specific ASR on the same queries?" Here are {no attack, attack} × {no defense, TrustRAG} results on 42 contextual queries.

First, regarding the comment and request "filtering AUCs alone also do not establish end-to-end effectiveness at a deployable false-positive operating point" and "how does targeted ASR change when filtering thresholds are fixed at matched benign false-positive rates?", we respectfully note that we have never reported AUC on TrustRAG. TrustRAG is not purely a retrieval filter (see step (2) of Appendix G), and AUC only makes sense for score-based filters with a clear definition of true/false positives; the reviewer likely mixed this up with the AUCs we report for other defenses (Table 3).

That said, the reviewer's broader ask is legitimate. Below are all four {no attack, DirtyRAG} × {no defense, TrustRAG} settings on the 42 contextual queries (those the LLM answers wrong without retrieval) out of our 100 end-to-end ones (Granite top-10, Llama, 128 spoofs per passage as in Table 5).

SettingCorrectPassages to LLMSpoofs to LLMGolden passage to LLMNo passage left≥1 spoof to LLMTargeted wrong
No attack, no defense2410.0–330––
No attack, TrustRAG115.88–259––
DirtyRAG, no defense310.08.05704128
DirtyRAG, TrustRAG50.640.1013721†

(Passage columns are per-query averages; others are query counts out of 42. †From a query with no passage left, i.e., the LLM's own knowledge.)

With TrustRAG, only 2 of 42 queries have a spoof reaching the LLM, and neither is targeted wrong. TrustRAG thus does stop DirtyRAG from steering, but by essentially disabling RAG (37 of 42 queries are left with no passage at all). Without the attack, TrustRAG leaves only 9 queries with no passage and keeps most golden passages (33 → 25 of 42). Yet, with DirtyRAG spoofs in the corpus, the golden passage survives for only 1 of 42 queries, as our spoofs are grounded to the benign passage's embedding and kk-means cannot separate the two (Appendix G). These results replace our original 16 hand-picked queries in Appendix G (Table 10).

We thus maintain that TrustRAG is not an effective defense against DirtyRAG. A RAG defense should let users still get correct answers under attack, yet accuracy under attack is 5/42 with TrustRAG versus 3/42 without — far from the 24/42 of an unattacked system. We have revised our paper to clarify that TrustRAG prevents targeted steering only by discarding nearly all retrieved passages, which does not restore a usable RAG system.


Q3 - How much does perturbing the anchor improve targeted ASR over generating fluent paraphrases around the unperturbed anchor, with matched budgets? Sure! Perturbation improves Top-k packing on 4 of 5 retrievers, often by around 2×.

This is a good question: while our work shows that index perturbation achieves top-k packing, we never checked whether an unperturbed anchor with random sampling (e.g., temperature = 1) suffices. We gently note, however, that targeted ASR may not be the most reflective metric here. Perturbed or not, the spoofs are paraphrased from the same open-ended adversarial passage and carry mostly the same payload; perturbation mostly changes where they land in the embedding space. Its effect is thus on retrieval, which targeted ASR reflects only indirectly (not to mention, as noted in W1.2/Q2.1, our BeIR datasets do not support multi-query end-to-end evaluation).

Still, an unperturbed anchor is a meaningful ablation. Following Table 9's single- vs. multi-index comparison, we add a variant whose spoofs are all grounded to the unperturbed benign passage embedding, under the same setting:

AnchorQwenGritLMGraniteStellaGTE
Multi-index perturbation (paper)44.261.233.464.652.0
Single-index perturbation (paper)40.653.435.262.048.4
No perturbation (new)28.468.212.831.823.2

(Values are average Top-k Packing Count, i.e., the number of spoofs more similar to the query than the target benign passage; higher is better.)

Both perturbation variants beat the unperturbed anchor on 4 of 5 retrievers, often by ~2× (GritLM is the exception). We attribute this to unperturbed spoofs concentrating around a single point, leaving fewer of them closer to the query than the benign passage. We have added this row to Table 9.

AuthorsOpenReview ↗

5 hour left, concerns addressed?

Your feedback asked for numerous additional experiments, which we have delivered all with favorable results. We wonder if we can get your confirmation before the rebuttal window ends in 5 hours. Thanks in advance.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.