mlsanityData to 7 Oct 2026

Protecting Private Code in IDE Autocomplete using Differential Privacy

arXiv 2601.22935 ↗First posted 30 Jan 2026cs.CR cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Modern Integrated Development Environments (IDEs) increasingly leverage Large Language Models (LLMs) to provide advanced features like code autocomplete. While powerful, training these models on user-written code introduces significant privacy risks, making the models themselves a new type of data vulnerability. Malicious actors can exploit this by launching attacks to reconstruct sensitive training data or infer whether a specific code snippet was used for training. This paper investigates the use of Differential Privacy (DP) as a robust defense mechanism for training an LLM for Kotlin code completion. We fine-tune a textttMellum model using DP and conduct a comprehensive evaluation of its privacy and utility. Our results demonstrate that DP provides a strong defense against Membership Inference Attacks (MIAs), reducing the attack's success rate close to a random guess (AUC from 0.901 to 0.606). Furthermore, we show that this privacy guarantee comes at a minimal cost to model performance, with the DP-trained model achieving utility scores comparable to its non-private counterpart, even when trained on 100x less data. Our findings suggest that DP is a practical and effective solution for building private and trustworthy AI-powered IDE features.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 24 of its 46 references that are in the map. First posted on arXiv 30 Jan 2026.

Builds on

24 of 46 references.

References · 24

  1. 2017Attention Is All You Needcited by 59,932
  2. 2016Deep Learning with Differential Privacycited by 2,682
  3. 2020Learning to summarize from human feedbackcited by 2,562
  4. 2020Extracting Training Data from Large Language Modelscited by 2,144
  5. 2018ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Modelscited by 475
  6. 2021Large Language Models Can Be Strong Differentially Private Learnerscited by 405
  7. 2021Differentially Private Fine-tuning of Language Modelscited by 392
  8. 2021Opacus: User-Friendly Differential Privacy Library in PyTorchcited by 375
  9. 2021Membership Inference Attacks on Machine Learning: A Surveycited by 306
  10. 2023Analyzing Leakage of Personally Identifiable Information in Language Modelscited by 278
  11. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  12. 2023Emergent and Predictable Memorization in Large Language Modelscited by 147
12 more
  1. 2022Reconstructing Training Data with Informed Adversariescited by 143
  2. 2022Productivity Assessment of Neural Code Completioncited by 97
  3. 2023Practical Membership Inference Attacks against Fine-tuned Large Language Models via Self-prompt Calibrationcited by 90
  4. 2023Differentially Private Diffusion Models Generate Useful Synthetic Imagescited by 85
  5. 2023Flocks of Stochastic Parrots: Differentially Private Prompt Learning for Large Language Modelscited by 80
  6. 2024Private prediction for large-scale synthetic text generationcited by 24
  7. 2025Scaling Laws for Differentially Private Language Modelscited by 22
  8. 2023Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded Credentialscited by 17
  9. 2023Privately Aligning Language Models with Reinforcement Learningcited by 17
  10. 2023Unlocking Accuracy and Fairness in Differentially Private Image Classificationcited by 16
  11. 2024Security Attacks on LLM-based Code Completion Toolscited by 15
  12. 2023Bounding data reconstruction attacks with the hypothesis testing interpretation of differential privacycited by 14

Built on by

Not cited yet.