SNAPRAG: Cost-Efficient Knowledge Extraction Attack on RAG Systems via Adversarial Perturbations
Abstract
Retrieval-Augmented Generation (RAG) systems improve Large Language Model (LLM) responses by incorporating information from external knowledge bases. However, recent studies have shown that attackers can extract substantial portions of private knowledge bases from RAG systems through repeated querying. Yet, state-of-the-art extraction attacks either rely heavily on external LLMs to generate adversarial queries or require a large number of queries. In this paper, we propose SNAPRAG, a novel and cost-efficient attack for extracting RAG knowledge bases through adversarial perturbations. Our approach algorithmically generates adversarial queries without relying on external LLMs and allows for a strictly configurable query budget. In particular, SNAPRAG uses a discrete token-mutation algorithm to generate novel queries in a strict black-box setting. Our adaptive dissimilarity threshold calibration systematically forces queries into unexplored semantic regions of the target database, enabling extraction with fewer queries. Specifically, to extract half of the target knowledge base, our method requires up to 6.77 fewer queries than existing approaches. Furthermore, within a fixed query budget, our method recovers up to 96.9%, outperforming the closest approach by 7.7-19.9%. We further evaluate SNAPRAG against active defenses, where it remains the leading attack on four of five defended targets, achieving 50.7-96.3% extraction rate.
Create a lesson
Metadata
- Comments
- 20 pages, 6 figures, including appendices
Related papers
Agents of Chaos: A Systematization of Knowledge (SoK) on Malicious Attacks on Agentic AI Systems
Shared title terminologycs.CRThanh M. Truong-Le, Amber Bennoui, Hoang-Ly Nguyen et al.
NPUFHE: An Efficient CKKS Execution System for Ascend NPUs
Shared title terminologycs.CRKe Changke, Jian Wang, Xuan Xu 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.
Poisoning Attacks and Collaborative Defense Framework for LightRAG-Based Construction Regulation Knowledge
Shared title terminologycs.CRYingyan He
Attacks and Defenses in Decentralized Multi-Agent Systems with Hop-by-Hop Task Decomposition and Delegation
Shared title terminologycs.CRMatthew D. Laws, Maria Lazou, Alina Oprea et al.
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.