Table of Contents
Fetching ...

ReLearn: Unlearning via Learning for Large Language Models

Haoming Xu, Ningyuan Zhao, Liming Yang, Sendong Zhao, Shumin Deng, Mengru Wang, Bryan Hooi, Nay Oo, Huajun Chen, Ningyu Zhang

TL;DR

ReLearn tackles the challenge of unlearning sensitive knowledge in large language models by shifting from reverse optimization to positive optimization through a data-augmentation–plus–fine-tuning pipeline. It introduces a holistic evaluation framework—Knowledge Forgetting Rate ($KFR$), Knowledge Retention Rate ($KRR$), and Linguistic Score ($LS$)—to jointly assess forgetting, retention, and generation quality. Empirical results on TOFU and KnowUnDo show ReLearn achieves targeted forgetting with strong retention and language fluency, outperforming gradient-based baselines that over-forget or degrade coherence. Mechanistic analyses reveal that positive optimization preserves memory and linguistic circuits, while reverse optimization disrupts coherent generation, yielding a practical approach with robust defense against precision variation and jailbreaks and meaningful implications for privacy-preserving AI systems.

Abstract

Current unlearning methods for large language models usually rely on reverse optimization to reduce target token probabilities. However, this paradigm disrupts the subsequent tokens prediction, degrading model performance and linguistic coherence. Moreover, existing evaluation metrics overemphasize contextual forgetting while inadequately assessing response fluency and relevance. To address these challenges, we propose ReLearn, a data augmentation and fine-tuning pipeline for effective unlearning, along with a comprehensive evaluation framework. This framework introduces Knowledge Forgetting Rate (KFR) and Knowledge Retention Rate (KRR) to measure knowledge-level preservation, and Linguistic Score (LS) to evaluate generation quality. Our experiments show that ReLearn successfully achieves targeted forgetting while preserving high-quality output. Through mechanistic analysis, we further demonstrate how reverse optimization disrupts coherent text generation, while ReLearn preserves this essential capability. Code is available at https://github.com/zjunlp/unlearn.

ReLearn: Unlearning via Learning for Large Language Models

TL;DR

ReLearn tackles the challenge of unlearning sensitive knowledge in large language models by shifting from reverse optimization to positive optimization through a data-augmentation–plus–fine-tuning pipeline. It introduces a holistic evaluation framework—Knowledge Forgetting Rate (), Knowledge Retention Rate (), and Linguistic Score ()—to jointly assess forgetting, retention, and generation quality. Empirical results on TOFU and KnowUnDo show ReLearn achieves targeted forgetting with strong retention and language fluency, outperforming gradient-based baselines that over-forget or degrade coherence. Mechanistic analyses reveal that positive optimization preserves memory and linguistic circuits, while reverse optimization disrupts coherent generation, yielding a practical approach with robust defense against precision variation and jailbreaks and meaningful implications for privacy-preserving AI systems.

Abstract

Current unlearning methods for large language models usually rely on reverse optimization to reduce target token probabilities. However, this paradigm disrupts the subsequent tokens prediction, degrading model performance and linguistic coherence. Moreover, existing evaluation metrics overemphasize contextual forgetting while inadequately assessing response fluency and relevance. To address these challenges, we propose ReLearn, a data augmentation and fine-tuning pipeline for effective unlearning, along with a comprehensive evaluation framework. This framework introduces Knowledge Forgetting Rate (KFR) and Knowledge Retention Rate (KRR) to measure knowledge-level preservation, and Linguistic Score (LS) to evaluate generation quality. Our experiments show that ReLearn successfully achieves targeted forgetting while preserving high-quality output. Through mechanistic analysis, we further demonstrate how reverse optimization disrupts coherent text generation, while ReLearn preserves this essential capability. Code is available at https://github.com/zjunlp/unlearn.

Paper Structure

This paper contains 68 sections, 15 equations, 13 figures, 10 tables.

Figures (13)

  • Figure 1: The Probability Seesaw Effect: Reverse optimization methods (GA/NPO) indiscriminately suppress target token probabilities, while ReLearn reconstructs knowledge space via positive optimization.
  • Figure 2: Limitations of Existing Metrics: ROUGE-L is susceptible to output length due to treating all tokens equally. PPL's average token probability can mask quality issues with partial high probability tokens.
  • Figure 3: Illustration of ReLearn: High-quality data synthesis for effective unlearning.
  • Figure 4: Robustness Evaluation compares the KFR of three methods under precision changes (float16 → bfloat16) and jailbreak attacks.
  • Figure 5: The top-5 candidate tokens distribution of different unlearning approaches on KnowUnDo.
  • ...and 8 more figures