mlsanityData to 14 Oct 2026

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

arXiv 2503.22760 ↗First posted 27 Mar 2025cs.CR cs.LG cs.PLcited by 0

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 29 of its 35 references that are in the map. First posted on arXiv 27 Mar 2025.

Builds on

29 of 35 references.

References · 29

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2021Program Synthesis with Large Language Modelscited by 3,637
  3. 2020Extracting Training Data from Large Language Modelscited by 2,189
  4. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  5. 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 864
  6. 2023StarCoder: may the source be with you!cited by 799
  7. 2022Quantifying Memorization Across Neural Language Modelscited by 763
  8. 2024OLMo: Accelerating the Science of Language Modelscited by 613
  9. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  10. 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 483
  11. 2019Does Learning Require Memorization? A Short Tale about a Long Tailcited by 460
  12. 2022The Stack: 3 TB of permissively licensed source codecited by 359
17 more
  1. 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 335
  2. 2023Analyzing Leakage of Personally Identifiable Information in Language Modelscited by 285
  3. 2022Are Large Pre-Trained Language Models Leaking Your Personal Information?cited by 200
  4. 2023Beyond Memorization: Violating Privacy Via Inference with Large Language Modelscited by 175
  5. 2023Controlling the Extraction of Memorized Data from Large Language Models via Prompt-Tuningcited by 40
  6. 2023Unveiling Memorization in Code Modelscited by 30
  7. 2023Traces of Memorisation in Large Language Models for Codecited by 29
  8. 2024Learning to Refuse: Towards Mitigating Privacy Risks in LLMscited by 23
  9. 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 19
  10. 2024Not My Voice! A Taxonomy of Ethical and Safety Harms of Speech Generatorscited by 18
  11. 2023Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded Credentialscited by 17
  12. 2024An Exploratory Investigation into Code License Infringements in Large Language Model Training Datasetscited by 9
  13. 2023Code Membership Inference for Detecting Unauthorized Data Use in Code Pre-trained Language Modelscited by 8
  14. 2024Coordinated Flaw Disclosure for AI: Beyond Security Vulnerabilitiescited by 8
  15. 2024To Err is AI : A Case Study Informing LLM Flaw Reporting Practicescited by 5
  16. 2022Pushed by Accident: A Mixed-Methods Study on Strategies of Handling Secret Information in Source Code Repositoriescited by 2
  17. 2023What Challenges Do Developers Face About Checked-in Secrets in Software Artifacts?cited by 1

Built on by

Not cited yet.