Exposing Private Corpus Leakage in Multimodal RAG

Yihao Liu, Xinqi Lyu, Dong Wang, Bin XiaoNeurIPS 2026

TL;DR

Multimodal Retrieval-Augmented Generation (RAG) grounds AI vision-language models in private files—like medical scans or corporate PDFs—to keep them from hallucinating. However, even if the system never directly shows those private files, an attacker can figure out whether a specific image-text record is hiding inside the database using just two black-box queries. By adding invisible, targeted noise to an image and watching how much the AI's text output degrades, researchers can reliably expose private data leakage.

What Problem Does This Paper Address?

When organizations deploy Vision-Language Models (VLMs), they often connect them to private databases of images and documents—a setup called Multimodal RAG. While traditional privacy research asks whether an AI memorized a piece of data during training, RAG shifts the vulnerability to the external database supporting generation at runtime.

Suppose a hospital uses a multimodal RAG assistant over a repository of X-rays and diagnostic notes. Even if the system never displays the retrieved records to the user, can an outsider still infer whether a specific patient's image-caption pair is sitting in that private database?

Answering this—known as a Membership Inference Attack (MIA)—is uniquely tricky in multimodal RAG for two reasons:

  1. Cross-modal asymmetry: You are probing for an image-text pair, but in a strict black-box setting, you only ever see text come back out (no probabilities, logits, or retrieval scores).
  2. Smart models mask the signal: Modern VLMs have massive prior knowledge. Even if an image isn't in the database, the VLM can look at your query image and write a great, accurate description from scratch, making it hard to tell whether it relied on retrieved private data or its own general intelligence.

Methods

Instead of judging a single AI response, the authors propose the Semantic Degradation Attack (SDA), which measures how sensitive the system is when you subtly sabotage its search engine. The intuition is simple: if a record is actually in the database, a clean query gets an exact match, whereas a sabotaged query loses that exact support and suffers a steep drop in output quality. If the record isn't in the database, both queries just pull approximate neighbors anyway, so the output barely changes.

Figure 1: Framework of SDA. SDA first uses local surrogate visual encoders to generate a retrieval- disrupting perturbation for the target image. The original and perturbed images are then submitted to the black-box multimodal RAG system under the same context-grounded prompt, producing descriptions Dorig and Dpert. Finally, SDA compares their semantic alignment with the candidate caption C and uses the drop Sorig −Spert as the membership score.

SDA executes this in three steps using only two queries to the target system:

  1. Transferable Multi-Model Perturbation (New): Because the attacker doesn't know which image retriever the black-box RAG uses, optimizing adversarial noise on a single local model risks overfitting. Instead, SDA uses standard projected gradient ascent with momentum and random resize-pad transformations, optimizing a single bounded pixel perturbation ($\epsilon = 8/255$) jointly across three local surrogate encoders (CLIP ViT-B/32, CLIP RN50, and OpenCLIP ViT-H-14) to push the image away from its original embedding space.
  2. Context-Grounded Prompting (New): Both the clean image and the perturbed image are sent to the RAG system alongside a strict prompt telling the VLM to describe the image solely using retrieved examples and to avoid filling in details from general knowledge.
  3. Semantic Degradation Scoring: Using a standard sentence encoder (all-mpnet-base-v2), SDA measures the cosine similarity of both generated descriptions against the target's candidate caption. The drop in similarity ($S_{\text{orig}} - S_{\text{pert}}$) serves as the membership score.

Datasets

No new datasets are introduced, though the authors construct disjoint member, non-member, and distractor splits from existing corpora to simulate private RAG repositories:

  • General-domain: MS COCO and LAION_CC_SBU (a mixed image-caption corpus built from LAION, Conceptual Captions 3M/12M, and SBU Captions). Each retrieval database holds 500 member records and 5,000 distractors, tested against 500 disjoint non-members.
  • Medical-domain: ROCOv2 and PMC-OA (evaluated in the appendix to test high-sensitivity clinical domains).

Key Insights and Ideas

  • Random static doesn't fool retrievers: Simply adding uniform, Gaussian, or random-sign pixel noise within the same visual budget yields near-random guessing (~0.46–0.51 AUC). You need gradient-guided feature displacement across multiple surrogates to meaningfully disrupt an unseen retriever.
  • Prompting shuts off the VLM's "safety net": Swapping the strict context-grounded prompt for a general "describe this image" prompt causes low-false-positive detection (TPR@1%FPR) to plummet from 55.44% down to 14.72%. Forcing the model not to use its internal knowledge amplifies the signal from the retrieval layer.
  • Weakened confidence matters more than swapped neighbors: Surprisingly, even after perturbation, member images still keep their exact top-1 retrieved match 81.45% of the time (compared to 33.07% for non-members), yet suffer a much larger drop in retrieval similarity. The leakage signal comes from weakening the overall retrieved evidence across the top-$k$ context, not just swapping out the #1 search result.
  • System-prompt defenses fall flat: Adding defensive system prompts (adapted from prior work) to stop the VLM from leaking information barely budges SDA's accuracy (changing average AUC from 0.8364 to 0.8384), proving that you have to protect the retrieval layer itself, not just police the text generator.

Key Results

Evaluated across five commercial and open-weight VLMs (GPT-5, GPT-4o, Gemini 3.1, Qwen3-VL, and GLM-4.6V) with an unseen CLIP ViT-L/14 retriever, SDA consistently outperforms six adapted black-box baselines—often while using far fewer queries (2 queries vs. 5 for MrM and ~30 for IA).

  • LAION_CC_SBU: SDA hits an average 0.8364 AUC (vs. 0.7191 for the best baseline, MrM) and 45.13% TPR@1%FPR (vs. 26.90% for IA). With GPT-5, it reaches 0.8688 AUC and 55.44% TPR@1%FPR.
  • MS COCO: SDA achieves an average 0.8214 AUC (vs. 0.7263 for MrM) and 48.25% TPR@1%FPR (vs. 28.62% for S2MIA).
  • Cross-Architecture Transfer: Even when tested against non-CLIP target retrievers (GME-Qwen2-VL-Instruct and Llama-Nemotron-Embed-VL), SDA maintains solid performance at 0.8099 and 0.7293 average AUC, respectively.

Limitations and Future Work

While the authors do not include a dedicated limitations section, their ablation experiments highlight several practical constraints and directions:

  • Scaling the haystack: As the background knowledge base scales from 5K to 100K distractor records, overall AUC stays steady (0.8688 to 0.8621), but strict low-false-positive detection (TPR@1%FPR) drops from 55.44% to 37.90%.
  • Context dilution: Increasing the number of retrieved examples ($k$) from 1 to 10 gradually dilutes the influence of the exact match, lowering AUC from 0.9372 ($k=1$) to 0.8303 ($k=10$).
  • Architectural gaps: Attack performance noticeably dips when transferring CLIP-optimized perturbations to certain non-CLIP architectures like Llama-Nemotron-Embed-VL (0.7293 AUC).
  • Future defenses: Because prompt-level guardrails fail to stop semantic degradation, future work must focus on securing the multimodal retrieval mechanism itself rather than just filtering generated text.

Summary updated

Abstract

Multimodal Retrieval-Augmented Generation (RAG) helps mitigate hallucinations in Vision-Language Models (VLMs) by grounding generations in external knowledge bases. However, this externalized memory also introduces privacy risks, as external queries may reveal signals about sensitive visual records in the retrieval corpus, including medical images, scanned contracts, and proprietary business documents. To study this risk, we propose the Semantic Degradation Attack (SDA), a two-query method for exposing private corpus leakage in multimodal RAG by testing how strongly generated responses depend on retrieved evidence. SDA constructs transferable retrieval-disrupting perturbations using local surrogate visual encoders. By measuring the drop in the semantic similarity of the VLM's generated descriptions and the candidate caption after perturbation, SDA can distinguish whether a target image-caption record exists in the private retrieval corpus. Extensive experiments across five popular VLMs demonstrate that SDA outperforms existing baselines on two general-domain image-caption datasets and remains effective on two medical datasets.
BibTeX
@inproceedings{liu2026exposing,
  author = {Yihao Liu and Xinqi Lyu and Dong Wang and Bin Xiao},
  title = {{Exposing Private Corpus Leakage in Multimodal RAG}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=A69wmC5lPE},
}
Figure