Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generation
On the map: Retrieval-augmented generation → Privacy and security of RAG
Abstract (arXiv)
Retrieval-Augmented Generation (RAG) enhances the factual accuracy of large language models (LLMs) by conditioning outputs on external knowledge sources. However, when retrieval involves private or sensitive data, RAG systems are susceptible to extraction attacks that can leak confidential information through generated responses. We propose Privacy-Aware Decoding (PAD), a lightweight, inference-time defense that adaptively injects calibrated Gaussian noise into token logits during generation. PAD integrates confidence-based screening to selectively protect high-risk tokens, efficient sensitivity estimation to minimize unnecessary noise, and context-aware noise calibration to balance privacy with generation quality. A renyi Differential Privacy (RDP) accountant rigorously tracks cumulative privacy loss, enabling explicit per-response (varepsilon, δ)-DP guarantees for sensitive outputs. Unlike prior approaches requiring retraining or corpus-level filtering, PAD is model-agnostic and operates entirely at decoding time with minimal computational overhead. Experiments on three real-world datasets demonstrate that PAD substantially reduces private information leakage while preserving response utility, outperforming existing retrieval- and post-processing-based defenses. Our work takes an important step toward mitigating privacy risks in RAG via decoding strategies, paving the way for universal and scalable privacy solutions in sensitive domains. Our code is available: https://github.com/wang2226/PAD.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 36 of its 47 references that are in the map. First posted on arXiv 5 Aug 2025.
Builds on
36 of 47 references.
Closest ancestors · 6
Same direction, newest first
- 2024RAG with Differential Privacy26 Dec
- 2024Privacy-Preserving Retrieval-Augmented Generation with Differential Privacy6 Dec
- 2024Data Extraction Attacks in Retrieval-Augmented Generation via Backdoors3 Nov
- 2024Mitigating the Privacy Issues in Retrieval-Augmented Generation (RAG) via Pure Synthetic Data20 Jun
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systems27 Feb
- 2024The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)23 Feb
Other references · 30
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2016Deep Learning with Differential Privacycited by 2,682
- 2020Extracting Training Data from Large Language Modelscited by 2,144
- 2023Mitigating Object Hallucinations in Large Vision-Language Models through Visual Contrastive Decodingcited by 671
- 2017Renyi Differential Privacycited by 643
- 2021Large Language Models Can Be Strong Differentially Private Learnerscited by 405
- 2021Differentially Private Fine-tuning of Language Modelscited by 392
- 2024Benchmarking Retrieval-Augmented Generation for Medicinecited by 326
- 2023ChatDoctor: A Medical Chat Model Fine-Tuned on a Large Language Model Meta-AI (LLaMA) Using Medical Domain Knowledgecited by 324
- 2023Multi-step Jailbreaking Privacy Attacks on ChatGPTcited by 320
- 2023Trusting Your Evidence: Hallucinate Less with Context-aware Decodingcited by 319
- 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decodingcited by 233
18 more
- 2019R'enyi Differential Privacy of the Sampled Gaussian Mechanismcited by 199
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2024From Decoding to Meta-Generation: Inference-time Algorithms for Large Language Modelscited by 136
- 2024A Thorough Examination of Decoding Methods in the Era of LLMscited by 112
- 2025Unveiling Privacy Risks in LLM Agent Memorycited by 99
- 2022On Decoding Strategies for Neural Text Generatorscited by 89
- 2021Selective Differential Privacy for Language Modelingcited by 61
- 2024Controllable Text Generation for Large Language Models: A Surveycited by 55
- 2024UNDIAL: Self-Distillation with Adjusted Logits for Robust Unlearning in Large Language Modelscited by 49
- 2024Measuring memorization in language models via probabilistic extractioncited by 40
- 2025On the Trustworthiness of Generative Foundation Models: Guideline, Assessment, and Perspectivecited by 39
- 2024ROSE Doesn't Do That: Boosting the Safety of Instruction-Tuned Large Language Models with Reverse Prompt Contrastive Decodingcited by 32
- 2023Privacy Implications of Retrieval-Based Language Modelscited by 31
- 2024Privacy Preserving Prompt Engineering: A Surveycited by 24
- 2024SafeInfer: Context Adaptive Decoding Time Safety Alignment for Large Language Modelscited by 22
- 2024Differentially Private Next-Token Prediction of Large Language Modelscited by 21
- 2024Improving Factuality in Large Language Models via Decoding-Time Hallucinatory and Truthful Comparatorscited by 19
- 2024Controlled Text Generation for Large Language Model with Dynamic Attribute Graphscited by 16
Built on by
Citing papers per year: 2025: 2; 2026: 6.
8 papers.
- 2025RAG Security and Privacy: Formalizing the Threat Model and Attack Surfacecited by 8
- 2026Chain-of-Sanitized-Thoughts: Plugging PII Leakage in CoT of Large Reasoning Modelscited by 5
- 2026Towards Secure Retrieval-Augmented Generation: A Comprehensive Review of Threats, Defenses and Benchmarkscited by 3
- 2025Privacy Challenges and Solutions in Retrieval-Augmented Generation-Enhanced LLMs for Healthcare Chatbots: A Review of Applications, Risks, and Future Directionscited by 2
- 2026Do LLMs Know What Is Private Internally? Probing and Steering Contextual Privacy Norms in Large Language Model Representationscited by 2
- 2026Graphs Don't Stay Secret: Practical Subgraph Reconstruction Attacks on Defended Graph RAGcited by 0
- 2026Is External Database Protection Static in Retrieval-Augmented Generation? Rethinking Privacy Preservation under Dynamic Queriescited by 0
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Modelscited by 0
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Models14 Aug 2026
- 2026Is External Database Protection Static in Retrieval-Augmented Generation? Rethinking Privacy Preservation under Dynamic Queries16 Jul 2026
- 2026Do LLMs Know What Is Private Internally? Probing and Steering Contextual Privacy Norms in Large Language Model Representations31 Mar 2026
- 2026Towards Secure Retrieval-Augmented Generation: A Comprehensive Review of Threats, Defenses and Benchmarks23 Mar 2026
- 2026Graphs Don't Stay Secret: Practical Subgraph Reconstruction Attacks on Defended Graph RAG6 Feb 2026
- 2026Chain-of-Sanitized-Thoughts: Plugging PII Leakage in CoT of Large Reasoning Models8 Jan 2026
- 2025Privacy Challenges and Solutions in Retrieval-Augmented Generation-Enhanced LLMs for Healthcare Chatbots: A Review of Applications, Risks, and Future Directions14 Nov 2025
- 2025RAG Security and Privacy: Formalizing the Threat Model and Attack Surface24 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2025Fine-Grained Privacy Extraction from Retrieval-Augmented Generation Systems via Knowledge Asymmetry Exploitation
- 2026PRAG: End-to-End Privacy-Preserving Retrieval-Augmented Generation
- 2026Security and Privacy in Retrieval-Augmented Generation: Architectures, Threats, Defenses, and Future Directions for Building Trustworthy Systems
- 2023InferDPT: Privacy-Preserving Inference for Closed-box Large Language Model
- 2025Private-RAG: Answering Multiple Queries with LLMs while Keeping Your Data Private
- 2026SD-RAG: A Prompt-Injection-Resilient Framework for Selective Disclosure in Retrieval-Augmented Generation
- 2026SoK: Privacy Risks and Mitigations in Retrieval-Augmented Generation Systems
- 2026Learning to Refer: Client-Resolved Generation for Privacy-Aware Language Models