Tricking Retrievers with Influential Tokens: An Efficient Black-Box Corpus Poisoning Attack
Cheng Wang, Yiwei Wang, Yujun Cai, Bryan Hooi
TL;DR
This work tackles the security of retrieval-augmented generation (RAG) systems by addressing corpus poisoning in a black-box setting. It introduces Dynamic Importance-Guided Genetic Algorithm (DIGA), which exploits two retriever properties—insensitivity to token order and bias toward influential tokens—by guiding a TF-IDF–based importance score through a genetically evolving adversarial passage that maximizes cosine similarity to the centroid of query embeddings. DIGA achieves competitive attack success with significantly lower time and memory demands than gradient-based or inversion-based baselines, and demonstrates favorable scalability and transferability across datasets and retrievers. The study highlights critical vulnerabilities in RAG pipelines and motivates the development of robust defenses, as well as safe-offensive research avenues like indirect prompt injection analyses and ethical considerations.
Abstract
Retrieval-augmented generation (RAG) systems enhance large language models by incorporating external knowledge, addressing issues like outdated internal knowledge and hallucination. However, their reliance on external knowledge bases makes them vulnerable to corpus poisoning attacks, where adversarial passages can be injected to manipulate retrieval results. Existing methods for crafting such passages, such as random token replacement or training inversion models, are often slow and computationally expensive, requiring either access to retriever's gradients or large computational resources. To address these limitations, we propose Dynamic Importance-Guided Genetic Algorithm (DIGA), an efficient black-box method that leverages two key properties of retrievers: insensitivity to token order and bias towards influential tokens. By focusing on these characteristics, DIGA dynamically adjusts its genetic operations to generate effective adversarial passages with significantly reduced time and memory usage. Our experimental evaluation shows that DIGA achieves superior efficiency and scalability compared to existing methods, while maintaining comparable or better attack success rates across multiple datasets.
