Manuscript Offprint

arXiv:2610.33849

Ranking Is Not Deciding: Benchmark Shortcuts and Operating-Point Collapse in Query-Time RAG Poisoning Defenses

Pushkal Kumar, Arvin Sahaym

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Pushkal Kumar

North Creek High School

pushkalku@gmail.com

Arvin Sahaym

Washington State University

arvin@wsu.edu

Abstract—Query-time filters that screen each retrieved document before it reaches the generator are the dominant published defense against retrieval-augmented generation poisoning, and they report near-perfect detection on domain benchmarks. We show that this performance is predicted by how the poison set was built rather than by what the filter reads: removing a single construction cue destroys the deployed decision before it destroys the ranking. Two statistics computed from a poison set and its clean corpus alone, with no defense, scores or labels, profile the cue: containment, how often the target question appears verbatim in the poison, and length overlap. Containment captures a construction choice used in PoisonedRAG: its released code prepends the target question to every inserted passage. Of the 21 published defense evaluations we survey, 8 verifiably run poison built this way and 5 substitute a length cue; separately, 12 report no false-positive rate at the operating point they deploy. Deleting the prefix from the attack authors' own passages, and nothing else, leaves 0.93 of them still retrieved for their target and takes RAGuard, a published content filter we re-implement, from AUROC 0.953 to 0.758 and its miss rate from 0.191 to 0.763. Across four corpora, four attack families and ten per-document defenses on one shared candidate set, the profile predicts where detection saturates. Padding medical poison to clean length with word-shuffled filler that carries no content takes TrustRAG's set-level stage from a miss rate of 0.000 to 0.827, and one learned scorer of ours from 0.000 to 0.986 (0.321 at a matched 5% false-positive rate) while its AUROC holds at 0.953 and the share of injected poison reaching the context rises from 0.00 to 0.94. The ranking survives; the decision does not. AUROC alone can conceal this collapse, and a defense-aware attacker defeats our own scorer, so we draw no defense claim from it. A detection result is evidence only when it is reported with its poison set's construction profile and the false-positive rate at the threshold actually deployed; we release the script that computes the profile.

Index Terms—retrieval-augmented generation, data poisoning, benchmark validity, cost-sensitive classification, adaptive attacks

I. INTRODUCTION

Retrieval-augmented generation (RAG) grounds a language model in documents retrieved from an external corpus [1], so the corpus is an attack surface: an adversary who can insert text can steer the output for chosen queries without touching model weights. Five passages per target question suffice for over 90% attack success [2], later work needs one [3]–[5] or hides the payload behind triggers [6], [7], and content-level detectors have “negligible impact” on optimized attacks [8]. The response

Figure

Fig. 1. Two numbers, computable with no defense, no scores and no labels, say whether a published detection number means anything. Upper: each poison set's construction profile — how often the target question occurs verbatim in the poison, and how far the poison's word lengths fall outside the clean band ( ⋆\star: that corpus's clean band has no width at all, so its separation is degenerate). Lower: median miss rate at the deployed point over the six defenses of Fig. 3, on the template rung ( ∘\circ) and under the one control that moves that corpus's median most ( ∙\bullet, named above each pair). Per-defense values and the signed one-feature AUROCs are in the released data.

has been query-time filters that decide, before generation, which retrieved documents may enter the context [9]–[14] (Section II). Two construction numbers predict the result. A poison set can be profiled before any defense runs, from the poison and the clean corpus alone, by two numbers: how often the target question occurs verbatim as a contiguous substring of the poison document, and how far the poison and clean word-length distributions separate. The first is not an artifact of our regeneration. PoisonedRAG's released implementation constructs each inserted passage as the target question followed by the generated text [2], 1^{1} and its released archive stores the generated half alone. Across our four corpora the pair runs, as containment / length overlap, 1.00 / 1.00 on Natural Questions (NQ), 1.00 / 0.00 on medical, 1.00 / 0.91 on financial, and 1.00 / 0.00 on legal, whose clean corpus has no length variance at all ( p95/p5=1.00p_{95}/p_{5} = 1.00). Containment is thus 1.00 in every template cell of Table III and on the passages PoisonedRAG's code inserts: it is the literature's condition, not a variable of ours, and the across-corpus prediction rests on the length number and

1^{1}src/attack.py: adv_text_a = question + ".", then adv_text_a + i for i in adv_texts_b; the white-box path initialises adv_a = query.

on the one released arm where we can set containment to zero. Deleting the prefix from the attack authors' own passages, changing nothing else, is the leading control of this paper (Fig. 1): it moves the best published content filter we re-implement, RAGuard, from AUROC 0.953 to 0.758. Every saturating cell has at least one extreme number; where both are, as on medical, 4 of the 8 distinct score systems miss nothing (ten defenses, eleven table rows, eight score systems: three rows are our one learned scorer at three thresholds, Section IV-A). Every miss rate here is reported against the false-positive rate it was bought at.

Ranking is not deciding. On medical poison padded to the clean length with word-shuffled filler — identical length and vocabulary, no coherent content — our learned scorer keeps AUROC 0.953 and misses 0.321 at a matched 5% false-positive rate, while at the threshold it deploys it misses 0.986; TrustRAG's set-level stage moves from 0.000 to 0.827 under the same edit. The ranking is degraded; the operating point is gone; and AUROC-only reporting cannot tell the two apart. Padding with real clean prose also collapses a GPT-2 perplexity threshold [15], [16] and RAGuard's chunk score, but by content dilution, not length: a mean-token likelihood is set by its padding, and shuffled filler returns their miss rates to 0.000 and 0.000 (Section VI-B); we lead with the detectors whose collapse survives the placebo. Once a cue has driven score mass to the extremes every threshold rule selects the same documents, so benchmark validity and operating-point evaluability are one quantity measured twice.

What this does not show. One of the ten defenses is our own learned scorer, the one system whose features can be ablated. Every negative result below indicts it first and the constructed benchmarks second: a defense-aware attacker passes 0.977 of its poisoned documents past it (Section VI-B), and we propose no defense. The profile is validated at four corpora and no more, and at single (corpus, attack, defense) points its direction is wrong for 40 of 90 (Fig. 5). Per-source trust is a mechanism reported beside a provenance leakage of 1.000; it is not a detection result, and nothing here is a guarantee.

Contributions. (I) A two-number construction profile of a poison set, computable before any defense runs, that predicts which published benchmarks saturate — measured on regenerated templates, on the attack authors' own released passages, on the poison sets of 21 published defense evaluations and on every question-targeted attack that releases poison as text (Sections II-E and V). (II) The dissociation the profile exposes and its two failure modes: calibration collapse, which leaves the ranking usable and the deployed point dead and is partly repairable at a stated false-positive cost, and signal collapse, which nothing in the decision layer repairs; with a five-rung ladder of payload-preserving edits scored under a conjunctive criterion (Section V). (III) The consequence for evaluation: on the cells the profile flags, no operating-point claim — ours included — is falsifiable, verified by building the best available cost-derived rule and finding that it changes no decision in 12 of 26 cells (Section VI).

References (100)