Prune the Leaky Neurons: Mitigating Private Data Leakage in Fine-Tuned LLMs via Joint-Embedding-Guided Pruning
Organizations: School of Engineering and Applied Sciences, Washington State University, Richland, WA 99354, USA
Abstract
Fine-tuning large language models (LLMs) on proprietary records enables domain adaptation but introduces two challenges: (i) privacy leakage of memorized private data, such as personally identifiable information (PII), and (ii) balancing private data removal with utility preservation. Existing defenses, including data sanitization and differential privacy, often degrade performance, while privacy-neuron editing lacks a PII-free reference to distinguish identity-specific neurons from those supporting useful text. We propose JEPA-Prune, a post-hoc neuron pruning framework guided by a model trained exclusively on PII-free views. Alongside the fine-tuned private model, JEPA-Prune, trains a public model on surrogate and masked views of the same records using a joint-embedding predictive architecture (JEPA), capturing domain knowledge without identifiers. A cross-model representation probe quantifies deviations between private representations of leaked records and this PII-free reference. Integrated gradients and a scale-invariant specificity score then identify PII-responsive neurons, which are pruned without retraining. Experiments show that pruning just 1.6% of neurons reduces PII inference accuracy by up to 7.4x and PII extraction recall by up to 13.9x, while keeping unseen-text perplexity within 16% of that of the unpruned model for most LLMs. In contrast, privacy-neuron editing increases perplexity by at least 26x.
Figures & tables
| ai4privacy | ECHR | Yelp | ||||||||
| Inference | Unseen PPL | Inference | Unseen PPL | Inference | Unseen PPL | |||||
| Model | Method | Acc. (%) | All | Non-PII | Acc. (%) | All | Non-PII | Acc. (%) | All | Non-PII |
| Llama-3.2-1B | Unpruned | 11.96 | 1.000 | 1.000 | 26.58 | 1.000 | 1.000 | 35.22 | 1.000 | 1.000 |
| Random (0.8%) | 10.30 | 1.039 | 1.030 | 24.92 | 1.073 | 1.075 | 31.89 | 1.048 | 1.047 | |
| Random (1.6%) | 5.98 | 1.106 | 1.057 | 25.25 | 1.208 | 1.201 | 31.56 | 1.117 | 1.115 | |
| Random (3.2%) | 3.65 | 1.477 | 1.316 | 21.26 | 1.176 | 1.164 | 25.91 | 1.328 | 1.328 | |
| Dataset | Method | Extracted | Precision (%) | Recall (%) |
|---|---|---|---|---|
| ai4privacy | Unpruned | 474 | 8.04 | 24.01 |
| Random | 489 | 5.07 | 24.77 | |
| DEPN (0.74%) | 91 | 3.25 | 4.61 | |
| JEPA-Prune | 59 | 8.74 | 2.99 | |
| ECHR | Unpruned | 126 | 3.78 | 10.59 |
| Random | 80 | 3.34 | 6.72 |
| Inference | Unseen PPL | Seen PPL | ||||
|---|---|---|---|---|---|---|
| Model | Pruned | Acc. (%) | All | Non-PII | All | Non-PII |
| Llama-3.2-1B | Unpruned | 11.96 | 1.000 | 1.000 | 1.000 | 1.000 |
| FFN | 5.65 | 1.085 | 0.996 | 1.200 | 1.093 | |
| Attn | 2.99 | 1.701 | 1.534 | 2.298 | 2.134 | |
| Attn + FFN | 5.32 | 1.099 | 1.020 | 1.274 | 1.172 | |
| Mistral-7B | Unpruned | 49.17 | 1.000 | 1.000 | 1.000 | 1.000 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| ai4privacy | ECHR | Yelp | ||||||||||||||
| Inference | Unseen PPL | Seen PPL | Inference | Unseen PPL | Seen PPL | Inference | Unseen PPL | Seen PPL | ||||||||
| Model | Method | Acc. (%) | All | Non-PII | All | Non-PII | Acc. (%) | All | Non-PII | All | Non-PII | Acc. (%) | All | Non-PII | All | Non-PII |
| Llama-3.2-1B | Unpruned | 11.96 | 1.000 | 1.000 | 1.000 | 1.000 | 26.58 | 1.000 | 1.000 | 1.000 | 1.000 | 35.22 | 1.000 | 1.000 | 1.000 | 1.000 |
| Random (0.8%) | 10.30 | 1.039 | 1.030 | 1.081 | 1.079 | 24.92 | 1.073 | 1.075 | 1.087 | 1.088 | 31.89 | 1.048 | 1.047 | 1.065 | 1.063 | |
| Random (1.6%) | 5.98 | 1.106 | 1.057 | 1.197 | 1.147 | 25.25 | 1.208 | 1.201 | 1.246 | 1.234 | 31.56 | 1.117 | 1.115 | 1.183 | 1.177 | |
| Random (3.2%) | 3.65 | 1.477 | 1.316 | 1.759 | 1.606 | 21.26 | 1.176 | 1.164 | 1.263 | 1.250 | 25.91 | 1.328 | 1.328 | 1.467 | 1.461 | |
| Dataset | Method | Extracted | Precision (%) | Recall (%) |
|---|---|---|---|---|
| ai4privacy | Unpruned | 474 | 8.04 | 24.01 |
| Random (0.8%) | 471 | 7.89 | 23.86 | |
| Random (1.6%) | 489 | 5.07 | 24.77 | |
| Random (3.2%) | 361 | 10.48 | 18.29 | |
| DEPN (0.74%) | 91 | 3.25 | 4.61 | |
| JEPA-Prune (0.8%) | 68 | 9.43 | 3.44 |
| ai4privacy | ECHR | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Inference | Unseen PPL | Seen PPL | Inference | Unseen PPL | Seen PPL | ||||||
| Model | Method | Acc. (%) | All | Non-PII | All | Non-PII | Acc. (%) | All | Non-PII | All | Non-PII |
| Mistral-7B | Unpruned | 49.17 | 1.000 | 1.000 | 1.000 | 1.000 | 59.47 | 1.000 | 1.000 | 1.000 | 1.000 |
| Random | 29.57 | 1.022 | 1.019 | 1.261 | 1.314 | 53.49 | 1.027 | 1.026 | 1.103 | 1.105 | |
| DEPN | 1.99 | 145.1 | 413.6 | 453.4 | 1,889 | 5.98 | 26.0 | 28.3 | 52.5 | 59.1 | |
| JEPA-Prune | 6.64 | 0.888 | 0.797 | 2.030 | 2.181 | 33.89 | 0.985 | 0.963 | 1.336 | 1.323 | |
| LOSS attack | Reference attack | PPL | |||||
| Method | Budget | AUC | TPR@1%FPR (%) | AUC | TPR@1%FPR (%) | Unseen | Seen |
| Unpruned | – | 0.899 | 4.0 | 0.952 | 44.7 | 1.000 | 1.000 |
| Random | 0.8% | 0.867 | 2.7 | 0.932 | 31.6 | 0.986 | 1.186 |
| 1.6% | 0.835 | 2.0 | 0.922 | 23.4 | 1.152 | 1.488 | |
| 3.2% | 0.786 | 0.9 | 0.873 | 17.5 | 1.100 | 1.781 | |
| DEPN | 0.74% | 0.581 | 1.4 | 0.595 | 2.4 | 258.0 | 697.9 |
| Inference | Unseen PPL | Seen PPL | |||
|---|---|---|---|---|---|
| Acc. (%) | All | Non-PII | All | Non-PII | |
| 0 (unpruned) | 11.96 | 1.000 | 1.000 | 1.000 | 1.000 |
| 125 | 6.98 | 1.007 | 0.975 | 1.059 | 1.009 |
| 250 | 6.31 | 1.012 | 0.971 | 1.089 | 1.028 |
| 500 | 5.65 | 1.024 | 0.969 | 1.141 | 1.069 |
| 1,000 | 5.32 | 1.099 | 1.020 | 1.274 | 1.172 |
| Inference | Unseen PPL | Seen PPL | ||||
|---|---|---|---|---|---|---|
| Rule | Overlap | Acc. (%) | All | Non-PII | All | Non-PII |
| Unpruned | – | 11.96 | 1.000 | 1.000 | 1.000 | 1.000 |
| Inference | 0 | 5.32 | 1.099 | 1.020 | 1.274 | 1.172 |
| Extraction | 71 | 4.98 | 1.064 | 1.007 | 1.260 | 1.184 |
| DEPN-style | 15 | 5.65 | 1.077 | 0.997 | 1.234 | 1.137 |
| Inference | Unseen PPL | Seen PPL | |||
| Acc. (%) | All | Non-PII | All | Non-PII | |
| Unpruned | 40.86 | 1.000 | 1.000 | 1.000 | 1.000 |
| 1.6% of the neurons ( ) | |||||
| 10 | 12.62 | 0.902 | 0.800 | 1.660 | 1.631 |
| 25 | 14.62 | 0.853 | 0.783 | 1.557 | 1.558 |
| 50 | 10.30 | 0.853 | 0.739 | 1.797 | 1.731 |
| Inference Acc. (%) | Unseen PPL | Seen PPL | ||||
|---|---|---|---|---|---|---|
| Generator | Public JEPA | Pruned | All | Non-PII | All | Non-PII |
| Pseudo-words | 1.33 | 5.32 | 1.099 | 1.020 | 1.274 | 1.172 |
| Faker | 2.99 | 6.31 | 1.105 | 1.013 | 1.269 | 1.155 |
| Hybrid | 4.32 | 6.31 | 1.096 | 1.017 | 1.263 | 1.161 |
| Inference Acc. (%) | Unseen PPL | Seen PPL | ||||
|---|---|---|---|---|---|---|
| Unpruned | Pruned | All | Non-PII | All | Non-PII | |
| 4 | 6.64 | 4.98 | 1.107 | 1.033 | 1.190 | 1.099 |
| 8 | 11.96 | 5.32 | 1.099 | 1.020 | 1.274 | 1.172 |
| 16 | 17.94 | 7.31 | 1.039 | 0.960 | 1.337 | 1.228 |
| 32 | 29.90 | 10.63 | 1.060 | 0.937 | 2.037 | 1.867 |
| Inference Acc. (%) | ||
|---|---|---|
| Candidates | Unpruned | Pruned |
| 50 | 11.96 | 5.32 |
| 100 | 6.64 | 3.65 |
| 500 | 1.99 | 0.66 |
| Inference Acc. (%) | ||||
|---|---|---|---|---|
| Entity type | Records | Unpruned | DEPN | JEPA-Prune |
| PERSON | 301 | 11.96 | 3.32 | 5.32 |
| LOC | 181 | 15.47 | 1.10 | 13.26 |
| ORG | 301 | 33.89 | 1.33 | 33.55 |
| PRODUCT | 251 | 47.01 | 0.00 | 39.44 |
| Inference | Unseen PPL | Seen PPL | ||||
| Reference | Acc. (%) | All | Non-PII | All | Non-PII | |
| – | Unpruned | 40.86 | 1.000 | 1.000 | 1.000 | 1.000 |
| 0.8% | Random | 31.23 | 0.986 | 1.002 | 1.186 | 1.206 |
| Scrubbed | 14.29 | 0.757 | 0.684 | 1.432 | 1.399 | |
| JEPA ( ) | 12.96 | 0.805 | 0.718 | 1.550 | 1.487 | |
| JEPA ( ) | 11.63 | 0.805 | 0.717 | 1.603 | 1.537 | |
| Inference | Unseen PPL | Seen PPL | |||
|---|---|---|---|---|---|
| Reference / control | Acc. (%) | All | Non-PII | All | Non-PII |
| Unpruned | 11.96 | 1.000 | 1.000 | 1.000 | 1.000 |
| Masked / masked | 6.31 | 1.154 | 1.079 | 1.364 | 1.276 |
| Masked / type | 4.65 | 1.357 | 1.165 | 1.652 | 1.428 |
| Type / type | 5.32 | 1.099 | 1.020 | 1.274 | 1.172 |
| Inference | Unseen PPL | Seen PPL | MIA | Extracted | |||
| Model | Acc. (%) | All | Non-PII | All | Non-PII | AUC | names |
| Unpruned | 40.86 | 1.000 | 1.000 | 1.000 | 1.000 | 0.952 | 474 |
| Public, scrubbed | 5.32 | 1.617 | 1.294 | 2.125 | 1.511 | 0.861 | 56 |
| Public, JEPA ( ) | 3.65 | 2.200 | 0.928 | 4.274 | 1.613 | 0.772 | 0 |
| JEPA-Prune (0.8%) | 9.30 | 0.809 | 0.713 | 1.640 | 1.577 | 0.827 | 68 |
| JEPA-Prune (1.6%) | 8.64 | 0.855 | 0.745 | 1.932 | 1.910 | 0.784 | 59 |
Privacy Leakage in Language Models
Privacy leakage in language models concerns how models expose training data, infer sensitive traits, or transmit private context through outputs and internal channels.
See all 272 papers