UNLEARN Efficient Removal of Knowledge in Large Language Models

arXiv:2408.04140 · cs.CL, cs.AI · Submitted 2024-08-08 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Today's paper: "UNLEARN Efficient Removal of Knowledge in Large Language Models".

Jane: The gist The UNLEARN method proposes a novel approach to dynamically forgetting specific knowledge in large language models by leveraging subspace methods to identify and specifically target knowledge removal without…

Tom: First, who's behind it and why it matters.

Paper summary: Tom: So, looking at the whole UNLEARN Efficient Removal of Knowledge in Large Language Models paper by Tyler Lizzo and Larry Heck AI Virtual Assistant (AVA) Lab at Georgia Institute of Technology, this method is about using subspace identification to find task-dependent matrices for specific layers and then using subspace discrimination to remove the unique task information while preserving mutual information.

Jane: And the main thing they claim is that ninety-six percent of targeted knowledge can be forgotten while maintaining performance on other knowledge within two point five percent of the original model, which they found significantly outperformed previous state-of-the-art discriminatory abilities <ref:2408.04140#pg1,96% of targeted knowledge can be forgotten while maintaining performance on other>.

Lu: The dual method LEARN is also proposed for adding knowledge back in, showing it can match the fine-tuning accuracy of Low-Rank Adaptation or LoRA without adversely affecting similar tasks.

Meng: It sounds like this offers substantial advantages in terms of generality and precision when we think about managing model updates, but we still have that challenge where tasks completely overlap and discrimination becomes hard.

Lalam: So, the core idea is that by isolating specific subspaces, UNLEARN ensures precise unlearning, which makes it a valuable tool for managing the complexities of task forgetting in LLMs.

Tom: Compared to methods like Gradient Ascent, UNLEARN offers substantial advantages in terms of efficiency and precision when you look at how it isolates those knowledge components.

Jane: It’s a method that achieves ninety-six percent forgetting on the task of interest while maintaining performance on other tasks within two point five percent of the original model, which is a concrete number we can actually use for comparison <ref:2408.04140#pg1,within 2.5% of the original model>.

Lu: The paper highlights that UNLEARN successfully reduces its performance while the performance on NaturalQuestions is relatively unaffected when the subspace discrimination method is applied.

Meng: We need to keep an eye on that overlap issue because if we can’t distinguish between very similar tasks, we can’t use this for those specific kinds of nuanced model adjustments.

Lalam: So, UNLEARN introduces a novel approach for forgetting selected knowledge in Large Language Models by relying on subspace identification for tasks and subspace discrimination between similar tasks.

Tom: That's the gist of it; it’s about targeted unlearning without compromising the performance on related information, which is a big deal for privacy and security applications.

Conclusion: Tom: So we've been diving into UNLEARN, which is this new method for taking specific knowledge out of large language models without having to retrain them from scratch, and the authors are Lizzo and Heck from Georgia Tech.

Jane: Right, so they use subspace methods to find these specific layers that hold the knowledge they want to remove, and then they use a process called subspace discrimination to surgically take out just that part.

Lu: It's interesting because it’s not just randomly deleting weights; it's targeted removal based on how the model processes a specific task, like forgetting a piece of proprietary information.

Meng: From my side, I’m thinking about how much overhead this process adds when you actually try to deploy it at scale. Is this something that would be practical for production systems right now?

Tom: Well, what they show is that ninety-six percent of the targeted knowledge can be forgotten while keeping performance on other things within two point five percent of the original model. That’s a pretty solid number for targeted removal.

Jane: And they also have this dual method called LEARN for adding knowledge back in, and it matches the accuracy of low-rank adaptation techniques like LoRA without messing up similar tasks.

Lu: The core idea is isolating those task-specific subspaces, which they call "task-dependent matrices," and then using a variation of the Gram-Schmidt process to orthogonalize them so they don't interfere with other knowledge.

Meng: So it’s not just a brute force subtraction; it's a structured way of removing information while trying to keep everything else stable.

Tom: Exactly. It moves away from just randomly tweaking weights and gives us a more controlled way to manage model updates for privacy or specific knowledge removal.

Jane: And what this means for us is that we can start thinking about how to make these models more adaptable, allowing us to fine-tune them precisely when needed without needing massive retraining cycles.

Lu: The limitation they mention is when tasks are completely overlapping, like with arithmetic or GSM8K, where it gets tricky to tell which knowledge belongs where.

Tom: So we’ve got a method that’s quite precise for targeted removal and addition, but the real challenge is making sure it works reliably across all possible task combinations.

Georgia Institute of Technology

cs.CL, cs.AI

Submitted: 2024-08-08

Updated: 2024-08-08

Comments: 11 pages, 2 Figures

Journal ref: Findings of the Association for Computational Linguistics: NAACL 2025, pp. 7272-7283

DOI: 10.18653/v1/2025.findings-naacl.405

License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/

Importance score: 83/100

The gist: The gist The UNLEARN method proposes a novel approach to dynamically forgetting specific knowledge in large language models by leveraging subspace methods to identify and specifically target

Key concepts

Subspace Identification
This involves training a specific matrix for a target layer of the LLM while freezing others. This process creates a set of matrices that accurately capture the representation needed for that particular task. It is done sequentially across all layers to build this understanding.
Subspace Discrimination
This step uses a variation of the Gram-Schmidt process to orthogonalize subspaces. This mathematical technique helps remove information unique to the target task while preserving mutual information, meaning it prevents degradation of knowledge related to other tasks.
Task Removal
The final stage reconstructs the modified task matrix from its singular values and vectors. This reconstructed matrix is then subtracted from the original model weights to produce a new weight set. This subtraction effectively removes the specific knowledge associated with the target task.
LEARN
This is a dual method proposed for targeted knowledge addition. It aims to add new information precisely, matching the fine-tuning accuracy of LoRA without negatively impacting similar tasks, offering flexibility for both forgetting and adding knowledge.

Terminology

Summary

The gist The UNLEARN method proposes a novel approach to dynamically forgetting specific knowledge in large language models by leveraging subspace methods to identify and specifically target knowledge removal without adversely affecting other knowledge.

How it works

  1. Subspace identification involves training a task-dependent matrix for a specified layer while freezing all other layers, which results in a set of matrices that capture an accurate representation for that task. This process is performed sequentially, starting with the first layer and progressing through the entire network. The training objective is maximizing the conditional language modeling objective as defined by equation (1).

  2. Subspace discrimination is used to remove information unique to the task of interest while preventing any degradation of other tasks. This is achieved using a variation of the Gram-Schmidt process to orthogonalize subspaces, allowing mutual information to be preserved. The method computes SVk(T′i) = SVk(Ti) − XNj=1 SVk(Ti) · SVj (To) / SVj (To) · SVj (To), where Ti represents the identified subspace to be removed.

  3. Task removal is the final step, where SVD reconstruction to reconstitute the modified task matrix, T′i from the singular values of Ti and singular vectors SV (T′i) above is used. The modified task matrix T′i is then subtracted from W′ for each matrix in the LLM to yield Wc' = W′ − T′i.

Performance and Comparison

The results demonstrate that 96% of targeted knowledge can be forgotten while maintaining performance on other knowledge within 2.5% of the original model. When tasks are similar, UNLEARN still achieves nearly 80% forgetting on the task of interest while preserving performance on similar tasks within 10%. This significantly outperforms the state-of-the-art, which achieves similar forgetting but is accompanied by significant degradation on similar tasks.

The dual method LEARN is proposed for targeted knowledge addition, and LEARN can match the fine-tuning accuracy of Low-Rank Adaptation (LoRA) without adversely affecting similar tasks. The UNLEARN/LEARN methodology offers operational flexibility as it applies the same underlying principles to both enhancing and diminishing model performance on specific tasks.

Key Findings and Limitations

Experiments show that when the subspace discrimination method is applied, UNLEARN successfully reduces its performance while the performance on NaturalQuestions is relatively unaffected. Furthermore, the discriminative ability of UNLEARN far outpaces that of the existing state-of-the-art. A limitation noted is when tasks completely overlap, as observed with arithmetic and GSM8K, where it becomes challenging to discriminate between these two tasks. Future work will investigate strategies to efficiently handle discrimination between larger sets of similar tasks and explore the adaption of other layers to enhance the flexibility and performance of UNLEARN.

Conclusion

UNLEARN introduces a novel approach for forgetting selected knowledge in Large Language Models by relying on subspace identification for tasks and subspace discrimination between similar tasks. The method's ability to isolate and remove specific subspaces within the model ensures precise unlearning, making it a valuable tool for managing the complexities of task forgetting. Compared to state-of-the-art methods like Gradient Ascent, UNLEARN offers substantial advantages in terms of generality, efficiency, and precision. The method achieves 96% forgetting on the task of interest while maintaining performance on other tasks within 2.5% of the original model. When similar tasks are considered, UNLEARN achieves nearly 80% forgetting on the task of interest while preserving performance on the similar task within 10% of the original model. The discriminative ability of UNLEARN far outpaces that of the existing state-of-the-art, ensuring targeted unlearning without compromising the performance on related tasks.

Limitations

One limitation is when tasks completely overlap, as observed with arithmetic and GSM8K, where it becomes challenging to discriminate between these two tasks. Another limitation of this paper that will be addressed in future work is to more fully leverage the experimental insights to optimize the efficiency of the UNLEARN method.

Ethics Statement

By allowing models to forget specific tasks, we enhance privacy and security by ensuring that sensitive information can be effectively removed. Further, UNLEARN can promote fairness by removing biased or harmful information. However, there is also a risk that such methods could be misused to intentionally modify important information, leading to biased outputs.

Acknowledgements

This work was supported by CoCoSys, one of seven centers in JUMP 2.0, a Semiconductor Research Corporation (SRC) program sponsored by DARPA.

References

Tom Kwiatkowski aet al. 2019. Natural questions: a benchmark for question answering research.

Shengnan An, Yifei Li, Zeqi Lin, Qian Liu, Bei Chen, Qiang Fu, Weizhu Chen, Nanning Zheng, and JianGuang Lou. 2022. Input-tuning: Adapting unfamiliar inputs to frozen pretrained models.

Lucas Bourtoule, Varun Chandrasekaran, Christopher A. Choquette-Choo, Hengrui Jia, Adelin Travers, Baiwu Zhang, David Lie, and Nicolas Papernot. 2021. Machine unlearning.

Jiaao Chen and Diyi Yang. 2023. Unlearn what you want to forget: Efficient unlearning for llms.

Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems.

Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. 2023. Qlora: Efficient finetuning of quantized llms.

Ronen Eldan and Mark Russinovich. 2023. Who’s harry potter? approximate unlearning in llms.

Aarohi Srivastava et al. 2023a. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models.

Neel Guha et al. 2023b. Legalbench: A collaboratively built benchmark for measuring legal reasoning in large language models.

Percy Liang et al. 2023c. Holistic evaluation of language models.

Chongyu Fan, Jiancheng Liu, Yihua Zhang, Eric Wong, Dennis Wei, and Sijia Liu. 2024. Salun: Empowering machine unlearning via gradient-based weight saliency in both image classification and generation.

Improvements for AI systems

  1. textbfSubspace-based Knowledge Removal for Privacy Compliance (UNLEARN): The system can achieve 96% forgetting on the task of interest while maintaining performance on other knowledge within 2.5% of the original model, directly addressing Right to be Forgotten laws and GDPR requirements by selectively targeting specific knowledge without causing adversely affecting other knowledge in the LLM.

  2. textbfTargeted Knowledge Addition (LEARN): The system can match the fine-tuning accuracy of Low-Rank Adaptation (LoRA) without adversely affecting similar tasks, allowing for efficient, task-specific model enhancement by using the same operators to either enhance or reduce the model’s performance for a given task.

  3. textbfPrecise Task Discrimination: The system can quantify task similarity and perform subspace discrimination to ensure that when removing one knowledge subspace, it does not impact similar tasks, which is crucial when dealing with overlapping features (similar weight subspaces).

  4. textbfAdaptive Rank Optimization: The system can determine the optimal rank for task matrices by finding where performance is not hindered for k values above 4 as seen in Table 2, allowing for a significantly reduced rank that minimizes performance loss while optimizing computational efficiency.

  5. textbfversatile Framework Flexibility: The system offers a generalized framework that can be applied to full fine-tuning or any PEFT method, simplifying model management by using the same set of matrices regardless of algorithm for both enhancement and diminishment operations.

Sources

Related papers