Modern language models (LM) are trained on large scrapes of the Web, containing millions of personal information (PI) instances, many of which LMs memorize, increasing privacy risks. In this work, we develop the regexes and rules (R&R) detector suite to detect email addresses, phone numbers, and IP addresses, which outperforms the best regex-based PI detectors. On a manually curated set of 483 instances of PI, we measure memorization: finding that 13.6% are parroted verbatim by the Pythia-6.9b model, i.e., when the model is prompted with the tokens that precede the PI in the original document, greedy decoding generates the entire PI span exactly. We expand this analysis to study models of varying sizes (160M-6.9B) and pretraining time steps (70k-143k iterations) in the Pythia model suite and find that both model size and amount of pretraining are positively correlated with memorization. Even the smallest model, Pythia-160m, parrots 2.7% of the instances exactly. Consequently, we strongly recommend that pretraining datasets be aggressively filtered and anonymized to minimize PI parroting.
Figures & tables
Figure 1: Results on manually annotating 1750 detections, 250 per PI type per system. R&R (blue) outperforms wimbd (orange) in 17 of 20 cases. wimbd cannot detect US phone numbers when it has the country code (+1), yielding a precision of 0%. R&R significantly outperforms wimbd for email addresses and both phone numbers and is not significantly better for IP addresses.
PI type
total detections
expected PI counts
email addresses
16.389,977
12,623,478
IP addresses
7,801,628
4,411,309
phone numbers
1,275,862
278,332
phone numbers (global)
172,326
28,987
Table 1: Total detections and expected PI counts across the Pile dataset using R&R for each PI type.
Figure 2: Here, we show the results of prompting each Pythia model with the prefix that occurs before each instance of PI and measuring the ParrotScore between the ground-truth PI and the model’s greedily decoded generation across all PI types.
model sizes
email
ip
phone num
phone num +1
160m
2.34%
4.72%
1.64%
1.23%
410m
8.41%
7.09%
4.92%
2.47%
1b
12.62%
7.87%
3.28%
1.23%
1.4b
16.36%
11.81%
3.28%
1.23%
2.8b
19.63%
14.17%
1.64%
1.23%
6.9b
19.63%
14.17%
3.28%
4.94%
Table 2: Percent of total instances that are verbatim parroted. Note that this corresponds to the percent of instances that achieve a ParrotScore of 1. We find that verbatim parroting increases with model size and email addresses are the most likely to be parroted exactly.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: The effect of the number of pretraining steps (top) and prefix length (bottom) on ParrotScore across PI types for the Pythia-6.9b model.
model sizes
username
domain
160m
11.22%
12.15%
410m
15.42%
20.09%
1b
20.09%
24.77%
1.4b
20.56%
28.50%
2.8b
25.70%
31.31%
6.9b
26.17%
30.84%
Appendix
Table 3: Percent of total instances that are verbatim parroted for the constituent parts of email addresses (the username and domain). Note that this corresponds to the percent of instances with that component achieving a ParrotScore of 1. We find that verbatim parroting increases with model size.
model sizes
grp1
grp2
grp3
grp4
160m
18.11%
13.39%
13.39%
9.45%
410m
18.90%
19.69%
14.96%
11.02%
1b
21.26%
21.26%
20.47%
11.02%
1.4b
25.20%
24.41%
21.26%
14.17%
2.8b
26.77%
25.20%
22.83%
18.90%
6.9b
32.28%
31.50%
24.41%
19.69%
Appendix
Table 4: Percent of total instances that are verbatim parroted for the constituent parts of IP addresses (split on each ‘.’ character grp1-grp4). Note that this corresponds to the percent of instances with that component achieving a ParrotScore of 1. We find that verbatim parroting increases with model size.
model sizes
area code
rest of the number
160m
8.20%
1.64%
410m
13.11%
4.92%
1b
11.48%
3.28%
1.4b
14.75%
3.28%
2.8b
9.84%
1.64%
6.9b
19.67%
3.28%
Appendix
Table 5: Percent of total instances that are verbatim parroted for the constituent parts of phone numbers (split by area code and rest of the number). Note that this corresponds to the percent of instances with that component achieving a ParrotScore of 1. We find that verbatim parroting increases with model size for area codes generally, but not for the rest of the number.
Reliable detection of personally identifiable information (PII) is increasingly important across modern data-processing systems, yet the task remains difficult: PII spans are heterogeneous, locale-dependent, context-sensitive, and often embedded in noisy or semi-structured documents. We present GLiNER2-PII, a small 0.3B-parameter model adapted from GLiNER2 and designed to recognize a broad taxonomy of 42 PII entity types at character-span resolution. Training such systems, however, is constrained by the scarcity of shareable annotated data and the privacy risks associated with collecting real PII at scale. To address this challenge, we construct a multilingual synthetic corpus of 4,910 annotated texts using a constraint-driven generation pipeline that produces diverse, realistic examples across languages, domains, formats, and entity distributions. On the challenging SPY benchmark, GLiNER2-PII achieves the highest span-level F1 among five compared systems, including OpenAI Privacy Filter and three GLiNER-based detectors. We publicly release the model on Hugging Face to support further research and practical deployment of open PII detection systems.
Modern language models exhibit rich internal structure, yet little is known about how privacy-sensitive behaviors, such as personally identifiable information (PII) leakage, are represented and modulated within their hidden states. We present UniLeak, a mechanistic-interpretability framework that identifies universal activation directions: latent directions in a model's residual stream whose linear addition at inference time consistently increases the likelihood of generating PII across prompts. These model-specific directions generalize across contexts and amplify PII generation probability, with minimal impact on generation quality. UniLeak recovers such directions without access to training data or groundtruth PII, relying only on self-generated text. Across multiple models and datasets, steering along these universal directions substantially increases PII leakage compared to existing prompt-based extraction methods. Our results offer a new perspective on PII leakage: the superposition of a latent signal in the model's representations, enabling both risk amplification and mitigation.
Leo Marchyok, Zachary Coalson, Sungho Keum +2
Oregon State University, Corvallis OR, USA · Korea Advanced Institute of Science & Technology, Daejeon, South Korea.
Fine-tuning a language model on sensitive records can leave it able to reproduce them. We ask when this memorization arises and how to prevent it without knowing in advance which spans are sensitive. Our starting point is that most memorization scores and attacks share one statistical core: whether the model assigns a token more probability than some reference would. Taking as the reference a model trained on the complementary half of the same corpus gives the Target Reference Advantage (TRA), a per-token signal that separates what a model fit to a particular record from what it learned across records, and is cheap and differentiable. We then study what drives memorization during fine-tuning: it keeps growing well past the validation minimum, is larger on small datasets and at higher learning rates, and higher when the underlying task is harder. Early stopping removes much of it, but because it is chosen by aggregate validation loss it helps least for rare, hard-to-predict spans embedded in otherwise learnable text, which is exactly what sensitive information tends to be. We therefore introduce TRAP, a one-sided penalty on tokenwise TRA that acts only where the target model pulls ahead of its reference. On student essays with annotated personal information and clinical cases with patient identifiers, TRAP brings memorization near the level of an untrained model at little utility cost, where generic regularizers barely move and differential privacy gives up most of what fine-tuning bought.
Muhammed Ustaomeroglu, Ziyue Xu, Hanshen Xiao +3
Carnegie Mellon University · NVIDIA · Purdue University