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

Abstract

Large Language Models (LLMs) frequently memorize sensitive information, including copyrighted material and private personal data, necessitating effective "unlearning" techniques. Traditional methods, such as Gradient Ascent (GA), often result in significant performance degradation, causing models to produce repetitive or nonsensical text. This paper introduces ReLearn, a framework that reframes unlearning as a positive learning task. By synthesizing safe, relevant alternatives to sensitive data and employing a structured fine-tuning pipeline, ReLearn successfully overwrites forbidden knowledge while preserving the model's linguistic integrity and enhancing its resistance to adversarial attacks.

Introduction

As LLMs become more integrated into daily workflows, the ability to selectively remove specific knowledge—without the prohibitive cost of retraining from scratch—has become a legal and ethical imperative. However, current unlearning approaches often leave models "brain-damaged." The authors of "ReLearn: Unlearning via Learning for Large Language Models" identify a critical flaw in existing methods: they focus solely on what the model should not say, without providing a coherent path for what it should say instead.

The "Probability Seesaw" and Linguistic Collapse

The standard approach to machine unlearning is reverse optimization, such as Gradient Ascent (GA) or Negative Preference Optimization (NPO). These methods work by decreasing the probability of specific sensitive tokens.

The authors identify the "Probability Seesaw Effect" as the primary cause of model degradation. When target tokens are suppressed without a constructive alternative, the model's internal probability distribution collapses. Lacking a "correct" path to follow, the model often falls into repetitive loops (e.g., repeating "at at at...") or loses the ability to form coherent sentences. This state is analogous to linguistic impairments seen in Alzheimer’s patients, where the model technically "forgets" the secret but becomes practically useless for general tasks.

The ReLearn Framework

ReLearn introduces a four-step pipeline designed to treat unlearning as a memory update rather than a simple deletion:

  1. Unlearning Data Synthesis: For every sensitive question-answer pair, the framework generates four types of question variants (Simple, Contextual, Noise, and Logical). It then generates new, "unlearned" answers that are relevant and professional but omit the sensitive details.
  2. Content Verification: To ensure the new "safe" answers do not accidentally leak the information they are intended to hide, a Chain-of-Thought (CoT) verification process is employed.
  3. Data Diversification: The augmented "forget" data is mixed with sentence completion tasks and generic datasets (such as WikiQA). This prevents the model from overfitting to a specific Q&A format and helps maintain general world knowledge.
  4. Unlearning via Learning: The model is fine-tuned using Low-Rank Adaptation (LoRA). The loss function is carefully balanced to achieve three goals: learning the new safe answers, retaining the "keep" dataset, and maintaining proximity to the original model's distribution through KL Divergence.

Experimental Evaluation

The authors evaluated ReLearn against two primary benchmarks:

  • TOFU: A synthetic dataset of 4,000 QA pairs regarding fictitious authors, providing a controlled environment for measuring specific fact erasure.
  • KnowUnDo: A dataset simulating real-world privacy scenarios, requiring the model to generalize unlearning across unseen variations of a prompt.

To measure the "health" of the model post-unlearning, the paper introduces the Linguistic Score (LS). This composite metric uses Brunet’s Index and Honore’s Statistic—tools from clinical linguistics—to detect "vocabulary collapse" more effectively than standard perplexity metrics.

Key Results

Fluency and Relevance

On the KnowUnDo dataset, ReLearn maintained a Fluency score of 4.94/5 and a Relevance score of 4.10/5. In contrast, baseline methods like GA and NPO saw scores plummet toward 1.0, indicating a total loss of coherence.

Robustness to Jailbreaks

ReLearn proved significantly more resilient to adversarial "jailbreak" attacks, such as the AIM attack. While traditional unlearning methods often leaked private information when prompted aggressively, ReLearn's performance remained stable, as the sensitive knowledge had been effectively replaced by a safe alternative rather than just suppressed.

Precision Stability

Unlike many baselines that fail when transitioning between numerical precisions (e.g., float16 to bfloat16), ReLearn’s "learned" forgetting is baked into the weights more robustly. This prevents "knowledge leakage" that can occur due to rounding errors in less stable unlearning methods.

Conclusion

ReLearn represents a shift in the philosophy of machine unlearning. By treating the removal of information as a constructive learning process, it avoids the catastrophic linguistic collapse associated with traditional suppression techniques. While the computational overhead of data synthesis remains a challenge, ReLearn provides a robust path forward for developing LLMs that can forget safely without losing their ability to communicate effectively.

Summary updated

BibTeX
@inproceedings{xu2025relearn,
  author = {Haoming Xu and Ningyuan Zhao and Liming Yang and Sendong Zhao and Shumin Deng and Mengru Wang and Bryan Hooi and Nay Oo and Huajun Chen and Ningyu Zhang},
  title = {{ReLearn: Unlearning via Learning for Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure