Evidence Hub

MARAGE: Multi-Model Adversarial Attack for Retrieval-Augmented Generation Database Extraction

Xiao HU

TSpace (University of Toronto), 2026

Abstract

Retrieval-Augmented Generation (RAG) mitigates hallucinations in Large Language Models using externally retrieved data. Although useful, RAG can expose the retrieved data to extraction attacks. Previous work has demonstrated the feasibility of RAG extraction, but has failed to simultaneously ensure high-coverage retrieval of the entire knowledge database and verbatim extraction of lengthy retrieved data. In this paper, we propose MARAGE, an optimization-based RAG database extraction attack. To obtain high-coverage retrieval, we propose a semantic-aware query selection strategy which optimizes the diversity of retrieved chunks from the database. We then employ an adversarial string appended to each query to force verbatim output of the retrieved RAG data. We generate these strings by leveraging a continuous optimization framework. We integrate three key innovations into this framework: (1) To enhance cross-model transferability, we utilize multi-model optimization, (2) To adapt to the uniquely lengthy target of RAG databases, we introduce Primacy weighting, which prioritizes initial tokens in the optimization target, and (3) We use Perplexity-constrained optimization for evading state-of-the-art defenses. Evaluations show that MARAGE consistently outperforms both manual and optimization-based baselines across multiple LLMs and RAG databases. On an end-to-end RAG pipeline, MARAGE outperforms the manual attack baseline by 329 ± 165% in extracting RAG data. To shed light on why…

Read the paper

Related studies

Go deeper in Evidence Hub

Evidence Hub adds a study data sheet (design, sample size, evidence level, key numbers), an AI summary and a chat grounded in the paper's text.

Open this study Sign up free