arXiv:2503.22760cs.CRcs.LG2025-03被引 2

研究代码生成大模型泄露敏感信息的风险,区分故意与无意泄露。

Malicious and Unintentional Disclosure Risks in Large Language Models for Code Generation

  • 拆解敏感信息泄露为无意和恶意两类风险,分别评估
  • 发现数据源与处理方式改变会显著影响泄露风险
  • 不同敏感信息类型和提示策略导致风险差异明显

本文研究大型语言模型(LLM)在代码生成任务中因训练数据来自软件仓库而可能泄露敏感信息的风险。将文献中所述的‘非故意记忆’风险分解为两类:无意泄露(模型在用户未主动请求时暴露秘密)与恶意泄露(攻击者利用部分训练数据知识诱导模型泄露)。现有工作多关注恶意泄露,但无意泄露同样值得关注。我们提出方法,对不同版本训练数据集和模型的两类风险进行并行评估。通过独立评估Open Language Model(OLMo)系列模型及其Dolma训练数据集,发现:第一,数据来源与处理方式的变更会显著改变非故意记忆风险;第二,相同操作可能同时增加一类风险而降低另一类;第三,泄露风险不仅取决于提示策略或测试数据集,还与敏感信息类型相关。这些成果依赖数据挖掘,助力完善大模型训练数据供应链的隐私与安全测试。

原文摘要 · Abstract (English)

This paper explores the risk that a large language model (LLM) trained for code generation on data mined from software repositories will generate content that discloses sensitive information included in its training data. We decompose this risk, known in the literature as ``unintended memorization,'' into two components: unintentional disclosure (where an LLM presents secrets to users without the user seeking them out) and malicious disclosure (where an LLM presents secrets to an attacker equipped with partial knowledge of the training data). We observe that while existing work mostly anticipates malicious disclosure, unintentional disclosure is also a concern. We describe methods to assess unintentional and malicious disclosure risks side-by-side across different releases of training datasets and models. We demonstrate these methods through an independent assessment of the Open Language Model (OLMo) family of models and its Dolma training datasets. Our results show, first, that changes in data source and processing are associated with substantial changes in unintended memorization risk; second, that the same set of operational changes may increase one risk while mitigating another; and, third, that the risk of disclosing sensitive information varies not only by prompt strategies or test datasets but also by the types of sensitive information. These contributions rely on data mining to enable greater privacy and security testing required for the LLM training data supply chain.

大模型安全数据泄露代码生成隐私风险

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。