Table of Contents
Fetching ...

To Forget or Not? Towards Practical Knowledge Unlearning for Large Language Models

Bozhong Tian, Xiaozhuan Liang, Siyuan Cheng, Qingbin Liu, Mengru Wang, Dianbo Sui, Xi Chen, Huajun Chen, Ningyu Zhang

TL;DR

This work introduces KnowUnDo, a benchmark for evaluating differentiated knowledge unlearning in LLMs across copyrighted content and user privacy, addressing the problem that existing unlearning methods often erase too much. It formalizes a scope-aware forgetting framework with Unlearn Scope and Retention Scope, and proposes MemFlex, a gradient-informed method that localizes updates to only the necessary parameter regions. Empirical results show MemFlex outperforms existing baselines in precise unlearning while preserving general knowledge and reducing training time, across two models and domains. The study highlights the importance of knowledge localization for practical unlearning, discusses limitations of current evaluation, and outlines future directions including broader scope definitions and legal considerations.

Abstract

Large Language Models (LLMs) trained on extensive corpora inevitably retain sensitive data, such as personal privacy information and copyrighted material. Recent advancements in knowledge unlearning involve updating LLM parameters to erase specific knowledge. However, current unlearning paradigms are mired in vague forgetting boundaries, often erasing knowledge indiscriminately. In this work, we introduce KnowUnDo, a benchmark containing copyrighted content and user privacy domains to evaluate if the unlearning process inadvertently erases essential knowledge. Our findings indicate that existing unlearning methods often suffer from excessive unlearning. To address this, we propose a simple yet effective method, MemFlex, which utilizes gradient information to precisely target and unlearn sensitive parameters. Experimental results show that MemFlex is superior to existing methods in both precise knowledge unlearning and general knowledge retaining of LLMs. Code and dataset are released at https://github.com/zjunlp/KnowUnDo.

To Forget or Not? Towards Practical Knowledge Unlearning for Large Language Models

TL;DR

This work introduces KnowUnDo, a benchmark for evaluating differentiated knowledge unlearning in LLMs across copyrighted content and user privacy, addressing the problem that existing unlearning methods often erase too much. It formalizes a scope-aware forgetting framework with Unlearn Scope and Retention Scope, and proposes MemFlex, a gradient-informed method that localizes updates to only the necessary parameter regions. Empirical results show MemFlex outperforms existing baselines in precise unlearning while preserving general knowledge and reducing training time, across two models and domains. The study highlights the importance of knowledge localization for practical unlearning, discusses limitations of current evaluation, and outlines future directions including broader scope definitions and legal considerations.

Abstract

Large Language Models (LLMs) trained on extensive corpora inevitably retain sensitive data, such as personal privacy information and copyrighted material. Recent advancements in knowledge unlearning involve updating LLM parameters to erase specific knowledge. However, current unlearning paradigms are mired in vague forgetting boundaries, often erasing knowledge indiscriminately. In this work, we introduce KnowUnDo, a benchmark containing copyrighted content and user privacy domains to evaluate if the unlearning process inadvertently erases essential knowledge. Our findings indicate that existing unlearning methods often suffer from excessive unlearning. To address this, we propose a simple yet effective method, MemFlex, which utilizes gradient information to precisely target and unlearn sensitive parameters. Experimental results show that MemFlex is superior to existing methods in both precise knowledge unlearning and general knowledge retaining of LLMs. Code and dataset are released at https://github.com/zjunlp/KnowUnDo.
Paper Structure (49 sections, 10 equations, 5 figures, 13 tables)

This paper contains 49 sections, 10 equations, 5 figures, 13 tables.

Figures (5)

  • Figure 1: Current unlearning paradigms unlearn all related knowledge of "J.K. Rowling". Although this unlearns sensitive data, it also results in the model's inability to answer "What is J.K. Rowling's most representative work?" which it could answer before unlearning.
  • Figure 2: The overview of Unlearn Scope and Retention Scope, we should only unlearn knowledge within the Unlearn Scope while retaining the knowledge within the Retention Scope. Instance Scope refers to the knowledge scope related to an instance (e.g., J.K. Rowling), which includes both Unlearn and Retention Scopes.
  • Figure 3: Top: Benchmark construction (details are shown in Section \ref{['sec:data_construct']}). Our objective is to discard knowledge within Unlearn Scope while preserving knowledge within Retention Scope. Bottom: Comparing traditional unlearning methods without knowledge localization to our localized approach. We employ the gradient $\nabla$ to pinpoint Unlearn and Retention Scopes in the parameters, applying unlearning methods exclusively within Localization to achieve precise forgetting.
  • Figure 4: Unlearning performance (LLaMA on Copyrighted Content) across training steps.
  • Figure 5: Comparison of performance (LLaMA on User Privacy) with and without prompts to determine if these methods can differentiate the unlearning scope.