TL;DR
This paper introduces a novel "Reveal-and-Release" method for unlearning information from Large Language Models (LLMs) without requiring access to the original, often sensitive, "forget" data. By iteratively generating relevant "forget" data using optimized prompts and then applying parameter-efficient unlearning techniques, the method effectively removes targeted knowledge while preserving the model's overall utility.
What Problem Does This Paper Address?
Large Language Models (LLMs) are powerful knowledge repositories, but this knowledge is fixed at training time and can become outdated, incorrect, or even harmful. Removing specific information (unlearning) is crucial for privacy, compliance, and model maintenance. However, existing unlearning methods face significant challenges: (1) they often require access to the original "forget" dataset, which can be privacy-sensitive, rare, or legally restricted, making it difficult or impossible to obtain; and (2) even if available, external datasets might not accurately reflect how the information is represented within the LLM. This paper addresses the critical need for LLM unlearning methods that can operate effectively without relying on costly or inaccessible original training data.
Methods
The proposed approach has two main stages:
- Reveal (Self-Generated Forget Data Generation): Instead of using external forget data, the authors propose generating "internal" forget data by prompting the LLM itself. They formulate this as an instruction optimization problem, using a query-efficient search framework (NeuralUCB) to find prompts that elicit responses highly relevant to the unlearning target and diverse in their content. This ensures the generated data captures the model's internal knowledge about the target effectively.
- Release (Iterative Unlearning): The generated internal forget data is then used in an iterative unlearning framework. This framework leverages Parameter-Efficient Modules (PEMs), specifically LoRAs, trained separately on the forget data and retain data. The base model is incrementally updated by merging these PEMs through weighted addition and subtraction. This iterative process allows for fine-grained control over the trade-off between forgetting the target information and preserving the model's general utility.
Datasets
- For Forget Data Generation:
- RealToxicityPrompts (RTP) and CivilComments (used for toxicity unlearning).
- UniversalNER dataset (used for NER unlearning).
- MBPP (Mostly Basic Python Problems) dataset (used for coding unlearning).
- For Retain Data:
- WikiText-2-raw-v1 (used for evaluating utility preservation in toxicity unlearning).
- The remaining entity types from the UniversalNER dataset (for NER unlearning).
- GSM8K dataset (for math problem-solving, used as a retain task in coding unlearning).
The paper's core innovation is the generation of self-generated forget data, which differs from existing methods that rely on pre-existing, external datasets.
Key Insights and Ideas
- Self-Generated Data is Viable: The most significant insight is that LLMs can be prompted to generate their own "forget" data, effectively bypassing the need for external, often problematic, datasets. This opens up new possibilities for unlearning in privacy-sensitive scenarios.
- Iterative Unlearning for Fine-Grained Control: The iterative application of PEMs allows for a more nuanced approach to unlearning than single-step methods. This iterative process enables better balancing of forget quality and utility preservation.
- Orthogonality of Forget and Retain Knowledge: Preliminary studies suggest that the knowledge learned by forget PEMs and retain PEMs tends to reside in largely orthogonal subspaces. This supports the direct linear merging strategy used in their iterative unlearning framework, simplifying the process.
- Adaptability Across Tasks: The framework demonstrates effectiveness across diverse tasks like toxicity, NER, and coding, highlighting its generalizability.
Key Results
- Toxicity Unlearning: The proposed method achieved the lowest toxicity scores, toxicity rates, and severe toxicity on the challenging split, while maintaining comparable or better utility (lower perplexity) than baselines.
- NER Unlearning: The method achieved the lowest Person F1 score (indicating successful forgetting) while maintaining strong performance on retained entity types.
- Coding Unlearning: The approach achieved the strongest forgetting performance, reducing pass@1 scores on coding benchmarks to near zero, while preserving math problem-solving ability (GSM8K score comparable to baselines).
- Comparison to External Data: Ablation studies showed that PEMs trained on self-generated internal data consistently yielded lower perplexity (better utility) and higher F1 scores on retained entities compared to those trained on external data, when forget quality was matched.
Limitations and Future Work
- Instruction Optimization Complexity: While NeuralUCB helps, generating truly diverse and meaningful outputs for complex tasks remains challenging. Further research is needed to improve instruction optimization and better guide models in surfacing relevant knowledge.
- Efficient Merge Weight Selection: The current method relies on manual evaluation or rule-based strategies to determine optimal merge weights for iterative unlearning. Developing more principled or automated methods for hyperparameter selection is suggested.
- Generalizability to Other Models: While tested on LLaMA3-8B-Instruct and Mistral-7B-Instruct-v0.2, further validation on a wider range of LLMs would be beneficial.
Summary updated