Large language models fine-tuned on instruction-code pairs may memorize and subsequently leak sensitive training data. Existing differentially private (DP) code generation methods primarily protect code snippets while assuming prompts are public, which fails in realistic scenarios where prompts may also contain sensitive information. When prompts cannot be explicitly learned or used during generation, code synthesis suffers from severe utility degradation as well as reduced diversity and fidelity. To address these challenges, we propose PrivCode-Plus, the first work to explore DP code generation where both prompts and code snippets are considered sensitive in LLM fine-tuning. PrivCode-Plus introduces a two-stage DP framework with a Privacy-Free Latent Conditioning module, enabling effective DP fine-tuning and data synthesis without direct access to sensitive prompts or code. Extensive experiments show that PrivCode-Plus achieves substantially higher utility than baselines, remains competitive with the method with relaxing privacy assumptions, and provides stronger privacy guarantees.


翻译:大语言模型在指令-代码对上进行微调时,可能会记忆并随后泄露敏感的训练数据。现有的差分隐私(DP)代码生成方法主要保护代码片段,同时假设提示是公开的,但在提示也可能包含敏感信息的现实场景中,这种方法难以奏效。当提示在生成过程中无法被显式学习或使用时,代码合成会遭受严重的效用退化,以及多样性和保真度的降低。为应对这些挑战,我们提出PrivCode-Plus,这是首个探索在LLM微调中同时将提示和代码片段视为敏感的DP代码生成工作。PrivCode-Plus引入了一个两阶段DP框架,并配备了一个无隐私风险潜在条件化模块,从而能够在无需直接访问敏感提示或代码的情况下,实现有效的DP微调和数据合成。大量实验表明,PrivCode-Plus 在效用上显著优于基线方法,与放宽隐私假设的方法相比具有竞争力,并提供了更强的隐私保障。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
差分隐私全指南:从理论基础到用户期望
专知会员服务
13+阅读 · 2025年9月8日
大语言模型中的提示隐私保护
专知会员服务
24+阅读 · 2024年7月24日
【斯坦福博士论文】有效的差分隐私深度学习,153页pdf
专知会员服务
19+阅读 · 2024年7月10日
【NeurIPS2023】稀疏保留的差分隐私大型嵌入模型训练
专知会员服务
15+阅读 · 2023年11月18日
专知会员服务
14+阅读 · 2021年9月14日
专知会员服务
41+阅读 · 2020年12月1日
赛尔笔记 | 条件变分自编码器(CVAE)
AINLP
28+阅读 · 2019年11月8日
差分隐私保护:从入门到脱坑
FreeBuf
17+阅读 · 2018年9月10日
【干货】深入理解变分自编码器
专知
21+阅读 · 2018年3月22日
【干货】一文读懂什么是变分自编码器
专知
12+阅读 · 2018年2月11日
综述——隐私保护集合交集计算技术研究
计算机研究与发展
22+阅读 · 2017年10月24日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Arxiv
0+阅读 · 5月10日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
1+阅读 · 52分钟前
定向能反无人机系统最新发展动态
专知会员服务
3+阅读 · 今天13:50
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
2+阅读 · 今天13:33
相关VIP内容
差分隐私全指南:从理论基础到用户期望
专知会员服务
13+阅读 · 2025年9月8日
大语言模型中的提示隐私保护
专知会员服务
24+阅读 · 2024年7月24日
【斯坦福博士论文】有效的差分隐私深度学习,153页pdf
专知会员服务
19+阅读 · 2024年7月10日
【NeurIPS2023】稀疏保留的差分隐私大型嵌入模型训练
专知会员服务
15+阅读 · 2023年11月18日
专知会员服务
14+阅读 · 2021年9月14日
专知会员服务
41+阅读 · 2020年12月1日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员