TL;DR
This paper introduces two novel, model-agnostic machine unlearning algorithms for LLMs—Fisher Removal and Fisher Forgetting—by leveraging second-order Hessian information. By approximating the inverse Hessian matrix efficiently, these methods successfully erase sensitive training data while preserving the model's overall utility, bypassing the astronomical costs of retraining from scratch.
What Problem Does This Paper Address?
As large language models (LLMs) are trained on massive, web-scale datasets, they inevitably ingest copyrighted material, private personal information, and toxic content. With legal challenges mounting (like the New York Times lawsuit against OpenAI) and privacy regulations like GDPR granting users the "right to be forgotten," AI practitioners need a way to make a trained model "unlearn" specific data.
Retraining a multi-billion parameter model from scratch every time a data removal request arrives is economically and environmentally unsustainable. While existing "first-order" unlearning methods (like gradient ascent) are fast, they are highly unstable—frequently destroying the model's general knowledge and utility. This paper tackles the challenge of building a robust, efficient, and data-agnostic unlearning framework that balances data erasure with model performance.
Methods
The core thesis of this paper is that second-order information (the Hessian matrix) is essential for stable unlearning. While first-order gradients tell you how to forget the target data, the Hessian tells you how to do so without distorting the rest of the model's learned knowledge.
Because calculating the exact Hessian for an LLM requires a prohibitively expensive $O(d^2)$ operations (where $d$ is the number of parameters), the authors introduce an efficient approximation pipeline:
- Inverse Empirical Fisher Estimation: They utilize the Woodbury/Sherman-Morrison formula to recursively estimate the inverse Hessian.
- Diagonal Block-Wise Trick: To save memory and compute, they restrict the calculation to blocks of width $B=48$ along the main diagonal, reducing the complexity from quadratic to linear ($O(Bd)$).
Using this framework, they propose two algorithms:
- Fisher Removal: A direct adaptation of the classic Newton update that aggressively forces the model to forget target samples by combining second-order information from the remaining data with first-order gradients from the forgotten data.
- Fisher Forgetting: A milder variant that injects controlled Gaussian noise scaled by the inverse Hessian to perturb the memory of the target data, specifically optimized to maintain model utility across multiple consecutive unlearning cycles.
Datasets
The authors evaluated their approaches across four general NLP benchmarks and two real-world datasets featuring unintended memorization:
- ARC-Easy: Grade-school level multiple-choice science questions.
- Piqa: Physical commonsense reasoning dataset.
- MathQA: Large-scale mathematical word problems.
- Lambada: Long-text word prediction tasks.
- Medical Transcription (MT): Real-world medical notes used to test the erasure of sensitive clinical narratives.
- Enron Email: A dataset containing real corporate emails, used to test the removal of leaked personal identifiers like phone numbers and passwords.
Key Insights and Ideas
- First-Order Methods Distort Weights: Visualizing weight distributions revealed that gradient ascent pushes the model's parameters drastically far away from a cleanly retrained baseline, explaining its catastrophic drop in general accuracy. Second-order methods keep the parameter distribution highly aligned with the retrained baseline.
- The Onion Effect is Real: The authors validated the "Onion Effect" in LLMs: removing the most heavily memorized or exposed outlier data points often uncovers a new layer of previously safe data points, making them suddenly more vulnerable to privacy attacks.
- DP-SGD is Not a Substitute for Unlearning: While Differential Privacy (DP-SGD) protects data during training, its privacy-utility trade-off is highly inconsistent across different datasets and introduces massive training overhead, meaning it cannot replace post-hoc unlearning.
Key Results
The experiments were conducted on GPT-Neo and OPT models ranging from 125M to 2.7B parameters.
- Efficacy (Privacy Guarantee): Fisher Removal consistently outperformed both retraining and gradient ascent in lowering "exposure scores" (a metric indicating how easily an adversary can extract a sample).
- Fidelity (Utility Preservation): In multi-cycle unlearning tests (forgetting up to 256 samples sequentially), Fisher Forgetting maintained stable accuracy on downstream tasks, whereas gradient ascent suffered catastrophic performance drops.
- Efficiency: While slower than simple gradient ascent, the proposed second-order methods are orders of magnitude faster than full retraining on larger datasets, offering a highly practical middle ground for production systems.
Limitations and Future Work
Despite the block-wise optimization, calculating and storing the empirical Fisher matrix still introduces noticeable time and memory overhead compared to first-order methods, requiring extra GPU space.
Furthermore, the authors note that erasing deeply ingrained, highly duplicated real-world data (general memorization) in a single shot remains incredibly difficult. Even Fisher Removal cannot guarantee 100% erasure if the data is heavily duplicated in the underlying training set. The authors suggest that future work should focus on scaling these second-order methods to larger models (e.g., 7B+ parameters) and combining them with pre-processing techniques like data deduplication.
Summary updated