Privacy-Preserving Retrieval-Augmented Generation with Differential Privacy

Tatsuki Koga, Ruihan Wu, Zhiyuan Zhang, Kamalika Chaudhuri
12/6/2024
cs.CRcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

With the recent remarkable advancement of large language models (LLMs), there has been a growing interest in utilizing them in the domains with highly sensitive data that lies outside their training data. For this purpose, retrieval-augmented generation (RAG) is particularly effective -- it assists LLMs by directly providing relevant information from the external knowledge sources. However, without extra privacy safeguards, RAG outputs risk leaking sensitive information from the external data source. In this work, we explore RAG under differential privacy (DP), a formal guarantee of data privacy. The main challenge with differentially private RAG is how to generate long accurate answers within a moderate privacy budget. We address this by proposing an algorithm that smartly spends privacy budget only for the tokens that require the sensitive information and uses the non-private LLM for other tokens. Our extensive empirical evaluations reveal that our algorithm outperforms the non-RAG baseline under a reasonable privacy budget of $ε\approx 10$ across different models and datasets.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{koga2024privacypreserving,
  title  = {Privacy-Preserving Retrieval-Augmented Generation with Differential Privacy},
  author = {Tatsuki Koga and Ruihan Wu and Zhiyuan Zhang and Kamalika Chaudhuri},
  year   = {2024},
  eprint = {2412.04697},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.04697v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.04697.svg)](https://codeofpaper.com/paper/2412.04697)

Discussion