Gotcha!这个模型使用了我的代码!评估代码模型中的成员身份泄露风险
Gotcha! This Model Uses My Code! Evaluating Membership Leakage Risks in Code Models
AI总结:
本文提出了针对代码模型的新型成员推断攻击方法 Gotcha,揭示了其高成员身份泄露风险,并发现改变解码策略可缓解该风险,呼吁关注代码模型隐私。
摘要:
鉴于开源项目中可用的大规模源代码数据集以及先进的大型语言模型,近期已提出代码模型来解决一系列关键软件工程任务,例如程序修复和代码补全。代码模型的训练数据来自多种来源,不仅有公开可用的源代码(例如 GitHub 上的开源项目),还包括私有数据(如公司的机密源代码),这些数据可能包含敏感信息(例如 SSH 密钥和个人信息)。因此,使用这些代码模型可能引发新的隐私问题。在本文中,我们聚焦于使用代码模型时一个关键但尚未充分探索的问题:代码模型中成员身份信息泄露的风险是什么?成员身份信息泄露是指攻击者能够推断给定数据点是否包含在(即属于)训练数据中的风险。为了回答这个问题,我们提出了 Gotcha,一种专门针对代码模型的新型成员推断攻击方法。我们研究了代码模型的成员身份泄露风险。我们的结果揭示了一个令人担忧的事实,即成员身份泄露的风险很高:尽管先前的攻击方法接近于随机猜测,Gotcha 能够以 0.95 的高真阳性率和 0.10 的低假阳性率预测数据成员身份。我们还表明,攻击者对受害模型的了解(例如模型架构和预训练数据)会影响攻击的成功率。进一步的分析表明,改变解码策略可以缓解成员身份泄露的风险。本研究呼吁人们更多关注理解代码模型的隐私,并开发更有效的对策来应对此类攻击。
英文摘要:
Given large-scale source code datasets available in open-source projects and advanced large language models, recent code models have been proposed to address a series of critical software engineering tasks, such as program repair and code completion. The training data of the code models come from various sources, not only the publicly available source code, e.g., open-source projects on GitHub but also the private data such as the confidential source code from companies, which may contain sensitive information (for example, SSH keys and personal information). As a result, the use of these code models may raise new privacy concerns. In this paper, we focus on a critical yet not well-explored question on using code models: what is the risk of membership information leakage in code models? Membership information leakage refers to the risk that an attacker can infer whether a given data point is included in (i.e., a member of) the training data. To answer this question, we propose Gotcha, a novel membership inference attack method specifically for code models. We investigate the membership leakage risk of code models. Our results reveal a worrying fact that the risk of membership leakage is high: although the previous attack methods are close to random guessing, Gotcha can predict the data membership with a high true positive rate of 0.95 and a low false positive rate of 0.10. We also show that the attacker's knowledge of the victim model (e.g., the model architecture and the pre-training data) impacts the success rate of attacks. Further analysis demonstrates that changing the decoding strategy can mitigate the risk of membership leakage. This study calls for more attention to understanding the privacy of code models and developing more effective countermeasures against such attacks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。