Manuscript Offprint

arXiv:2610.22792

Prune the Leaky Neurons: Mitigating Private Data Leakage in Fine-Tuned LLMs via Joint-Embedding-Guided Pruning

Mohamed Shaaban, Mohamed Elmahallawy

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

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.4×7.4\times and PII extraction recall by up to 13.9×13.9\times, 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 26×26\times.

1 Introduction

Large language models (LLMs) become valuable to organizations when adapted to domains such as legal analysis, financial reporting, and medical question answering (Ling et al., 2025; Wu et al., 2023a; Singhal et al., 2025). Since training from scratch is often impractical, organizations fine-tune pretrained LLMs on proprietary records, frequently using lightweight methods such as low-rank adaptation (LoRA) (Pratap et al., 2025; Dettmers et al., 2023). These records contain both the domain knowledge that makes models useful and private information about the people they describe.

However, LLMs can memorize training data and reproduce it verbatim (Carlini et al., 2021; Nasr et al., 2025). Fine-tuned models may therefore disclose personally identifiable information (PII), such as names and addresses, to adversaries through ordinary queries (Lukas et al., 2023; Nakka et al., 2025). Such leakage can facilitate targeted phishing (Bethany et al., 2025) and violate privacy obligations under regulations such as the General Data Protection Regulation (GDPR) (Regulation, 2016). Because fine-tuning learns identities alongside domain knowledge, organizations face a key challenge: reducing private data leakage without erasing useful domain knowledge.

Existing defenses, including data scrubbing (Pilán et al., 2022; Lukas et al., 2023) and differential privacy (DP) (Dwork, 2006; Abadi et al., 2016), reduce memorization but can compromise utility. Scrubbing masks PII and may remove task-relevant context, while DP injects noise into training updates, potentially degrading accuracy at stronger privacy guarantees (Lukas et al., 2023). Both operate during training, making post-deployment leakage difficult to address without retraining or additional unlearning updates (Kuo et al., 2025). Privacy-neuron editing avoids such updates by deactivating neurons associated with PII (Wu et al., 2023b), but analyzes the leaking model alone, without a PII-free reference to distinguish identity-specific representations from those supporting useful context. This motivates our central question: How can an organization identify and remove neurons responsible for private data leakage from a deployed LLM without retraining or sacrificing its domain knowledge?

We propose JEPA-PRUNE, a post-hoc neuron pruning framework that mitigates private data leakage while preserving domain utility. Alongside the deployed private model, fine-tuned on raw records, JEPA-PRUNE trains a public model on surrogate and masked views of the same records, where each private data value is replaced with a synthetic substitute or a placeholder. We define this public model as a PII-free reference: it captures domain knowledge and contextual information without access to the original PII values. Trained using a joint-embedding predictive architecture (JEPA) objective (Huang et al., 2026), the public model provides a reference representation against which JEPA-PRUNE compares the private model. Specifically, JEPA-PRUNE reuses the objective's cosine-based formulation as a cross-model probe to measure representation differences between the private model's encoding of a leaking record and the corresponding PII-free reference. Integrated gradients attribute these differences to individual neurons, while a scale-invariant specificity score identifies PII-responsive neurons whose contributions are stronger on records containing PII than on their placeholder-substituted counterparts. Pruning these neurons requires no retraining or changes to the serving interface. Our key contributions are:

• Reference-guided post-hoc privacy protection. We propose JEPA-PRUNE, which identifies and selectively prunes neurons associated with memorized private data by comparing a fine-tuned LLM against a PII-free reference, rather than analyzing the leaking model in isolation.

• A PII-free reference on a shared backbone. We train private and public LoRA adapters on a shared frozen backbone to enable direct representation comparisons: (I) PRIVATE MODEL: Fine-tuned on raw PII records and deployed after pruning; (II) PUBLIC MODEL: Trained with a JEPA objective on surrogate (syntactic) PII and masked PII views, without access to the original PII, and used exclusively as a reference.

• PII-specific neuron identification. On leaked records, a cross-model probe measures how far the private model’s embedding of a record lies from the public model’s embedding of the same record with its PII replaced by placeholders. Integrated gradients attribute this distance to attention and feed-forward neurons, a scale-invariant specificity score isolates the PII-responsive ones, and zeroing them yields the pruned model.

• Empirical evaluation. Across five LLMs from three families and 3 PII datasets, JEPA-PRUNE shows that pruning 1.6% of neurons reduces PII inference accuracy by up to 7.4×7.4\times and extraction recall by up to 13.9×13.9\times, outperforming random pruning. At a 3.2% budget, JEPA-PRUNE matches data scrubbing with lower perplexity, while DEPN achieves lower leakage at the cost of at least 26×26\times higher unseen-text perplexity.

References (52)