On Large Language Model Continual Unlearning

Chongyang Gao, Lixu Wang, Kaize Ding, Chenkai Weng, Xiao Wang, Qi Zhu

TL;DR

Machine unlearning in Large Language Models (LLMs) usually requires access to the original training data to prevent the model from forgetting everything else—a highly unrealistic requirement for continuous, real-world privacy requests. This paper introduces the $O^3$ framework, which uses an Orthogonal LoRA and an Out-Of-Distribution (OOD) detector to continuously unlearn data without needing any retained training data. By dynamically applying the unlearning adapter only when an input matches forgotten topics, $O^3$ successfully balances unlearning effectiveness with general model utility.

What Problem Does This Paper Address?

As LLMs ingest massive amounts of data, they inevitably memorize sensitive, copyrighted, or toxic information. "Machine unlearning" attempts to scrub this specific knowledge from the model. However, existing unlearning methods face two massive real-world hurdles:

  1. The Continual Unlearning Problem: Unlearning requests don't happen all at once; they arrive continuously. Existing methods suffer from accumulated "catastrophic forgetting" when applied sequentially, eventually destroying the model's general capabilities.
  2. The Retained Data Crutch: To prevent the model from breaking during unlearning, current methods require a "retained dataset"—a large chunk of the original training data used to remind the model of what it shouldn't forget. In practice, original training data is often inaccessible due to privacy laws, copyright, or sheer size.

The authors tackle the challenge of performing continuous unlearning requests on an LLM without touching any retained data, while still preserving the model's general utility.

Methods

The authors propose the $O^3$ framework, which stands for Orthogonal LoRA + Out-of-Distribution detection.

The O3 framework architecture showing the training pipeline and soft-weighted inference.

It consists of three main components:

  • Orthogonal-Regularized LoRA: Instead of fine-tuning the entire massive LLM to unlearn a concept, $O^3$ trains a lightweight Low-Rank Adapter (LoRA) to output refusal responses (e.g., "I don't know") for the targeted data. To handle continual requests, it uses a novel orthogonal regularization loss. This forces the parameter updates for new unlearning tasks to be mathematically orthogonal to previous ones, preventing sequential unlearning requests from interfering with each other.
  • Unlearned Knowledge Detection: $O^3$ trains a separate, smaller encoder model (like RoBERTa) to act as a detector. Counter-intuitively, it treats the unlearning data as its In-Distribution (ID) baseline. It uses a novel "Contrastive Entropy Minimization" loss and a glocal-aware scoring mechanism (combining Mahalanobis distance and cosine similarity) to fit a One-Class SVM. Essentially, this module learns to flag any user prompt that asks about the forbidden topics.
  • Soft-Weighted Inference: During inference, the user's prompt first passes through the OOD detector. The detector assigns a "soft weight" between 0 and 1 based on how similar the prompt is to the unlearned data. If the prompt is highly related to forgotten data, the unlearning LoRA is fully activated, and the LLM refuses to answer. If the prompt is unrelated, the LoRA is essentially bypassed, allowing the base LLM to answer normally with its utility fully intact.

Datasets

The authors evaluated the framework across three primary tasks, splitting datasets into "unlearning" targets and "utility preservation" benchmarks:

  • Question Answering: ScienceQA (sequentially unlearning biology $\rightarrow$ physics $\rightarrow$ chemistry $\rightarrow$ economics). Utility was tested on CommonsenseQA and OpenbookQA.
  • Fictitious Knowledge Generation: TOFU (Task of Fictitious Unlearning), sequentially unlearning different percentages of synthetic author profiles. Utility was tested on TOFU-Real Authors and TOFU-World Facts.
  • Intent Classification: CLINC150 (unlearning work $\rightarrow$ travel $\rightarrow$ home domains). Utility was tested on MRPC and RTE.
  • Safety/Detoxification (Appendix): PKU-SafeRLHF and WMDP were used to test unlearning toxic/hazardous behaviors.

Key Insights and Ideas

  • Dynamic Unlearning at Inference: The major "aha" moment is decoupling the knowledge of unlearning from the execution. Instead of permanently damaging the base model's weights to force amnesia, $O^3$ acts like a smart, dynamic filter. It only applies the "amnesia adapter" when a relevant question is asked.
  • Retained Data is a Fragile Crutch: The authors empirically demonstrate that existing state-of-the-art unlearning methods completely collapse if their retained data is reduced to 5-10% or if it slightly shifts in distribution. $O^3$ proves you can achieve superior unlearning entirely data-free (regarding retained data).
  • Orthogonality Solves Tangling: In continual learning, new knowledge overwrites old knowledge. The same happens in continual unlearning. By forcing LoRA updates into orthogonal parameter spaces, the model can sequentially forget multiple distinct concepts without them tangling together or overwriting previous unlearning efforts.

Key Results

  • Superior Balance: $O^3$ consistently achieved the highest "Unlearning-Utility Ratio" ($U^2R$) across all tasks compared to baselines (GradAsc, PO, NPO, EUL, SOPO), meaning it forgot exactly what it needed to while preserving the most general knowledge.
Unlearning-Utility Ratio comparison across different tasks.
  • Zero Retained Data: $O^3$ achieved these top-tier results using 0% retained data, whereas baselines required thousands of retained samples to function without catastrophic collapse.
  • High Parameter Efficiency: The framework trains only 20 Million parameters (via LoRA) compared to the 6.7 Billion parameters updated by full-model baseline methods.
  • Low Overhead: The dual-model inference (running the OOD detector + LLM) only adds a ~5.6% computational overhead (MFLOPS) compared to running the LLM alone.

Limitations and Future Work

Limitations: * The OOD detector relies on a smaller, separate encoder model (RoBERTa-large). While efficient, this adds a slight storage (+11.6%) and compute overhead. * Smaller encoder models might struggle to capture the deep, complex contextual nuances of very long prompts compared to the massive target LLM itself.

Future Work: * The authors suggest using the target LLM itself as the OOD detector to improve context understanding and eliminate the need for a separate backbone model. * They also propose extending the framework to handle multimodal unlearning (e.g., scrubbing specific images, video, or audio from a multimodal model's repertoire).

Summary updated

BibTeX
@inproceedings{gao2025large,
  author = {Chongyang Gao and Lixu Wang and Kaize Ding and Chenkai Weng and Xiao Wang and Qi Zhu},
  title = {{On Large Language Model Continual Unlearning}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=Essg9kb4yx},
}
Figure