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

Rafiqul Rabin, Sean McGregor, Nick Judd
3/27/2025
cs.CRcs.LGcs.PL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{rabin2025malicious,
  title  = {Malicious and Unintentional Disclosure Risks in Large Language Models for Code Generation},
  author = {Rafiqul Rabin and Sean McGregor and Nick Judd},
  year   = {2025},
  eprint = {2503.22760},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.22760v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.22760.svg)](https://codeofpaper.com/paper/2503.22760)

Discussion