Introduction: The Privacy Challenge in Large Language Models
As Large Language Models (LLMs) are trained on massive datasets scraped from the internet, they inevitably memorize sensitive personal information, such as email addresses, private records, and home addresses. Privacy regulations, such as the GDPR, grant individuals the "right to be forgotten," necessitating methods to remove this data from pre-trained models. However, "unlearning" specific information without degrading the model's general intelligence is a significant technical challenge.
Existing unlearning methods often rely on "loss negation," a technique that instructs the model to minimize the likelihood of a specific sequence. This approach is often too broad; if a sentence contains both private information and general facts (e.g., "Email Bob at [email protected]; the Earth is round"), loss negation may inadvertently cause the model to forget that the Earth is round. This vulnerability is exploited in "knowledge injection" attacks, where adversaries intentionally mix sensitive data with common knowledge to degrade the model's utility during the unlearning process.
The SEUL Framework: Selective Unlearning
To address these limitations, this paper introduces SEUL (Selective Unlearning). Rather than treating an entire text sequence as a target for deletion, SEUL performs "surgery" on the model by identifying and targeting only the specific sensitive spans within the text.
Methodology
The SEUL pipeline consists of three core components designed to isolate sensitive data from general knowledge:
- Selective Loss Function: Instead of negating the loss for an entire instance, SEUL minimizes the log-likelihood only for specific tokens identified as "forget spans." This ensures that the surrounding context and general facts remain intact.
- Span Identification Strategies: The authors propose two methods for identifying sensitive tokens when they are not pre-defined:
- Online Selection: A heuristic method that identifies tokens with low language probability (high perplexity). The intuition is that unique personal identifiers are typically more "surprising" to the model than common linguistic structures.
- Offline Annotation: A robust two-stage process where a "teacher" LLM identifies sensitive spans, followed by a "backward verification" step to filter and score those spans for accuracy.
- Refined Evaluation Metrics: Traditional metrics often average performance over entire sequences. The authors introduce S-EL (Sensitive Extraction Likelihood) and S-MA (Sensitive Memorization Accuracy) to specifically measure the model's tendency to leak the sensitive portions of a sequence.
Experimental Setup and Results
The effectiveness of SEUL was evaluated using a forget dataset of 15,000 examples from the Training Data Extraction Challenge. General capabilities were tested across eight classification tasks (e.g., Hellaswag, ARC) and four dialogue tasks (e.g., Wizard of Wikipedia) using models ranging from GPT-Neo to Llama2-7B and Mistral-7B.
Key Findings
- Preservation of General Intelligence: SEUL maintained classification accuracy within 0.1%–0.3% of the original models. In dialogue tasks, SEUL significantly outperformed the baseline (KUL). For GPT-Neo 125M, the perplexity after unlearning was 179.8 for SEUL, compared to a catastrophic 539.1 for KUL.
- Effective Privacy Removal: SEUL achieved superior scores on the new sensitive metrics. In Llama2-7B tests, SEUL reduced Sensitive Memorization Accuracy (S-MA) to 12.3%, whereas the baseline remained at 22.3%.
- Adversarial Robustness: SEUL proved significantly more resilient to knowledge injection attacks. By focusing on spans, the model retains its "common sense" even when that knowledge is co-located with private data in an attack query.
Discussion and Limitations
While SEUL represents a major step forward in precise unlearning, some limitations remain. The Online Selection method assumes sensitive information always has low probability; however, if private data is repeated frequently in the training set, the model may perceive it as high-probability, causing the selector to miss it. Additionally, Offline Annotation relies on external LLMs, which can be computationally expensive for large-scale applications.
Future research will explore the behavior of selective spans in multilingual settings and specialized domains, such as medical or legal texts, where the definition of "sensitive" may be more nuanced.
Summary updated