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.


翻译:现代集成开发环境(IDE)日益依赖大型语言模型(LLMs)来提供代码自动补全等高级功能。尽管功能强大,但基于用户编写代码训练这些模型会带来显著的隐私风险,使模型本身成为一种新型数据漏洞。恶意攻击者可通过发起攻击来重构敏感训练数据,或推断特定代码片段是否被用于训练,从而利用此漏洞。本文研究了差分隐私(DP)作为一种鲁棒防御机制,用于训练Kotlin代码补全的LLM。我们使用DP对\texttt{Mellum}模型进行微调,并对其隐私性和实用性进行全面评估。结果表明,DP能有效防御成员推理攻击(MIAs),将攻击成功率降至接近随机猜测水平(AUC从0.901降至0.606)。此外,我们证明这种隐私保障对模型性能影响极小:即使在训练数据量减少100倍的情况下,DP训练模型的实用性得分仍与非隐私模型相当。我们的研究结果表明,DP是构建私密且可信的AI驱动IDE功能的实用且有效的解决方案。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
综述:面向移动端大语言模型的隐私与安全
专知会员服务
19+阅读 · 2025年9月7日
【ICLR2025】用于大型语言模型对齐的差分隐私引导
专知会员服务
9+阅读 · 2025年1月31日
【新书】大规模语言模型的隐私与安全,
专知会员服务
29+阅读 · 2024年12月4日
大型语言模型代理的安全与隐私综述
专知会员服务
29+阅读 · 2024年8月5日
大语言模型中的提示隐私保护
专知会员服务
24+阅读 · 2024年7月24日
《大型语言模型代码生成》综述
专知会员服务
68+阅读 · 2024年6月4日
通信网络中大型语言模型的后门攻击的综述
专知会员服务
30+阅读 · 2023年9月5日
赛尔笔记 | 条件变分自编码器(CVAE)
AINLP
28+阅读 · 2019年11月8日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
iOS如何区分App和SDK内部crash
CocoaChina
11+阅读 · 2019年4月17日
差分隐私保护:从入门到脱坑
FreeBuf
17+阅读 · 2018年9月10日
【干货】深入理解自编码器(附代码实现)
【干货】一文读懂什么是变分自编码器
专知
12+阅读 · 2018年2月11日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 1月28日
VIP会员
相关VIP内容
综述:面向移动端大语言模型的隐私与安全
专知会员服务
19+阅读 · 2025年9月7日
【ICLR2025】用于大型语言模型对齐的差分隐私引导
专知会员服务
9+阅读 · 2025年1月31日
【新书】大规模语言模型的隐私与安全,
专知会员服务
29+阅读 · 2024年12月4日
大型语言模型代理的安全与隐私综述
专知会员服务
29+阅读 · 2024年8月5日
大语言模型中的提示隐私保护
专知会员服务
24+阅读 · 2024年7月24日
《大型语言模型代码生成》综述
专知会员服务
68+阅读 · 2024年6月4日
通信网络中大型语言模型的后门攻击的综述
专知会员服务
30+阅读 · 2023年9月5日
相关资讯
赛尔笔记 | 条件变分自编码器(CVAE)
AINLP
28+阅读 · 2019年11月8日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
iOS如何区分App和SDK内部crash
CocoaChina
11+阅读 · 2019年4月17日
差分隐私保护:从入门到脱坑
FreeBuf
17+阅读 · 2018年9月10日
【干货】深入理解自编码器(附代码实现)
【干货】一文读懂什么是变分自编码器
专知
12+阅读 · 2018年2月11日
相关基金
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员