GuardRAG: A Post-Retrieval Defense against Poisoning Attacks in Retrieval-Augmented Generation
Linghui Jiao, Kang Wei, Fushuo Huo, Ruijie Zhao, Yiyang Ni, Jingcai Guo, Yipeng Zhou, Jun Li
Abstract
Retrieval-Augmented Generation (RAG) enhances the factual grounding of Large Language Models (LLMs) by incorporating external evidence, but also exposes them to corpus poisoning attacks. In particular, coordinated attacks can introduce multiple mutually reinforcing poisoned documents into retrieved contexts, making reliable evidence filtering challenging. To address this problem, we propose GuardRAG, a training-free and plug-and-play post-retrieval defense that exploits the semantic structure of retrieved evidence to identify suspicious document groups. Specifically, GuardRAG first expands the retrieval range and removes near-duplicate candidates, then partitions the retained documents using Hierarchical Agglomerative Clustering (HAC) with a query-adaptive threshold. Finally, it scores and prunes suspicious clusters based on query relevance, cluster size, and semantic compactness. Experiments across three question-answering datasets, multiple poisoning attacks, and six LLMs demonstrate that GuardRAG substantially reduces attack success rates while maintaining answer utility under clean retrieval.
Create a lesson
Metadata
- Comments
- 8 figures
Related papers
Poisoning Attacks and Collaborative Defense Framework for LightRAG-Based Construction Regulation Knowledge
Shared title terminologycs.CRYingyan He
Gradient-Based Defensive Poisoning Against System Identification Attacks on Cyber-Physical Systems
Shared title terminologycs.CRGonçalo Fernandes, José Cecílio, Victor Mattos et al.
Development of an Effective Federated Learning-Based Defense System Against Phishing Attacks on Mobile Platforms
Shared title terminologycs.CREren Dogan, Busra Buyuktanir, Gozde Karatas Baydogmus et al.
Proactive Defense Benchmark against Deepfake Generation
Shared title terminologycs.CRJoonhyuk Baek, Wonjune Seo, Jae-yun Kim et al.
Subverting Tool Arguments: Defense-Evading Metadata Poisoning in LLM Agents
Shared title terminologycs.CRShih-Chieh Dai, Xinyu Sun, Haichuan Zhang et al.
MetaScanner: An Empirical Study and Proactive Defense against Deceptive UI Attacks in Social VR
Shared title terminologycs.CRJunhee Lee, Seungwon Woo, Minseok Kim et al.