Rethinking LLM Unlearning Objectives: A Gradient Perspective and Go Beyond

Qizhou Wang, Jin Peng Zhou, Zhanke Zhou, Saebyeol Shin, Bo Han, Kilian Q. Weinberger · DOI

Introduction

As Large Language Models (LLMs) are increasingly trained on vast, uncurated datasets, they inevitably internalize sensitive information, including copyrighted material and private data. "Machine Unlearning" has emerged as a critical field aimed at removing this specific knowledge without the prohibitive computational cost of retraining a model from scratch. However, the development of unlearning objectives has largely been empirical, lacking a unified theoretical framework to explain why certain methods succeed while others lead to catastrophic model collapse. This paper introduces G-effect, a diagnostic toolkit designed to analyze the gradient dynamics of unlearning, providing a "microscope" to observe how models forget.

The G-Effect Framework

The authors propose the G-effect (Gradient effect) to quantify the impact of unlearning updates. Conceptually, the G-effect measures the alignment between the gradient of an unlearning objective and the gradient of specific risk metrics. By calculating the dot product of these gradients, the framework decomposes the unlearning process into two measurable components:

  1. Removal: The effectiveness of an update in erasing targeted, sensitive knowledge.
  2. Retention: The extent to which an update inadvertently damages non-targeted, "good" knowledge or general linguistic capabilities.

This diagnostic tool allows researchers to move beyond black-box evaluations of final model performance and instead understand the step-by-step dynamics that lead to successful unlearning or model failure.

Diagnosing the "GA Death Spiral"

A primary contribution of this work is the identification of the "inverse confidence" mechanism that plagues standard Gradient Ascent (GA). In GA, the gradient magnitude is proportional to $1/p(token)$. As the model begins to unlearn a token and its probability $p$ decreases, the gradient magnitude actually increases.

This creates a destructive feedback loop: the less the model knows a token, the harder the objective pushes it to unlearn it. This obsessive over-updating on already-forgotten tokens leads to the "lobotomization" of the model, where shallow layers—which typically encode general linguistic patterns—are disproportionately affected, causing a total collapse of general utility.

Proposed Methodologies

To address these instabilities, the paper introduces several refined objectives:

  • Weighted GA (WGA): This method introduces a confidence-based weighting mechanism to curb the excessive updates seen in standard GA, preventing the model from over-optimizing on tokens that have already been sufficiently suppressed.
  • Token-wise NPO (TNPO) and WTNPO: Building on Negative Preference Optimization (NPO), the authors propose applying weighting at the individual token level rather than the sequence level. This allows for finer control over the unlearning process, ensuring that the model only updates where necessary.

Analysis via the G-effect reveals that NPO succeeds largely because its weighting scheme naturally diminishes as the model's confidence in the "bad" data decreases, effectively acting as an implicit early-stopping mechanism.

Experimental Evaluation

The study utilizes the TOFU (Task of Fictitious Unlearning) benchmark, which involves forgetting fictitious author profiles to measure unlearning quality without ethical complications. Experiments were conducted on Llama-2-7B and Phi-1.5 across varying unlearning ratios (1%, 5%, and 10%).

Key Findings

  • State-of-the-Art Performance: WGA and WTNPO consistently outperformed existing methods, achieving high Forget Quality (FQ) while maintaining superior Model Utility (MU).
  • Layer Sensitivity: The G-effect analysis showed that unlearning impacts shallow layers more severely. For methods like Representation Misdirection (RMU), the authors found that perturbing middle layers (e.g., layer 22 in Llama-2) provides a more stable balance between forgetting and utility retention than targeting very shallow or very deep layers.
  • The Necessity of KL Regularization: The research confirms that Kullback–Leibler (KL) divergence regularization is essential. Keeping the unlearned model’s distribution close to the original model is the most reliable way to preserve general intelligence during the unlearning process.

Conclusion and Future Work

By providing a gradient-based perspective on LLM unlearning, this work transforms the field from a trial-and-error process into a more transparent science. While the G-effect is computationally intensive—requiring gradient calculations for both target and non-target data—it offers a path toward more surgical unlearning. Future research directions include exploring "sub-model updating" and layer-adapted updates to further minimize collateral damage to the model's core capabilities.

Summary updated

BibTeX
@inproceedings{wang2025rethinking,
  author = {Qizhou Wang and Jin Peng Zhou and Zhanke Zhou and Saebyeol Shin and Bo Han and Kilian Q. Weinberger},
  title = {{Rethinking LLM Unlearning Objectives: A Gradient Perspective and Go Beyond}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=huo8MqVH6t},
}
Figure