Understanding Privacy Risks in Code Models Through Training Dynamics: A Causal Approach
Hua Yang, Alejandro Velasco, Sen Fang, Bowen Xu, Denys Poshyvanyk

TL;DR
This paper investigates how different types of PII are learned and leaked by code language models, revealing that leakage risk varies by PII type and is causally linked to learnability, guiding more effective privacy defenses.
Contribution
It introduces a causal framework to analyze how PII types influence leakage risks in code models, highlighting the importance of type-aware privacy strategies.
Findings
Leakage risk varies significantly across PII types.
Easy-to-learn PII like IP addresses are more likely to leak.
Harder PII such as passwords leak less frequently.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Advanced Malware Detection Techniques · Adversarial Robustness in Machine Learning
