Vulnerability of LLM Re-rankers to Prompt Injection AttacksThe Vulnerability of LLM Rankers to Prompt Injection Attacks
The authors state that on TREC-DL-2019, larger LLMs are more easily hijacked, and Flan-T5-Large has an average ASR of 3.21%.
The victim system is an LLM reranker. The attacker injects DOH or DCH prompts at the beginning or end of candidate documents. Task 1 injects into documents not selected as most relevant in the no-attack projection; Task 2 injects into all candidates with label 0. Success is measured by ASR or nDCG@10 drop. The paper does not specify white-box/black-box; the conclusion states that knowledge of non-relevant candidates and the ability to inject into all of them are required.
- LLM rerankers may have their ranking decisions altered by jailbreak prompts written into candidate documents. Qian et al. have observed this phenomenon, but the boundaries of scale, position, architecture, and domain remain unclear, and high ASR does not necessarily equal a drop in nDCG@10.
- Following Qian et al.'s DOH and DCH, the prompt is placed at the beginning or end of the document, covering pairwise, listwise, and setwise. Task 1 measures with ASR whether preferences flip toward the injected document; Task 2 only does setwise re-ranking after BM25, measuring loss with nDCG@10.
- The authors state that larger models are generally more easily hijacked. Flan-T5-Large has an average ASR of 3.21% on TREC-DL-2019danforth, with negative setwise Vuln. 14/15 models have a larger nDCG@10 loss with end-of-text injection, with an average difference of 0.1106.
- The authors consider that full injection of non-relevant candidates is often unlikely in practice and suggest more realistic attack conditions. Experiments cover Table 2 models plus LLaMA-3-8B and LLaMA-3.1-8B; Task 2 only uses setwise and heapsort. The paper does not report the number of repetitions.
- Evaluated models
- Qwen3-0.6BQwen3-1.7BQwen3-8BQwen3-14BQwen3-32BQwen3-30B-A3BGemma-3-1BGemma-3-4BGemma-3-12BGemma-3-27BLLaMA-3-8BLLaMA-3.1-8BLLaMA-3.3-70BGPT-4.1-miniFlan-T5-LargeFlan-T5-XL
- Benchmarks
- TREC-DL 2019TREC-DL 2020TREC-COVIDTOUCHE-2020SciFactDBpedia
- Metrics
- ASRnDCG@10Vuln.
The paper conducts a systematic empirical study of jailbreak-style prompt injection attacks against LLM rerankers, covering three ranking paradigms—pairwise, listwise, and setwise—and two injection variants: decision goal hijacking and decision criterion hijacking. The study uses attack success rate (ASR) to measure preference vulnerability and nDCG@10 to measure the impact on ranking quality, and further analyzes how vulnerability varies across model families, document positions, backbone architectures, and cross-domain scenarios. The paper reports that encoder-decoder architectures exhibit strong intrinsic resilience to jailbreak attacks, and the code and supplementary experimental results have been made publicly available on GitHub.
Paper analysis
What problem does this paper attempt to solve?
The authors aim to quantify the impact boundaries of DOH/DCH on LLM re-ranking preferences and nDCG@10.
Jailbreak prompts in candidate documents can rewrite the preferences of LLM re-rankers and may lower nDCG@10; how this vulnerability varies with scale, position, architecture, and domain remains unclear.
- Scenario: The authors state that LLMs are often used as re-rankers, frequently outperforming traditional methods. Qian et al. [2025] show that simple jailbreak prompts inside documents can change rankings and could be used to spread misinformation and undermine trust in LLM retrieval systems.
- Existing gaps: The authors believe the original setup does not adequately represent real-world use. In a web search case study, LLaMA-3-70B is more robust than LLaMA-3-8B, inconsistent with the main conclusion that "larger is more fragile"; TREC DL only evaluates two LLaMA-3 models and does not specify attack variants or ranking paradigms. Position, backbone architecture, and domain experiments are also limited.
- Observation: High ASR does not necessarily lead to ranking loss. Preference changes may only affect non-relevant documents, or may replace lower relevance labels with higher ones.
- Approach: The authors reproduce and extend Decision Objective Hijacking (DOH) and Decision Criterion Hijacking (DCH), measuring preference vulnerability with ASR, and then measuring nDCG@10 with setwise re-ranking after BM25, examining scale, position, architecture, and domain.
- Threat model:
- Goal: Make the injected document most relevant or rank it first; Task 2 measures whether relevant documents are pushed out using nDCG@10 drop.
- Knowledge: The main text does not specify white-box or black-box. The conclusion states that the attack requires knowing the non-relevant candidates retrieved in the first stage.
- Capability: Write DOH or DCH at the beginning or end of the target document. In Task 1, the target is a candidate not selected as most relevant without the attack; in Task 2, all documents with relevance label 0 are injected, relevant documents are unchanged.
- Victim system: An LLM acting as a re-ranker. Task 1 includes pairwise, listwise, and setwise; Task 2 only uses setwise. The authors state this paradigm is most easily manipulated in Task 1 and can also reduce computation.
What related research exists?
Related work covers four LLM ranking paradigms and adversarial manipulation in ranking, retrieval, and recommendation.
Related work is divided into LLM ranking paradigms on the one handforth, and adversarial inputs in retrieval, ranking, and recommendation on the other. This paper directly continues Qian et al. [2025].
LLM Text Ranking
- Pointwise (Liang et al. [2022], Sachan et al. [2022]) — predicts relevance for a single query-document pair. The authors state this often requires logits, which are unavailable for closed-source models. This paper does not evaluate pointwise, because Qian et al.'s attacks target pair/list/set preferences.
- Pairwise (Qin et al. [2024]) — reduces ranking to binary classification, comparing which of two documents is more relevant. The authors state that inference requires comparing all document pairs, which scales poorly.
- Listwise and Setwise: Listwise (Ma et al. [2023], Pradeep et al. [2023], Sun et al. [2023]) takes a query and a list of candidates and generates a reordering, usually requiring generation of many tokens. Setwise (Zhuang et al. [2024]) iteratively selects the most relevant document from a set; the authors state it offers a better trade-off between effectiveness and efficiency than the other three.
Adversarial Manipulation in Ranking and Retrieval
- Optimization-based boosting (Kumar and Lakkaraju [2024], Pfrommer et al. [2024], Nestaas et al. [2024], Zhuang et al. [2025]) — iteratively optimizes perturbations to boost a target item. Kumar and Lakkaraju show that meaningless, unreadable prompts can still boost item rankings.
- More readable prompts: Pfrommer et al. use tree-of-attacks for structured exploration and iteratively rewrite candidate prompts; Nestaas et al. use human-written prompts to exploit the ranker's instruction following. The paper notes that StealthRank (Tang et al. [2025]) and RAF (Xing et al. [2025]) use energy models or gradient-guided token selection to generate fluent prompts, but often rely on complex iterations or white-box access to the underlying model.
Recommendation Systems
- Persona and metadata (Wang et al. [2024]) — uses N-persona simulation, combining adversarially generated descriptions with metadata of popular items to mislead LLM recommenders.
- Agent iteration (Ning et al. [2024]) — uses policy generation and self-reflection to update malicious descriptions, degrading recommendation quality over multiple rounds.
Baselines and Data
- Baseline methods: DOH/DCH from Qian et al. [2025] and their original ASR; Task 2 also compares against BM25 one-stage retrieval and no-injection Safe Reranking.
- Benchmarks/datasets: TREC-DL 2019/2020; TREC-COVID, TOUCHE-2020, SciFact, DBpedia from BEIR.
The authors position this paper as a reproduction of Qian et al. and connect whether preferences are hijacked to end-to-end retrieval impact, while also covering scale, position, architecture, and domain factors that the original experiments left limited.
How does the paper address this problem?
Reusing DOH and DCH, measuring preference hijacking via ASR, then measuring manipulation loss via nDCG@10 under setwise reordering.
The authors do not propose a new attack but reuse Qian et al.'s DOH/DCH, first testing whether preferences are hijacked, then measuring the nDCG@10 loss under setwise reordering.
Attack and Three Paradigms
- DOH: Replace the original task with an explicit instruction so the model outputs the attacked document as most relevant. DCH: Rewrite the relevance criteria so the injected passage is prioritized. Figure 1 only gives a mechanism schematic; the exact prompts are in Qian et al. and the authors' codebase, not reproduced here.
- Position: Injection is placed at the beginning (front) or end (back) of the document.
- Paradigms: pairwise compares two documents at a time; listwise outputs a ranking of the full candidate list; setwise selects the most relevant document from a set. The set or list size is n=4.
- No pointwise evaluation: The authors state that Qian et al.'s attacks target pairwise, listwise, and setwise preferences.
Task 1: Preference Vulnerability
- Construction: Sampled from discrete relevance levels in qrels. For pairwise, at most 4,096 pairs per query, with order swapped to reduce position bias; setwise/listwise use the same sampling budget, forming candidate sets of 4 documents per query, randomly shuffled. Only queries with sufficient relevance annotations are used. The paper does not give a specific threshold for "sufficient."
- Two steps: First, a clean projection without injection records the baseline selection or ranking; then, injection targets are sampled from candidates not selected as most relevant at that time, and after injection the full candidate set for the same query is re-evaluated.
- ASR: The proportion of successful attacks among valid model outputs. For pairwise, it is the preference flipping toward the attacked passage; for setwise, selecting the injected document; for listwise, ranking the injected document first. The authors apply this definition uniformly across the three paradigms.
- Budget: 4,096 ranking instances per model-schema-attack-dataset combination. Documents are truncated to 8,000 tokens using each model's tokenizer.
Task 2: Ranking Quality
- Pipeline: Pyserini's BM25 retrieves top-1,000, then top-100 is passed to the LLM. Only setwise with n=4, aggregated via heapsort. The authors state this corresponds to the most manipulable paradigm in Task 1 and limits computation.
- Injection: Only into documents with ground-truth relevance label 0; relevant documents remain unchanged. Position is still back vs. front.
- Metrics: Reports nDCG@10 for BM25 only, Safe Reranking without injection, and Attacked Reranking under attack. Vuln. is the average of nDCG_base minus nDCG_attack across DOH/DCH and back/front four settings. The authors treat ∆nDCG as a proxy for gold-standard relevant documents being pushed out by attacked documents.
Extended Dimensions and Implementation
- Four axes: Scale across Qwen3 and Gemma-3 at multiple parameter sizes; compare front vs. back; add encoder-decoder (Flan-T5) and MoE (Qwen3-30B-A3B, 30B total / 3B active); extend from TREC-DL to four BEIR domain subsets.
- Implementation: Reuses Qian et al.'s code. Hardware is A100/H100, vLLM 0.11.0, bfloat16. Flan-T5 uses local HuggingFace inference because vLLM does not support encoder-decoder. The original used vLLM 0.8.5 and 4×H200/H100, and did not specify serving parameters.
What experiments did the paper conduct?
The authors state that on TREC-DL-2019, larger models suffer greater loss, and Flan-T5's Vuln. is negative.
Experimental Setup
- Models under test: decoder-only are Qwen3 (0.6B, 1.7B, 8B, 14B, 32B), Gemma-3 (1B, 4B, 12B, 27B; Table 4 writes 1B/4B as Gemma-3-1B-it, Gemma-3-4B-it), LLaMA-3.3-70B, GPT-4.1-mini; encoder-decoder are Flan-T5-Large (0.8B) and Flan-T5-XL (3B); MoE is Qwen3-30B-A3B. Table 5 additionally has LLaMA-3-8B, LLaMA-3.1-8B, and does not include GPT-4.1-mini.
- Data: TREC-DL 2019/2020; TREC-COVID, TOUCHE-2020, SciFact, DBpedia from BEIR. The paper does not give the number of queries per dataset.
- Conditions: DOH and DCH, front and back. Task 1 compares against Qian et al.'s ASR; Task 2 compares against BM25 and Safe Reranking.
- Metrics and criteria: ASR is computed only on valid outputs; nDCG@10; Vuln. averages over DOH/DCH × back/front. No LLM judge used. In Table 5, a indicates a t-test relative to Base. The paper does not report the number of repetitions.
- Budget: Task 1 has 4,096 instances per combination, n=4, truncation at 8,000 tokens. Task 2 re-ranks the BM25 top-1,000 to a top-100. Section 6.1 is titled Ranking Vulnerability, but the text measures preference ASR.
Main Results
The table below is the nDCG@10 for TREC-DL-2019, setwise+heapsort (based on Table 5). Vuln. also averages over DCH front, which is not listed in the table. Omitted: Qwen3-1.7B, Qwen3-8B, Qwen3-32B, Gemma-3-4B, Gemma-3-12B, Gemma-3-27B, LLaMA-3.1-8B; the highest-Vuln. Qwen3-30B-A3B is included. GPT-4.1-mini is not reported in Table 5.
Swipe horizontally to read the table
Model Base DOH back DOH front DCH back Vuln. Qwen3-0.6B 0.5498 0.1476 0.1255 0.3114 0.3011 Qwen3-14B 0.7459 0.1404 0.2469 0.1797 0.5531 Qwen3-30B-A3B 0.7366 0.1365 0.1519 0.2108 0.5877 Gemma-3-1B 0.2329 0.2332 0.2434 0.2318 -0.0015 LLaMA-3-8B 0.6602 0.1569 0.4504 0.1058 0.4011 LLaMA-3.3-70B 0.7286 0.0741 0.2973 0.0978 0.5850 Flan-T5-Large 0.6601 0.6609 0.6845 0.6553 -0.0102 Flan-T5-XL 0.6949 0.6910 0.6994 0.6934 -0.0046 - The authors state that high ASR translates into ranking loss, and larger, stronger LLMs degrade more. Excluding Gemma-3-1B, the authors state that the difference between baseline and attack passes a t-test in almost all cases. In the table above, attack cells without a include Gemma-3-1B's DOH back and DCH back, Flan-T5-Large's DOH back and DCH back, and Flan-T5-XL's three attack cells.
- The authors state that the attacked re-ranking is below one-stage BM25 (0.5058 in Table 5). Gemma-3-1B is already below BM25 without attack; the authors exclude it from the scale discussion because it cannot reliably produce valid outputs.
- Flan-T5 has negative Vuln. The authors state that the hijacking with non-zero ASR is still not enough to pull down overall ranking quality, and state that encoder-decoders could be candidates for safer ranking systems.
Preference Vulnerability: Reproduction and Scale
- Reproduction: Table 3 is end-of-text injection on TREC-DL 2019/2020. The authors state that the mean absolute deviation for pairwise and setwise is < 6%. For 2019, Mean±Std is pairwise DOH 2.21±1.98, DCH 2.44±6.59, setwise DOH 5.87±7.18, DCH 3.36±7.59, listwise DOH 10.13±8.33, DCH 3.81±4.12. Shading indicates |∆|≥10 percentage points from the original. For example, Qwen3-1.7B's setwise DOH is 92.14% in the original, 73.03% in the reproduction; Qwen3-8B's pairwise DCH is 26.78% in the original, 8.03% in the reproduction. The authors believe the differences for 1.7B and 8B may come from an environment that cannot be fully aligned.
- Closed-source and large models: In the TREC-DL-2019 end-of-text reproduction, Llama-3.3-70B's pairwise DOH/DCH is 100.00% and 99.90%, setwise is 99.82% and 99.77%; GPT-4.1-mini's pairwise is 98.95% and 100.00%, setwise is 97.51% and 99.98%. Both have lower listwise DOH, 54.64% (1595/2919) and 40.35% (1413/3502), respectively; listwise DCH is 99.93% and 99.81%.
- Scale and exceptions: The authors state that increased capability may come with greater susceptibility to decision hijacking, but this is not monotonic. Pearson r=0.9951 between TREC-DL-2019 and 2020; the main text mostly discusses 2019. Qwen3-0.6B's Pairwise-DOH ASR is 99.9% (main text)/99.90% (Table 4 end-of-text), Pairwise-DCH is 75.29%; the authors state this is a 71.95-point reversal relative to Qwen3-1.7B's 3.34%. Gemma-3 is largely monotonic, Qwen3 is more irregular. The authors believe the positive relationship between DCH and scale is more stable. The main text states that subsequent analysis excludes listwise DOH, but Figure 2 still contains that panel; apart from the pairwise numbers above, the main text gives no other endpoint values from the figure.
Architecture, Position, and Domain
- Architecture: Table 4, TREC-DL-2019. Flan-T5-Large, Flan-T5-XL have average ASR 3.21%±2.83 and 3.28%±1.84, a difference of 0.07 percentage points. The authors state that in the ~0.8B range, Qwen3-0.6B's vulnerability is up to 15.6 times that of Flan-T5-Large; in the 3B range, dense decoders are 10–13 times higher. Qwen3-30B-A3B has average ASR 84.83%, Qwen3-32B 83.62%; the authors state these are statistically indistinguishable, and MoE routing does not confer robustness. The authors attribute the encoder-decoder difference to bidirectional encoding mitigating the recency bias of causal decoding, and to span corruption pretraining; this is the authors' explanation.
- Position: Figure 3. The authors state that pairwise is mostly close between front/back, with the exception of Qwen3-32B's Pairwise-DCH dropping from 95.36% to 57.91%. Setwise is most sensitive: the authors state that Qwen3 with end-of-text DCH is usually about 20 points higher, and Gemma-3 with end-of-text DOH is about 10–20 points higher. LLaMA-3.3-70B has a large gap in Setwise-DOH and almost no change in Setwise-DCH. The authors believe that position independence is only approximate, differing from Qian et al.'s claim.
- Domain: Figure 4. The authors state that general-domain and domain ASR align, Pearson r=0.969 (p=0.0003), R²=0.938; all LLMs are slightly below y=x, i.e., TREC-DL ASR is slightly higher than BEIR. DBpedia averages 49.7 words, the authors compare to MS MARCO passage's 56.0 words; TREC-COVID 160.8 words, Touché-2020 292.4 words, SciFact 213.6 words. The authors believe that shorter documents have a higher injection share; although SciFact is shorter, its ASR is lower, which the authors link to binary relevance, whereas Touché-2020 or TREC-DL use three- or four-level annotations.
Other Ablations and Analysis
- Prompt correction: the authors state that the original listwise DOH prompt is erroneous and produces invalid outputs; after communication with the original authors, Table 3 uses the corrected prompt. Because this prompt is inconsistent with the pairwise/setwise DOH, subsequent analysis excludes listwise DOH.
- Task 2 position: 14/15 models have a larger nDCG@10 loss with end-of-text injection, average gap 0.1106; the authors report a paired t-test, p<0.05 (Figure 5).
- The average nDCG difference between DOH and DCH is 0.0090; the authors state that under setwise, paired comparisons often reach p<0.05 (Figure 6).
- Task 2 reproduction: LLaMA-3-8B's Base is 0.6602 (original 0.6930), DOH back is 0.1569 (original 0.1050). The authors state it is broadly comparable)Skip, and state the original does not give setup details.
- Figure 7: the authors state that DBpedia has higher ASR, but TREC-DL 2019 has a heavier nDCG@10 degradation; Flan-T5's cross-domain degradation is negligible. The main text does not give bar heights for the figure.
- Flan-T5 is 0.00% in Table 4's listwise, but the main text states that with and without attack it cannot generate the specified list format, attributing this to a mismatch between the prompt template and span generation objective. The authors report that, averaging across attack settings, average nDCG@10 drops from 0.6584 to 0.2947 (a relative drop of 55.2%); the sentence does not state whether it includes the subsequently excluded Gemma-3-1B.
What are some points that can be further explored?
The authors consider that full injection of non-relevant candidates is often unlikely in practice and suggest more realistic attack conditions.
Limitations and Future Directions Noted by the Authors
- Conditions often do not hold: The conclusion states that both Qian et al.'s and this paper's attacks require knowing the non-relevant candidates retrieved in the first stage and being able to inject into all of them; the authors believe these conditions are often unlikely in practice. (Section 7)
- Future directions: The authors suggest future work should design more realistic attack conditions, closer to what a malicious party could actually do to degrade ranking quality, or boost target pages via SEO; such pages may not be relevant to the user query. (Section 7)
Experimental Coverage
- Task 1 covers Table 2's Qwen3 five sizes, Gemma-3 four sizes, LLaMA-3.3-70B, GPT-4.1-mini, Flan-T5-Large/XL, and Qwen3-30B-A3B. Task 2's Table 5 additionally includes LLaMA-3-8B and LLaMA-3.1-8B, but not GPT-4.1-mini.
- Datasets are TREC-DL 2019/2020, and BEIR's TREC-COVID, TOUCHE-2020, SciFact, DBpedia. Task 1 uses 4,096 instances per model-schema-attack-dataset combination, n=4, truncation to 8,000 tokens.
- Task 2 uses Pyserini BM25 top-1,000 and LLM reranking of top-100, only setwise with heapsort, injecting only into label-0 documents, reporting nDCG@10, with t-test relative to Base.
- Success is determined by whether the model output places the injected document first. The paper does not use an LLM judge, nor does it report the number of repetitions or agreement with human judgments.
- The text explicitly states pointwise is not evaluated because the attacks target pair/list/set preferences. Listwise DOH is excluded from subsequent analysis after prompt correction. The authors state that extended results for TREC-DL-2020 are in the codebase, and the text mainly discusses 2019 due to r=0.9951 between the two years.
Summarize the main content of the paper
Reproduce the impact of DOH/DCH on LLM re-rankers and provide boundaries over scale, position, architecture, and domain.
The authors reproduce Qian et al.'s prompt injection against LLM re-rankers and connect preference flips to end-to-end nDCG@10.
- Problem: DOH/DCH embedded in candidate documents can make the model violate the ranking instructions and boost the injected document. The original paper leaves gaps on whether scale always holds, attack variants, paradigms, position, architecture, and domain, and high ASR does not necessarily equal worse ranking.
- Approach: In Task 1, place prompts at the beginning or end of the document across pairwise, listwise, and setwise, and judge with ASR on valid outputs whether preference flips toward the injected document. In Task 2, after BM25 recall, only use setwise and heapsort, inject into documents with label 0, and measure operation loss with nDCG@10 and Vuln.
- Reproduction and scale: On TREC-DL, the mean absolute deviation for pairwise/setwise is < 6%. The authors state that larger models are overall more easily hijacked, but Qwen3-0.6B's Pairwise-DOH end-of-text ASR is 99.90% and Pairwise-DCH is 75.29%, not lower than larger Qwen3s.
- Architecture and loss: On TREC-DL-2019, Flan-T5-Large/XL have average ASR 3.21% and 3.28%, with setwise Vuln. -0.0102 and -0.0046. In the same table, Qwen3-30B-A3B has Vuln. 0.5877 and LLaMA-3.3-70B 0.5850. The authors report that average nDCG@10 across attack settings drops from 0.6584 to 0.2947.
- Position and domain: The authors state that under setwise, end-of-text injection causes a larger nDCG@10 loss in 14/15 models, with an average gap of 0.1106. TREC-DL and BEIR ASR correlate at r=0.969; the authors state that high ASR does not equal heavier nDCG degradation.
- Authors' conclusion: The scale trend generally holds, but position is not irrelevant; encoder-decoder has both lower ASR and nDCG loss; vulnerability is mainly an intrinsic property of the model, while also moderated by document length and relevance level. The authors also believe that knowing and injecting all non-relevant candidates is often unlikely in practice.