Protecting Private Code in IDE Autocomplete using Differential Privacy

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Grigorenko, Evgeny, Stanojević, David, Ilić, David, Bogomolov, Egor, Cvejoski, Kostadin
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866918315723587584
author Grigorenko, Evgeny
Stanojević, David
Ilić, David
Bogomolov, Egor
Cvejoski, Kostadin
author_facet Grigorenko, Evgeny
Stanojević, David
Ilić, David
Bogomolov, Egor
Cvejoski, Kostadin
contents 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 \texttt{Mellum} 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.
format Preprint
id arxiv_https___arxiv_org_abs_2601_22935
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Protecting Private Code in IDE Autocomplete using Differential Privacy
Grigorenko, Evgeny
Stanojević, David
Ilić, David
Bogomolov, Egor
Cvejoski, Kostadin
Cryptography and Security
Artificial Intelligence
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 \texttt{Mellum} 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.
title Protecting Private Code in IDE Autocomplete using Differential Privacy
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2601.22935