Abstract
Large Language Model (LLM) unlearning has recently gained significant attention, driven by the need to remove unwanted information, such as private, sensitive, or copyrighted content, from LLMs. However, conventional unlearning approaches indiscriminately update model parameters to forget all tokens in a target document, including common tokens (e.g., pronouns, prepositions, general nouns) that carry general knowledge. In this paper, we highlight that "not every token needs forgetting". We propose Selective Unlearning (SU), which identifies a critical subset of tokens within the forgetting set that is relevant to the unwanted information, and unlearns only those tokens. Experiments on two benchmarks and six baseline unlearning algorithms demonstrate that SU not only achieves effective unlearning on the targeted forget data, but also significantly preserves the model's utility in the retaining set.
Introduction: The Problem with "Blunt" Unlearning
As Large Language Models (LLMs) are trained on vast datasets, they often ingest sensitive, private, or copyrighted information. "Unlearning" has emerged as a vital technique to remove this specific knowledge without the astronomical cost of retraining from scratch.
However, standard unlearning methods, such as Gradient Ascent (GA), often act as "blunt instruments." When tasked with forgetting a specific document, GA attempts to unlearn every single token within it. This includes not only the sensitive information (e.g., a person's name) but also common linguistic building blocks like "the," "was," or "born." This indiscriminate approach leads to "utility collapse," where the model's general language capabilities and unrelated knowledge are degraded simply because they share common vocabulary with the forget set.
The Selective Unlearning (SU) Framework
To address this, we propose Selective Unlearning (SU). The core philosophy is surgical: identify and target only the specific tokens that encode the unwanted knowledge, while leaving "safe" tokens untouched.
Token Selection via Assistant Models
The SU framework employs a token-level selection mechanism powered by two "assistant" models with differing knowledge scopes:
- Assistant 1: Trained on the full dataset (both Forget and Retain data).
- Assistant 2: Trained only on the Retain data.
By comparing the prediction scores (logits) of these two assistants for a given sequence in the forget set, SU can pinpoint tokens that are unique to the sensitive data. If Assistant 1 is significantly more confident about a token than Assistant 2, that token is flagged as "forget-specific."
Implementation Details
- N-Gram vs. Neural Assistants: While smaller LLMs can serve as assistants, the researchers found that simple N-Gram models are highly effective and extremely memory-efficient (requiring only ~20MB).
- Contextual Erasure: To ensure a concept is thoroughly removed, once a token is selected, the unlearning loss is applied to a 5-gram window surrounding it.
- Dual Optimization: The model undergoes selective Gradient Ascent on targeted tokens while simultaneously performing Gradient Descent on the retain set to anchor its general utility.
Evaluation and Results
The SU framework was evaluated on two primary benchmarks: TOFU (fictional biographies) and MUSE-News (real-world news events), alongside the MMLU benchmark for general knowledge.
Key Findings
- Superior Utility Preservation: On the TOFU benchmark, SU maintained a "Truth (Retain)" score of 0.48, significantly outperforming standard Gradient Ascent, which plummeted to 0.10.
- Effective Forgetting: SU achieved forgetting quality comparable to or better than full-document methods. On MUSE-News, SU (N-Gram) reached a "KnowMem (Forget)" score of 0.01 (indicating near-perfect forgetting) while preserving much higher utility on the retain set (0.20 vs. 0.00 for GA).
- General Knowledge Stability: SU with N-Gram assistants maintained the highest MMLU accuracy (0.26) compared to GA (0.00) and GD (0.21) on the MUSE benchmark, proving it protects the model's core reasoning capabilities.
Conclusion
Selective Unlearning demonstrates that a surgical approach to data removal is not only possible but necessary to maintain the performance of LLMs. By focusing unlearning efforts on the specific tokens that carry sensitive information, SU avoids the "utility collapse" typical of broader methods, providing a more robust path toward safe and reliable AI.
Summary updated