Privacy-Preserving Retrieval-Augmented Generation with Plausible Deniability

Wenxuan Bao, Shan Jin, Vincent Bindschaedler, Yiwei CaiNeurIPS 2026

TL;DR

Retrieval-Augmented Generation (RAG) is great for grounding LLMs in facts, right up until it accidentally parrots sensitive medical records or proprietary files verbatim. Existing privacy fixes add noise word-by-word, paying a massive "privacy tax" that scales with sentence length and turns answers into generic mush. PD-RAG flips the script: it generates a complete answer first using the LLM’s natural randomness, then runs a fast mathematical check to verify that other, completely separate documents could have plausibly produced that exact same response—giving you strong differential privacy, better answers, and up to a 33× speedup.

What Problem Does This Paper Address?

When you hook an LLM up to a private database (patient charts, legal discovery, enterprise search), you expose yourself to membership inference attacks—clever adversaries probing the system to figure out whether a specific document lives in your database. Standard RAG leaks like a sieve here, sometimes copying private text almost verbatim.

To stop this, researchers apply Differential Privacy (DP), a mathematical guarantee that the output won't meaningfully change whether any single document is in the database or not. Previous DP-RAG methods operate at the token level (running dozens of LLMs in parallel to vote on every single next word) or the keyword level (stripping documents down to sanitized buzzwords).

The catch? Token-level DP burns through your privacy budget ($\varepsilon$) linearly with every word generated. Longer answers mean either terrible privacy or heavily degraded, robotic text. Keyword-level DP, meanwhile, starves the LLM of context.

Comparison of RAG outputs on a medical query showing Vanilla RAG leaking verbatim text while PD-RAG gives a natural, private answer.

Methods

Instead of micromanaging tokens, PD-RAG (Plausibly Deniable RAG) operates at the answer level. Its core intuition is wonderfully simple: if an answer could have just as easily been written using several disjoint sets of documents, it can't possibly be leaking secrets unique to a single document.

Figure 1: PD-RAG framework overview. 1⃝A query retrieves the top N documents from a private corpus. 2⃝Documents are randomly partitioned into m disjoint groups. 3⃝A seed group is chosen uniformly at random and the LLM generates a candidate answer y from that group. 4⃝The privacy test scores y under every group via forward passes, counts how many groups yield similar log-probabilities (integer counting), adds geometric noise, and checks whether the noisy count exceeds a threshold K. 5⃝If the test passes, y is released; otherwise the system retries with a new partition (up to R times) or falls back to data-independent generation M(Q, ∅).

Here is how a query flows through the pipeline:

  1. Retrieve & Partition: Fetch the top $N$ relevant documents and randomly shuffle them into $m$ non-overlapping groups.
  2. Generate a Seed Answer: Pick one group at random and let the LLM generate a full candidate answer $y$ (using sampling temperature $T$ for natural diversity).
  3. Score Alternatives: Ask the LLM: "How likely were you to generate this exact answer $y$ if I had given you Group 1 instead? What about Group 2?" The algorithm groups these log-probabilities into bins to count how many alternative groups yield a similar likelihood ($\tau$).
  4. The Privacy Test: Add symmetric geometric noise to the count $\tau$ and check if it clears a threshold $K$ (while also applying a slight probabilistic "ceiling" $1-\psi$ that randomly rejects some passes to prevent rejections themselves from leaking info).
  5. Release or Retry: If it passes, release $y$! If it fails, reshuffle and retry up to $R$ times. If all attempts fail, fall back to answering the query using zero retrieved documents (pure parametric LLM knowledge).

The authors prove that this entire dance—including the retries—satisfies $(\varepsilon, \delta)$-differential privacy.

Datasets

No new benchmarks were introduced; the authors evaluated PD-RAG across three established, diverse QA datasets (evaluating on Llama-3.1-8B, Mistral-7B, and Llama-3.2-3B-Instruct):

  • ChatDoctor: Medical dialogues (50k document corpus).
  • QASPER: Information-seeking questions over scientific papers (1.5k corpus).
  • ASQA: Long-form answers for ambiguous factoid questions (2.7k corpus).

Key Insights and Ideas

  • The LLM's own randomness is the privacy noise: Unlike traditional DP mechanisms that inject artificial noise into gradients or token logits, PD-RAG relies on standard temperature sampling to naturally smooth out output probabilities across document groups.
  • Checking is vastly cheaper than generating: Generating an answer requires sequential, token-by-token decoding. Scoring that fixed answer against $m$ other document groups takes just one parallelized forward pass per group thanks to the transformer's causal mask. That asymmetry is why PD-RAG is so fast.
  • Selective filtering of verbatim leaks: Even though partitioning documents alone lowers average attack success, the plausible deniability test acts as a targeted sniper against memorization—catching single-document verbatim spans ($\ge 20$ tokens) nearly $3\times$ more often in rejected candidates (29.1%) than accepted ones (10.9%).

Key Results

  • Near-Random Attack Success: Against RAG membership inference attacks ($\text{S}^2\text{MIA-G}$), Vanilla RAG is wide open (Adversarial AUC of 0.823–0.985, where 0.5 is blind guessing). PD-RAG drops attacker advantage to near-random (0.511–0.515), matching or beating baselines.
  • Tighter Privacy, Better Utility: PD-RAG achieves this at a much stricter privacy budget ($\varepsilon \le 5.40, \delta = 5.1 \times 10^{-7}$) than token-level DPSparseVoteRAG ($\varepsilon = 50$) and keyword-level DP-KSA ($\varepsilon = 8, \delta = 10^{-5}$). Despite the tighter budget, PD-RAG wins on every utility metric across all datasets—improving ROUGE-L by 11–18% and Token F1 by 10–35% over the strongest private baseline.
  • Massive Speedups: On a single A100 GPU, PD-RAG takes 12s per query (just a $3\times$ overhead over Vanilla RAG's 4s), running 17× faster than DP-KSA (198s) and 33× faster than DPSparseVoteRAG (393s).

Limitations and Future Work

  • Requires Open-Weight Log-Probabilities: To score candidate answers across groups, PD-RAG needs token-level log-likelihoods for arbitrary prompt-answer pairs. That works out-of-the-box for open-weight models (Llama, Mistral), but most commercial black-box APIs (like GPT or Claude) don't expose this. Using a local surrogate model to approximate scores is a promising next step.
  • Fallback Rates: Depending on tuning, PD-RAG's privacy test can be conservative—in its headline configuration, only ~17–20% of queries pass the test (though retuning parameters at the same $\varepsilon \le 5.40$ budget boosts this to 34–70%). Tighter mathematical composition bounds could allow more retries without blowing the privacy budget.

Summary updated

Abstract

We introduce **PD-RAG**, a technique for retrieval-augmented generation (RAG) that leverages a language model's own randomness to safeguard privacy. The algorithm partitions documents into groups, generates a candidate answer from a randomly chosen group, and then uses a privacy test to enforce that the released answer could have been produced by multiple disjoint document groups, thereby ensuring a controllable degree of *plausible deniability*. Compared to existing methods that operate at the token level and therefore incur both substantial utility loss and growing privacy budget per generated token, PD-RAG operates at the answer level, so the privacy it offers does not loosen with output length. We prove that PD-RAG satisfies $(\varepsilon,\delta)$-differential privacy. We experimentally evaluate PD-RAG on three QA benchmarks using three language models and find that it reduces membership inference attack advantage to near random while consistently outperforming alternative methods on all four utility metrics we used and running between $17$ and $33{\times}$ faster.
BibTeX
@inproceedings{bao2026privacy,
  author = {Wenxuan Bao and Shan Jin and Vincent Bindschaedler and Yiwei Cai},
  title = {{Privacy-Preserving Retrieval-Augmented Generation with Plausible Deniability}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=fHPuHnOJfR},
}
Figure