Abstract
Large Language Models (LLMs) are prone to memorizing sensitive training data, leading to the potential leakage of Personally Identifiable Information (PII). This research introduces a surgical approach to LLM safety by localizing and deactivating specific "privacy neurons" responsible for this memorization. Utilizing differentiable binary masks and adversarial training, the proposed method identifies a sparse subset of neurons—approximately 3.5% of the total—that store sensitive data. Experimental results on the Enron and ECHR datasets demonstrate that deactivating these neurons significantly reduces PII leakage while preserving the model's general language modeling capabilities, offering a superior alternative to traditional data scrubbing or differential privacy.
Introduction
The tendency of LLMs to act as "stochastic parrots" poses a significant security risk when training corpora contain PII such as names, addresses, or private email strings. Traditional mitigation strategies, such as data scrubbing or Differential Privacy, often incur a "utility tax," degrading model performance or requiring immense computational resources for post-training implementation. The core difficulty lies in the lack of understanding regarding the internal storage mechanisms of sensitive data. This work addresses this gap by localizing the specific neural circuitry dedicated to PII, allowing for targeted intervention without compromising overall model intelligence.
Methodology
The researchers developed a neuron localization algorithm that treats the identification of sensitive circuitry as a sparse optimization problem.
Differentiable Binary Masks
To overcome the non-differentiable nature of hard binary switches, the method employs a hard concrete distribution. This allows the model to learn a mask for every neuron by treating the decision to retain or deactivate a neuron as a continuous, optimizable parameter. This enables the use of backpropagation to "learn" the optimal mask configuration.
Adversarial Training and Sparsity
The training process utilizes a dual-objective loss function. One component forces the model to maximize prediction error on PII sequences (forgetting), while an adversarial component ensures the retention of general knowledge on non-sensitive text. To ensure the algorithm identifies the minimal necessary subset of neurons, an $L_0$ regularization penalty is applied, preventing the over-deactivation of vital network components.
Results and Key Insights
The methodology was evaluated using GPT-Neo models (125M and 1.3B) on the Enron Email and European Court of Human Rights (ECHR) datasets.
Localization and Sparsity
A key finding is that PII storage is highly sparse and localized, involving only about 3.5% of the model's neurons. Furthermore, these "privacy neurons" are predominantly located within the Multi-Layer Perceptron (MLP) layers rather than attention heads, suggesting that MLPs serve as the primary storage for memorized facts.
Performance and Mitigation
The "surgical" deactivation of localized neurons yielded substantial improvements in privacy metrics. On the ECHR dataset with GPT-Neo 1.3B, Memorization Accuracy (MA) was reduced from 63.3% to 20.0%. Crucially, this reduction in leakage came with negligible impact on general utility, as measured by Extraction Likelihood (EL) for non-private information.
Category Specificity
Analysis revealed that privacy neurons are specialized; neurons responsible for memorizing dates are distinct from those storing names. There is minimal overlap between different PII categories, indicating a modular storage structure distributed across nearly all layers of the model.
Conclusion and Future Work
This research demonstrates that sensitive information is stored in a sparse, localized manner within LLMs, primarily in MLP layers. By identifying and deactivating these specific neurons, it is possible to significantly mitigate privacy risks without the performance degradation typical of broader techniques. Future work will focus on scaling these findings to larger architectures and exploring "neuron editing" to replace sensitive data with generic placeholders rather than simple deactivation.
Summary updated