Reranker Helps, but Not Enough: Towards Strong Poisoning Attacks Against Retrieval-Augmented Generation

Xiaokun Yang, Jian Liang, Yesheng Liu, Xin Xiong, Ran He, Tieniu TanICML 2026

TL;DR: While rerankers are standard tools for improving the quality of Retrieval-Augmented Generation (RAG), they also act as a powerful, "free" defense against data poisoning—one that most current attacks fail to bypass. To address this, researchers introduce the Prompt-Perturbation Poisoning Attack ($\mathbf{P}^3\mathbf{A}$), which uses strategic prompt engineering and subtle character-level tweaks to trick rerankers into promoting malicious content, achieving high success rates even with a single poisoned document.

The Vulnerability in RAG Systems

Retrieval-Augmented Generation (RAG) is the industry standard for grounding Large Language Models (LLMs) in factual, up-to-date data. However, this reliance on an external corpus creates a massive "poisoning" surface. If an attacker can inject a malicious document into the database, they can force the LLM to output false or harmful information.

A major oversight in current RAG security research is the role of the reranker. In production, a reranker sits between the initial retriever and the LLM, using expensive cross-attention mechanisms to "double-check" document relevance. The authors discovered that even a basic reranker, fine-tuned only on clean data, is remarkably good at sniffing out existing poisoning attacks. Traditional attacks often look semantically incoherent or "forced" to the reranker’s deep-learning eye, effectively making the reranker a "free lunch" defense that can drop attack success rates from 85% down to just 3%.

Bypassing the Reranker: The $\mathbf{P}^3\mathbf{A}$ Framework

To bridge this gap and stress-test RAG systems realistically, the authors propose a two-phase framework called the Prompt-Perturbation Poisoning Attack ($\mathbf{P}^3\mathbf{A}$):

1. Rule-Based Prompt Phase (Black-Box)

The authors derived four "Preference Rules" that rerankers naturally favor:

  • Directly state the answer at the very beginning of the text.
  • Use an authoritative tone, mimicking trusted sources like Wikipedia.
  • Provide supporting context to make the fabricated information look plausible.
  • Maintain sharp focus on the query to maximize semantic density.

This phase alone, referred to as $\mathbf{P}^2\mathbf{A}$, serves as a potent black-box attack.

2. Character-Level Perturbation Phase (White-Box)

If the attacker has access to the reranker's gradients, they can further optimize the malicious text. Using a method inspired by Projected Gradient Descent (PGD) and Beam Search, the attacker injects tiny, nearly invisible character-level changes (such as adding a space or swapping a letter). These perturbations significantly boost the document's score in the reranker’s eyes while altering only about 1% of the text, ensuring it remains perfectly readable to humans and bypasses perplexity-based filters.

Experimental Setup and Key Findings

The researchers evaluated their attack across three diverse open-domain QA benchmarks: NQ (Natural Questions), MS-MARCO, and HotpotQA. They tested these against a variety of models, including Llama3-8B, Qwen2.5, and Gemma as generators, alongside MiniLM and ELECTRA as rerankers.

Key Results

  • Superior Attack Performance: On the NQ dataset using MiniLM and Llama3-8B, $\mathbf{P}^3\mathbf{A}$ achieved an Attack Success Rate (ASR) of 72.2%, vastly outperforming the best existing baseline (PoisonedRAG-B), which only managed 34.8%.
  • Single-Doc Lethality: Unlike attacks that require flooding a database with malicious entries, $\mathbf{P}^3\mathbf{A}$ is highly effective even when restricted to injecting just one document into a corpus of millions.
  • High Transferability: The attack is surprisingly robust. A poisoned document optimized for one reranker (e.g., MiniLM) successfully tricked a different reranker (e.g., ELECTRA) with high efficiency.
  • Defense Resistance: Common defenses like query paraphrasing and perplexity filtering failed to stop $\mathbf{P}^3\mathbf{A}$. Simply "cleaning" the query or looking for "gibberish" isn't enough to stop a well-crafted semantic attack.

Limitations and Future Directions

The primary limitation of the full $\mathbf{P}^3\mathbf{A}$ framework is that the perturbation phase requires white-box access to the reranker's parameters. While the attack transfers well, a truly "blind" attacker would have to rely on the prompt-only version ($\mathbf{P}^2\mathbf{A}$), which is slightly less effective.

Ultimately, this research highlights that the RAG community must move beyond static defenses. Since rerankers are the new frontline, developers need adaptive defense strategies capable of identifying the specific linguistic patterns and subtle character-level noise that sophisticated attacks like $\mathbf{P}^3\mathbf{A}$ exploit.

Summary updated

BibTeX
@inproceedings{yang2026reranker,
  author = {Xiaokun Yang and Jian Liang and Yesheng Liu and Xin Xiong and Ran He and Tieniu Tan},
  title = {{Reranker Helps, but Not Enough: Towards Strong Poisoning Attacks Against Retrieval-Augmented Generation}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Y54eyjHFqJ},
}
Figure