AI
Different Types of Personal Data Leak at Different Rates from Code AI Models, New Study Shows
Researchers used causal analysis to reveal that large language models trained on code leak sensitive information unevenly depending on how easily the data was learned during training.
Large language models built for software development leak personal information at vastly different rates depending on the type of data involved, according to a new causal analysis of how code models absorb and reproduce sensitive details.
The study examined whether different categories of personally identifiable information (PII)—such as IP addresses, cryptographic keys, and passwords—are retained and exposed by code-focused language models at different likelihoods. Rather than treating all PII as equally risky, researchers discovered that leakage correlates directly with how easily a model learns that information during training.
Easy-to-Learn Data Leaks More Readily#
The findings paint a clear pattern: information that models absorb readily during training poses the highest leakage risk. IP addresses, which tend to be simple and repetitive across codebases, emerge as frequent leakage candidates. In contrast, harder-to-learn material such as cryptographic keys and passwords appear with much lower frequency in model outputs. Some PII categories display inconsistent behavior, depending on context and structure.
Methodology: Building Causal Evidence#
Researchers constructed a controlled dataset containing diverse PII types and then fine-tuned models of varying sizes on real sensitive data. They tracked training dynamics—how quickly and thoroughly models internalized each data type—and built a structural causal model to isolate whether learnability itself directly caused increased leakage risk. This causal framing goes beyond simple correlation, establishing that the relationship between how models learn and how they leak is fundamental.
Implications for Defense and Safety#
The findings offer concrete direction for protecting code models. Rather than applying a one-size-fits-all privacy defense, teams can prioritize protections based on data type and learnability profile. The research provides the first causal evidence that type-aware and learnability-aware defenses could substantially reduce privacy exposure in AI models used across development workflows.

