Differentially Private In-Context Learning with Nearest Neighbor Search
Not on the map. Why?
Abstract (arXiv)
Differentially private in-context learning (DP-ICL) has recently become an active research topic due to the inherent privacy risks of in-context learning. However, existing approaches overlook a critical component of modern large language model (LLM) pipelines: the similarity search used to retrieve relevant context data. In this work, we introduce a DP framework for in-context learning that integrates nearest neighbor search of relevant examples in a privacy-aware manner. Our method outperforms existing baselines by a substantial margin across all evaluated benchmarks, achieving more favorable privacy-utility trade-offs. To achieve this, we employ nearest neighbor retrieval from a database of context data, combined with a privacy filter that tracks the cumulative privacy cost of selected samples to ensure adherence to a central differential privacy budget. Experimental results on text classification and document question answering show a clear advantage of the proposed method over existing baselines.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 39 of its 48 references that are in the map. First posted on arXiv 6 Nov 2025.
Builds on
39 of 48 references.
References · 39
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2019How Can We Know What Language Models Know?cited by 953
- 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 847
- 2022Quantifying Memorization Across Neural Language Modelscited by 755
- 2017Renyi Differential Privacycited by 643
- 2021Large Language Models Can Be Strong Differentially Private Learnerscited by 405
27 more
- 2021Differentially Private Fine-tuning of Language Modelscited by 392
- 2016Concentrated Differential Privacy: Simplifications, Extensions, and Lower Boundscited by 339
- 2018Scalable Private Learning with PATEcited by 266
- 2018Improving the Gaussian Mechanism for Differential Privacy: Analytical Calibration and Optimal Denoisingcited by 216
- 2019Commonsense Knowledge Mining from Pretrained Modelscited by 189
- 2022In-context Examples Selection for Machine Translationcited by 172
- 2021Counterfactual Memorization in Neural Language Modelscited by 155
- 2021Hyperparameter Tuning with Renyi Differential Privacycited by 104
- 2022Preventing Verbatim Memorization in Language Models Gives a False Sense of Privacycited by 97
- 2023Privacy-Preserving In-Context Learning with Differentially Private Few-Shot Generationcited by 94
- 2023Flocks of Stochastic Parrots: Differentially Private Prompt Learning for Large Language Modelscited by 80
- 2020Individual Privacy Accounting via a Renyi Filtercited by 57
- 2023Privacy-Preserving In-Context Learning for Large Language Modelscited by 50
- 2018Privacy-preserving Predictioncited by 48
- 2024Membership Inference Attacks Against In-Context Learningcited by 38
- 2024Privacy-Preserving Retrieval-Augmented Generation with Differential Privacycited by 38
- 2024On the Privacy Risk of In-context Learningcited by 31
- 2024Private prediction for large-scale synthetic text generationcited by 24
- 2022Fully Adaptive Composition in Differential Privacycited by 22
- 2021Locally Private k-Means in One Roundcited by 19
- 2022Manu: A Cloud Native Vector Database Management Systemcited by 18
- 2024Data-adaptive Differentially Private Prompt Synthesis for In-Context Learningcited by 10
- 2022A Joint Exponential Mechanism For Differentially Private Top-kcited by 9
- 2022Adaptive Private-K-Selection with Adaptive K and Application to Multi-label PATEcited by 9
- 2023"Private Prediction Strikes Back!'' Private Kernelized Nearest Neighbors with Individual Renyi Filtercited by 5
- 2024NeurIPS 2023 Competition: Privacy Preserving Federated Learning Document VQAcited by 2
- 2024Faster Differentially Private Top-k Selection: A Joint Exponential Mechanism with Pruningcited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.