Privacy Implications of Retrieval-Based Language Models
Not on the map. Why?
Abstract (arXiv)
Retrieval-based language models (LMs) have demonstrated improved interpretability, factuality, and adaptability compared to their parametric counterparts, by incorporating retrieved text from external datastores. While it is well known that parametric models are prone to leaking private data, it remains unclear how the addition of a retrieval datastore impacts model privacy. In this work, we present the first study of privacy risks in retrieval-based LMs, particularly kNN-LMs. Our goal is to explore the optimal design and training procedure in domains where privacy is of concern, aiming to strike a balance between utility and privacy. Crucially, we find that kNN-LMs are more susceptible to leaking private information from their private datastore than parametric models. We further explore mitigations of privacy risks. When privacy information is targeted and readily detected in the text, we find that a simple sanitization step would completely eliminate the risks, while decoupling query and key encoders achieves an even better utility-privacy trade-off. Otherwise, we consider strategies of mixing public and private data in both datastore and encoder training. While these methods offer modest improvements, they leave considerable room for future work. Together, our findings provide insights for practitioners to better understand and mitigate privacy risks in retrieval-based LMs. Our code is available at: https://github.com/Princeton-SysML/kNNLMprivacy .
Key facts. Cited by 32 papers in the map (data through 14 Oct 2026). Builds on 30 of its 51 references that are in the map. First posted on arXiv 24 May 2023.
Builds on
30 of 51 references.
References · 30
- 2016Pointer Sentinel Mixture Modelscited by 3,096
- 2016Deep Learning with Differential Privacycited by 2,728
- 2020Extracting Training Data from Large Language Modelscited by 2,189
- 2016Federated Learning: Strategies for Improving Communication Efficiencycited by 1,475
- 2021Improving language models by retrieving from trillions of tokenscited by 1,293
- 2018Hierarchical Neural Story Generationcited by 1,193
- 2022Atlas: Few-shot Learning with Retrieval Augmented Language Modelscited by 952
- 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 864
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 800
- 2023REPLUG: Retrieval-Augmented Black-Box Language Modelscited by 792
- 2022Quantifying Memorization Across Neural Language Modelscited by 763
- 2018Exploiting Unintended Feature Leakage in Collaborative Learningcited by 520
18 more
- 2021Large Language Models Can Be Strong Differentially Private Learnerscited by 412
- 2021Differentially Private Fine-tuning of Language Modelscited by 400
- 2022Are Large Pre-Trained Language Models Leaking Your Personal Information?cited by 200
- 2021Counterfactual Memorization in Neural Language Modelscited by 156
- 2022Training Language Models with Memory Augmentationcited by 113
- 2022Synthetic Text Generation with Differential Privacy: A Simple and Practical Recipecited by 108
- 2019Gmail Smart Compose: Real-Time Assisted Writingcited by 98
- 2021Does BERT Pretrained on Clinical Notes Reveal Sensitive Data?cited by 93
- 2021Efficient Nearest Neighbor Language Modelscited by 93
- 2022Recovering Private Text in Federated Learning of Language Modelscited by 70
- 2021TAG: Gradient Attack on Transformer-based Language Modelscited by 63
- 2021Selective Differential Privacy for Language Modelingcited by 62
- 2022LAMP: Extracting Text from Gradients with Language Model Priorscited by 54
- 2022Nonparametric Masked Language Modelingcited by 40
- 2020TextHide: Tackling Data Privacy in Language Understanding Taskscited by 33
- 2023Why do Nearest Neighbor Language Models Work?cited by 29
- 2023Advancing Differential Privacy: Where We Are Now and Future Directions for Real-World Deploymentcited by 27
- 2022Reasoning over Public and Private Data in Retrieval-Based Systemscited by 21
Built on by
Citing papers per year: 2023: 3; 2024: 14; 2025: 8; 2026: 7.
32 papers.
Sort:
By area:
- 2024MUSE: Machine Unlearning Six-Way Evaluation for Language Modelscited by 261
- 2024InstructRAG: Instructing Retrieval-Augmented Generation via Self-Synthesized Rationalescited by 101
- 2025MATH-Perturb: Benchmarking LLMs' Math Reasoning Abilities against Hard Perturbationscited by 89
- 2024Trustworthiness in Retrieval-Augmented Generation Systems: A Surveycited by 83
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systemscited by 76
- 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastorecited by 71
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directionscited by 51
- 2024A Safe Harbor for AI Evaluation and Red Teamingcited by 47
- 2024Privacy Preserving Prompt Engineering: A Surveycited by 25
- 2024Mind the Privacy Unit! User-Level Differential Privacy for Language Model Fine-Tuningcited by 24
- 2024AI Risk Management Should Incorporate Both Safety and Securitycited by 17
- 2025A False Sense of Privacy: Evaluating Textual Data Sanitization Beyond Surface-level Privacy Leakagecited by 16
20 more
- 2023On the Trustworthiness Landscape of State-of-the-art Generative Models: A Survey and Outlookcited by 15
- 2024Developing Story: Case Studies of Generative AI's Use in Journalismcited by 10
- 2025Attention is All You Need to Defend Against Indirect Prompt Injection Attacks in LLMscited by 10
- 2025Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generationcited by 8
- 2024Copyright-Protected Language Generation via Adaptive Model Fusioncited by 7
- 2026SoK: Privacy Risks and Mitigations in Retrieval-Augmented Generation Systemscited by 7
- 2025Automated Privacy Information Annotation in Large Language Model Interactionscited by 6
- 2024Strong Copyright Protection for Language Models via Adaptive Model Fusioncited by 4
- 2025SMA: Who Said That? Auditing Membership Leakage in Semi-Black-box RAG Controllingcited by 3
- 2024Initial Exploration of Zero-Shot Privacy Utility Tradeoffs in Tabular Data Using GPT-4cited by 2
- 2024Federated Domain-Specific Knowledge Transfer on Large Language Models Using Synthetic Datacited by 2
- 2025External Data Extraction Attacks against Retrieval-Augmented Large Language Modelscited by 2
- 2025Diverse And Private Synthetic Datasets Generation for RAG evaluation: A multi-agent frameworkcited by 1
- 2026Towards Privacy-Preserving Machine Translation at the Inference Stage: A New Task and Benchmarkcited by 1
- 2024A Survey on the Real Power of ChatGPTcited by 0
- 2026A Case Study on the Impact of Anonymization Along the RAG Pipelinecited by 0
- 2026PRAG: End-to-End Privacy-Preserving Retrieval-Augmented Generationcited by 0
- 2026PYTHALAB-MERA: Validation-Grounded Memory, Retrieval, and Acceptance Control for Frozen-LLM Coding Agentscited by 0
- 2026Privacy-Preserving RAG via Multi-Agent Semantic Rewriting: Achieving Confidentiality Without Compromising Contextual Fidelitycited by 0
- 2026Is External Database Protection Static in Retrieval-Augmented Generation? Rethinking Privacy Preservation under Dynamic Queriescited by 0
- 2026Is External Database Protection Static in Retrieval-Augmented Generation? Rethinking Privacy Preservation under Dynamic Queries16 Jul 2026
- 2026Privacy-Preserving RAG via Multi-Agent Semantic Rewriting: Achieving Confidentiality Without Compromising Contextual Fidelity23 Jun 2026
- 2026PYTHALAB-MERA: Validation-Grounded Memory, Retrieval, and Acceptance Control for Frozen-LLM Coding Agents8 May 2026
- 2026PRAG: End-to-End Privacy-Preserving Retrieval-Augmented Generation29 Apr 2026
- 2026A Case Study on the Impact of Anonymization Along the RAG Pipeline17 Apr 2026
- 2026Towards Privacy-Preserving Machine Translation at the Inference Stage: A New Task and Benchmark16 Mar 2026
- 2026SoK: Privacy Risks and Mitigations in Retrieval-Augmented Generation Systems7 Jan 2026
- 2025Attention is All You Need to Defend Against Indirect Prompt Injection Attacks in LLMs9 Dec 2025
- 2025External Data Extraction Attacks against Retrieval-Augmented Large Language Models3 Oct 2025
- 2025Diverse And Private Synthetic Datasets Generation for RAG evaluation: A multi-agent framework26 Aug 2025
- 2025SMA: Who Said That? Auditing Membership Leakage in Semi-Black-box RAG Controlling12 Aug 2025
- 2025Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generation5 Aug 2025
20 more
- 2025Automated Privacy Information Annotation in Large Language Model Interactions27 May 2025
- 2025A False Sense of Privacy: Evaluating Textual Data Sanitization Beyond Surface-level Privacy Leakage28 Apr 2025
- 2025MATH-Perturb: Benchmarking LLMs' Math Reasoning Abilities against Hard Perturbations10 Feb 2025
- 2024Copyright-Protected Language Generation via Adaptive Model Fusion9 Dec 2024
- 2024Trustworthiness in Retrieval-Augmented Generation Systems: A Survey16 Sep 2024
- 2024Strong Copyright Protection for Language Models via Adaptive Model Fusion29 Jul 2024
- 2024MUSE: Machine Unlearning Six-Way Evaluation for Language Models8 Jul 2024
- 2024Mind the Privacy Unit! User-Level Differential Privacy for Language Model Fine-Tuning20 Jun 2024
- 2024Developing Story: Case Studies of Generative AI's Use in Journalism19 Jun 2024
- 2024InstructRAG: Instructing Retrieval-Augmented Generation via Self-Synthesized Rationales19 Jun 2024
- 2024AI Risk Management Should Incorporate Both Safety and Security29 May 2024
- 2024Federated Domain-Specific Knowledge Transfer on Large Language Models Using Synthetic Data23 May 2024
- 2024A Survey on the Real Power of ChatGPT22 Apr 2024
- 2024Privacy Preserving Prompt Engineering: A Survey9 Apr 2024
- 2024Initial Exploration of Zero-Shot Privacy Utility Tradeoffs in Tabular Data Using GPT-47 Apr 2024
- 2024A Safe Harbor for AI Evaluation and Red Teaming7 Mar 2024
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systems27 Feb 2024
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directions16 Oct 2023
- 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastore8 Aug 2023
- 2023On the Trustworthiness Landscape of State-of-the-art Generative Models: A Survey and Outlook31 Jul 2023
- 2024InstructRAG: Instructing Retrieval-Augmented Generation via Self-Synthesized Rationalescited by 101
- 2024Trustworthiness in Retrieval-Augmented Generation Systems: A Surveycited by 83
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systemscited by 76
- 2025Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generationcited by 8
- 2026SoK: Privacy Risks and Mitigations in Retrieval-Augmented Generation Systemscited by 7
- 2025SMA: Who Said That? Auditing Membership Leakage in Semi-Black-box RAG Controllingcited by 3
- 2025External Data Extraction Attacks against Retrieval-Augmented Large Language Modelscited by 2
- 2025Diverse And Private Synthetic Datasets Generation for RAG evaluation: A multi-agent frameworkcited by 1
- 2026A Case Study on the Impact of Anonymization Along the RAG Pipelinecited by 0
- 2026PRAG: End-to-End Privacy-Preserving Retrieval-Augmented Generationcited by 0
- 2026Privacy-Preserving RAG via Multi-Agent Semantic Rewriting: Achieving Confidentiality Without Compromising Contextual Fidelitycited by 0
- 2026Is External Database Protection Static in Retrieval-Augmented Generation? Rethinking Privacy Preservation under Dynamic Queriescited by 0
- 2026Is External Database Protection Static in Retrieval-Augmented Generation? Rethinking Privacy Preservation under Dynamic Queries16 Jul 2026
- 2026Privacy-Preserving RAG via Multi-Agent Semantic Rewriting: Achieving Confidentiality Without Compromising Contextual Fidelity23 Jun 2026
- 2026PRAG: End-to-End Privacy-Preserving Retrieval-Augmented Generation29 Apr 2026
- 2026A Case Study on the Impact of Anonymization Along the RAG Pipeline17 Apr 2026
- 2026SoK: Privacy Risks and Mitigations in Retrieval-Augmented Generation Systems7 Jan 2026
- 2025External Data Extraction Attacks against Retrieval-Augmented Large Language Models3 Oct 2025
- 2025Diverse And Private Synthetic Datasets Generation for RAG evaluation: A multi-agent framework26 Aug 2025
- 2025SMA: Who Said That? Auditing Membership Leakage in Semi-Black-box RAG Controlling12 Aug 2025
- 2025Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generation5 Aug 2025
- 2024Trustworthiness in Retrieval-Augmented Generation Systems: A Survey16 Sep 2024
- 2024InstructRAG: Instructing Retrieval-Augmented Generation via Self-Synthesized Rationales19 Jun 2024
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systems27 Feb 2024
- 2024MUSE: Machine Unlearning Six-Way Evaluation for Language Modelscited by 261
- 2024A Safe Harbor for AI Evaluation and Red Teamingcited by 47
- 2024MUSE: Machine Unlearning Six-Way Evaluation for Language Models8 Jul 2024
- 2024A Safe Harbor for AI Evaluation and Red Teaming7 Mar 2024
- 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastorecited by 71
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directionscited by 51
- 2024Privacy Preserving Prompt Engineering: A Surveycited by 25
- 2024Mind the Privacy Unit! User-Level Differential Privacy for Language Model Fine-Tuningcited by 24
- 2024AI Risk Management Should Incorporate Both Safety and Securitycited by 17
- 2025A False Sense of Privacy: Evaluating Textual Data Sanitization Beyond Surface-level Privacy Leakagecited by 16
- 2024Developing Story: Case Studies of Generative AI's Use in Journalismcited by 10
- 2024Copyright-Protected Language Generation via Adaptive Model Fusioncited by 7
- 2025Automated Privacy Information Annotation in Large Language Model Interactionscited by 6
- 2024Strong Copyright Protection for Language Models via Adaptive Model Fusioncited by 4
- 2024Initial Exploration of Zero-Shot Privacy Utility Tradeoffs in Tabular Data Using GPT-4cited by 2
- 2026Towards Privacy-Preserving Machine Translation at the Inference Stage: A New Task and Benchmarkcited by 1
12 most cited of 13 All 13 (JSON)
- 2026Towards Privacy-Preserving Machine Translation at the Inference Stage: A New Task and Benchmark16 Mar 2026
- 2025Automated Privacy Information Annotation in Large Language Model Interactions27 May 2025
- 2025A False Sense of Privacy: Evaluating Textual Data Sanitization Beyond Surface-level Privacy Leakage28 Apr 2025
- 2024Copyright-Protected Language Generation via Adaptive Model Fusion9 Dec 2024
- 2024Strong Copyright Protection for Language Models via Adaptive Model Fusion29 Jul 2024
- 2024Mind the Privacy Unit! User-Level Differential Privacy for Language Model Fine-Tuning20 Jun 2024
- 2024Developing Story: Case Studies of Generative AI's Use in Journalism19 Jun 2024
- 2024AI Risk Management Should Incorporate Both Safety and Security29 May 2024
- 2024A Survey on the Real Power of ChatGPT22 Apr 2024
- 2024Privacy Preserving Prompt Engineering: A Survey9 Apr 2024
- 2024Initial Exploration of Zero-Shot Privacy Utility Tradeoffs in Tabular Data Using GPT-47 Apr 2024
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directions16 Oct 2023
12 newest of 13 All 13 (JSON)