Understanding Privacy Risks in Code Models Through Training Dynamics: A Causal Approach
Not on the map. Why?
Abstract (arXiv)
Large language models for code (LLM4Code) have greatly improved developer productivity but also raise privacy concerns due to their reliance on open-source repositories containing abundant personally identifiable information (PII). Prior work shows that commercial models can reproduce sensitive PII, yet existing studies largely treat PII as a single category and overlook the heterogeneous risks among different types. We investigate whether distinct PII types vary in their likelihood of being learned and leaked by LLM4Code, and whether this relationship is causal. Our methodology includes building a dataset with diverse PII types, fine-tuning representative models of different scales, computing training dynamics on real PII data, and formulating a structural causal model to estimate the causal effect of learnability on leakage. Results show that leakage risks differ substantially across PII types and correlate with their training dynamics: easy-to-learn instances such as IP addresses exhibit higher leakage, while harder types such as keys and passwords leak less frequently. Ambiguous types show mixed behaviors. This work provides the first causal evidence that leakage risks are type-dependent and offers guidance for developing type-aware and learnability-aware defenses for LLM4Code.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 16 of its 36 references that are in the map. First posted on arXiv 8 Dec 2025.
Builds on
16 of 36 references.
References · 16
- 2020Extracting Training Data from Large Language Modelscited by 2,189
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2023StarCoder: may the source be with you!cited by 799
- 2022Quantifying Memorization Across Neural Language Modelscited by 763
- 2018An Empirical Study of Example Forgetting during Deep Neural Network Learningcited by 678
- 2020Dataset Cartography: Mapping and Diagnosing Datasets with Training Dynamicscited by 425
- 2021Understanding Dataset Difficulty with V-Usable Informationcited by 291
- 2023Analyzing Leakage of Personally Identifiable Information in Language Modelscited by 285
- 2023SantaCoder: don't reach for the stars!cited by 170
- 2020DoWhy: An End-to-End Library for Causal Inferencecited by 95
- 2021Mind Your Outliers! Investigating the Negative Impact of Outliers on Active Learning for Visual Question Answeringcited by 62
- 2024Finding NeMo: Localizing Neurons Responsible For Memorization in Diffusion Modelscited by 37
4 more
- 2023Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded Credentialscited by 17
- 2023Toward a Theory of Causation for Interpreting Neural Code Modelscited by 12
- 2022Pushed by Accident: A Mixed-Methods Study on Strategies of Handling Secret Information in Source Code Repositoriescited by 2
- 2025PrivacyXray: Detecting Privacy Breaches in LLMs through Semantic Consistency and Probability Certaintycited by 1
Built on by
Citing papers per year: 2025: 1.
1 paper.