Lune

ICLR2024Top-tier venue

Privacy-Preserving In-Context Learning with Differentially Private Few-Shot Generation

Xinyu Tang, Richard Shin, Huseyin A. Inan, Andre Manoel, Fatemehsadat Mireshghallah, Zinan Lin, Sivakanth Gopi, Janardhan Kulkarni, Robert Sim

Abstract

We study the problem of in-context learning (ICL) with large language models (LLMs) on private datasets. This scenario poses privacy risks, as LLMs may leak or regurgitate the private examples demonstrated in the prompt. We propose a novel algorithm that generates synthetic few-shot demonstrations from the private dataset with formal differential privacy (DP) guarantees, and show empirically that it can achieve effective ICL. We conduct extensive experiments on standard benchmarks and compare our algorithm with non-private ICL and zero-shot solutions. Our results demonstrate that our algorithm can achieve competitive performance with strong privacy levels. These results open up new possibilities for ICL with privacy protection for a broad range of applications. * This work was carried out as part of an internship at Microsoft Research. 1 As also observed in a real-world system built on an LLM: see https://tinyurl.com/nhzadhuz .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

38 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

No credit card required.

Lineage

  • Privacy-Preserving In-Context Learning for Large Language Models cites Language Models are Few-Shot Learners
  • Privacy-Preserving In-Context Learning for Large Language Models cites Deep Learning with Differential Privacy
  • Membership Inference Attacks Against Machine Learning Models cites Deep Learning with Differential Privacy
  • Differentially Private Synthetic Data via Foundation Model APIs 1: Images cites Language Models are Few-Shot Learners
  • Differentially Private Synthetic Data via Foundation Model APIs 1: Images cites Deep Learning with Differential Privacy
  • DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineer cites Privacy-Preserving In-Context Learning for Large Language Models
  • DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineer cites Membership Inference Attacks Against Machine Learning Models
  • DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineer cites Language Models are Few-Shot Learners
  • DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineer cites Deep Learning with Differential Privacy
  • Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
  • Privacy-Preserving Instructions for Aligning Large Language Models cites Privacy-Preserving In-Context Learning for Large Language Models
  • Privacy-Preserving Instructions for Aligning Large Language Models cites Differentially Private Synthetic Data via Foundation Model APIs 1: Images
  • Privacy-Preserving Instructions for Aligning Large Language Models cites DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt Engineer
  • Privacy-Preserving Instructions for Aligning Large Language Models cites Language Models are Few-Shot Learners
  • Privacy-Preserving Instructions for Aligning Large Language Models cites Deep Learning with Differential Privacy
  • Privacy-Preserving Instructions for Aligning Large Language Models cites The Curious Case of Neural Text Degeneration
  • Can LLMs Keep a Secret? Testing Privacy Implications of Language Models via Contextual Integrity Theory cites Deep Learning with Differential Privacy
  • Can LLMs Keep a Secret? Testing Privacy Implications of Language Models via Contextual Integrity Theory cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papersTop 5 of 38 by citations

  1. Can LLMs Keep a Secret? Testing Privacy Implications of Language Models via Contextual Integrity TheoryNiloofar Mireshghallah, Hyunwoo Kim, Xuhui Zhou, Yulia Tsvetkov et al.ICLR 2024 · 198 citations
  2. DP-OPT: Make Large Language Model Your Privacy-Preserving Prompt EngineerJunyuan Hong, Jiachen T. Wang, Chenhui Zhang, Zhangheng Li et al.ICLR 2024 · 70 citations
  3. Differentially Private Synthetic Data via Foundation Model APIs 1: ImagesZinan Lin, Sivakanth Gopi, Janardhan Kulkarni, Harsha Nori et al.ICLR 2024 · 63 citations
  4. Privacy-Preserving In-Context Learning for Large Language ModelsTong Wu, Ashwinee Panda, Jiachen T. Wang, Prateek MittalICLR 2024 · 58 citations
  5. Privacy-Preserving Instructions for Aligning Large Language ModelsDa Yu, Peter Kairouz, Sewoong Oh, Zheng XuICML 2024 · 41 citations

Builds onTop 5 of 20 by citations

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. Deep Learning with Differential PrivacyMartín Abadi, Andy Chu, Ian J. Goodfellow, H. Brendan McMahan et al.CCS 2016 · 7,620 citations
  4. Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 citations
  5. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations

Related papers

  1. Data-adaptive Differentially Private Prompt Synthesis for In-Context LearningFengyu Gao, Ruida Zhou, Tianhao Wang, Cong Shen et al.ICLR 2025
  2. Public Data Assisted Differentially Private In-Context LearningSeongho Joo, Hyukhun Koh, Kyomin JungEMNLP Findings 2025
  3. Privacy Preserving In-Context-Learning Framework for Large Language ModelsBishnu Bhusal, Manoj Acharya, Ramneet Kaur, Colin Samplawski et al.AAAI 2026 · 1 citation
  4. Plausible Token Amplification for Improving Accuracy of Differentially Private In-Context Learning Based on Implicit Bayesian InferenceYusuke Yamasaki, Kenta Niwa, Daiki Chijiwa, Takumi Fukami et al.ICML 2025
  5. Private prediction for large-scale synthetic text generationKareem Amin, Alex Bie, Weiwei Kong, Alexey Kurakin et al.EMNLP Findings 2024 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines