arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2410.08858cs.CRcs.SE
收藏

通过令牌级特征解码代码大语言模型中的秘密记忆

Decoding Secret Memorization in Code LLMs Through Token-Level Characterization

Yuqing Nie, Chong Wang, Kailong Wang, Guoai Xu, Guosheng Xu, Haoyu Wang

AI总结:

针对Code LLMs因记忆敏感信息带来的隐私风险及现有方法的局限性,本文提出基于令牌概率的DESEC两阶段方法,通过识别区分真实与虚假秘密的特征引导解码,实验证明其优于现有基线,可有效评估隐私泄露风险。

摘要:

代码大语言模型(Code LLMs)在生成、理解和操作编程代码方面展现出卓越能力。然而,其训练过程会无意中导致敏感信息的记忆,带来严重的隐私风险。现有关于LLMs记忆的研究主要依赖提示工程技术,存在普遍的幻觉现象和目标敏感信息提取效率低下等局限性。本文提出一种基于令牌概率表征代码LLMs生成的真实与虚假秘密的新方法,识别出区分真实秘密与幻觉秘密的四个关键特征,为区分真实与虚假秘密提供见解。为克服现有工作的局限性,我们提出DESEC——一种利用从已识别特征中提取的令牌级特征来引导令牌解码过程的两阶段方法。通过在四个最先进的Code LLMs上使用多样化数据集进行广泛实验,我们证明DESEC在实现更高的合理率和提取更多真实秘密方面优于现有基线。我们的研究结果凸显了令牌级方法在对Code LLMs相关的隐私泄露风险进行广泛评估方面的有效性。

英文摘要:

Code Large Language Models (LLMs) have demonstrated remarkable capabilities in generating, understanding, and manipulating programming code. However, their training process inadvertently leads to the memorization of sensitive information, posing severe privacy risks. Existing studies on memorization in LLMs primarily rely on prompt engineering techniques, which suffer from limitations such as widespread hallucination and inefficient extraction of the target sensitive information. In this paper, we present a novel approach to characterize real and fake secrets generated by Code LLMs based on token probabilities. We identify four key characteristics that differentiate genuine secrets from hallucinated ones, providing insights into distinguishing real and fake secrets. To overcome the limitations of existing works, we propose DESEC, a two-stage method that leverages token-level features derived from the identified characteristics to guide the token decoding process. DESEC consists of constructing an offline token scoring model using a proxy Code LLM and employing the scoring model to guide the decoding process by reassigning token likelihoods. Through extensive experiments on four state-of-the-art Code LLMs using a diverse dataset, we demonstrate the superior performance of DESEC in achieving a higher plausible rate and extracting more real secrets compared to existing baselines. Our findings highlight the effectiveness of our token-level approach in enabling an extensive assessment of the privacy leakage risks associated with Code LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑