"Glue pizza and eat rocks" -- Exploiting Vulnerabilities in Retrieval-Augmented Generative Models
Zhen Tan, Chengshuai Zhao, Raha Moraffah, Yifan Li, Song Wang, Jundong Li, Tianlong Chen, Huan Liu
TL;DR
This paper investigates security vulnerabilities in Retrieval-Augmented Generative (RAG) models by demonstrating that adversaries can inject content into open knowledge bases to steer model outputs, even under gray-box conditions where queries and LLM parameters are unknown. It introduces the LIAR framework, a bi-level optimization-based attack training approach that decouples adversarial content into retriever-targeted and generation-targeted components, enabling simultaneous manipulation of retrieval and generation. Through extensive experiments across multiple retrievers, knowledge bases, and LLMs, LIAR achieves high attack success rates and shows notable transferability of adversarial content to unseen models and data sources. The work highlights critical security risks in real-world RAG deployments and calls for robust defenses such as adversarial training and anomaly detection to preserve the integrity of machine-generated content.
Abstract
Retrieval-Augmented Generative (RAG) models enhance Large Language Models (LLMs) by integrating external knowledge bases, improving their performance in applications like fact-checking and information searching. In this paper, we demonstrate a security threat where adversaries can exploit the openness of these knowledge bases by injecting deceptive content into the retrieval database, intentionally changing the model's behavior. This threat is critical as it mirrors real-world usage scenarios where RAG systems interact with publicly accessible knowledge bases, such as web scrapings and user-contributed data pools. To be more realistic, we target a realistic setting where the adversary has no knowledge of users' queries, knowledge base data, and the LLM parameters. We demonstrate that it is possible to exploit the model successfully through crafted content uploads with access to the retriever. Our findings emphasize an urgent need for security measures in the design and deployment of RAG systems to prevent potential manipulation and ensure the integrity of machine-generated content.
