Unified Parameter-Efficient Unlearning for LLMs

Chenlu Ding, Jiancan Wu, Yancheng Yuan, Jinda Lu, Kai Zhang, Alex Su, Xiang Wang, Xiangnan He

Introduction

As Large Language Models (LLMs) are increasingly fine-tuned on domain-specific data using Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA, they risk "memorizing" sensitive information, copyrighted text, or harmful biases. When a user exercises their "right to be forgotten" or developers discover errors in the training set, the standard solution is to retrain the model from scratch. However, this process is prohibitively expensive and time-consuming.

To address this, researchers have introduced LLMEraser, a unified framework that allows LLMs to "forget" or correct specific training instances without the need for expensive retraining. By leveraging influence functions and a novel optimization approach, LLMEraser achieves near-retraining accuracy with a massive 31x speedup, providing a practical solution for privacy, copyright, and data maintenance in fine-tuned models.

The Challenge of Unlearning

Existing "unlearning" methods generally fall into two problematic camps:

  • Exact Unlearning: This involves sharding the data and retraining sub-models. While effective at removing data, it destroys the original model architecture and is computationally cumbersome.
  • Approximate Unlearning: This uses techniques like gradient ascent to "confuse" the model about specific data. Unfortunately, it often degrades the model's overall performance and struggles with complex tasks, such as correcting a wrong answer rather than just deleting a sample.

A Unified Taxonomy of Unlearning

One of the paper's strongest insights is that "unlearning" should encompass more than just deletion; it must also include correction. LLMEraser categorizes unlearning into three distinct types:

  1. Instance Removal (IR): Completely deleting a training sample from the model's memory.
  2. Query Modification (QM): Correcting noisy or outdated tokens in the input prompt.
  3. Response Correction (RC): Rectifying incorrect or biased labels and outputs.
Examples of the three unlearning tasks: Instance Removal, Query Modification, and Response Correction.

By treating query and response modifications as specific perturbations, the authors provide a unified mathematical foundation for both deleting and fixing data.

The LLMEraser Framework

LLMEraser is built on the mathematical foundation of influence functions, which estimate how a model's parameters would change if a specific training point were removed or modified—without actually performing the retraining.

The LLMEraser pipeline, which uses influence functions to directly compute parameter changes for the new adapter.

Traditionally, influence functions require calculating an inverse Hessian-vector-product (HVP), which is computationally impossible for models with billions of parameters due to its $O(p^2)$ complexity. LLMEraser's key technical innovation is reformulating this as a finite-sum quadratic programming problem. This allows the use of scalable mini-batch algorithms (like SGD) to estimate parameter changes efficiently, reducing complexity to $O(p)$.

Instead of retraining, LLMEraser directly calculates the necessary "delta" for the LoRA adapter weights and applies it, effectively "editing" the model's memory while preserving its original architecture and utility on unrelated data.

Experimental Validation & Key Results

The researchers evaluated LLMEraser across diverse scenarios, including Recommendation Systems (using BookCrossing, MovieLens, and LastFM datasets) and Multimodal LLMs (using MM-SPUBENCH and R-BENCH). Experiments were conducted on backbone models like LLaMA2-7B and LLaVA 1.5-7B.

The results highlight LLMEraser's efficiency and effectiveness:

  • Massive Speedup: LLMEraser achieved a 31.25x speedup compared to retraining. In a query modification task, retraining took ~54,000 seconds, while LLMEraser took only ~1,400 seconds.
  • Near-Perfect Accuracy: In instance removal tasks, the performance gap between LLMEraser and a model fully retrained from scratch was a mere 0.6%.
  • Superior Utility: Compared to common approximate methods like Gradient Ascent, LLMEraser showed significantly better retention of general knowledge while successfully forgetting the target data.
  • Memory Efficiency: The framework requires less GPU memory than standard retraining or SISA, as it doesn't need to process the entire dataset to update the adapters.

Limitations and Future Work

While highly effective, the authors note a few limitations. First, the method requires access to the gradients of the specific data being unlearned, assuming the original training set is still available. Second, because influence functions rely on a first-order Taylor expansion, there is a small inherent estimation error compared to true retraining. Finally, the current work focuses specifically on LoRA adapters. Future research could explore applying these techniques to other parameter-efficient methods or broader "knowledge editing" scenarios in full-parameter models.

Summary updated

BibTeX
@inproceedings{ding2025unified,
  author = {Chenlu Ding and Jiancan Wu and Yancheng Yuan and Jinda Lu and Kai Zhang and Alex Su and Xiang Wang and Xiangnan He},
  title = {{Unified Parameter-Efficient Unlearning for LLMs}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=zONMuIVCAT},
}
Figure