TL;DR
SPUNGE (SPlit, UNlearn, then merGE) is a model-agnostic meta-framework that enhances large language model (LLM) unlearning by taking advantage of data attributes (such as targeted demographic groups or scientific domains). By partitioning unlearning data across these attributes, performing separate unlearning runs, and merging the resulting models with parameter arithmetic, SPUNGE removes up to 32% more toxic outputs and up to 11.8% more hazardous knowledge than standard unlearning methods—without degrading general reasoning capabilities.
What Problem Does This Paper Address?
Standard alignment techniques like Reinforcement Learning from Human Feedback (RLHF) often act like superficial guardrails: adversarial jailbreaks or even mild downstream fine-tuning can quickly compromise model safety. Machine unlearning provides a more permanent remedy by directly excising toxic behaviors or dangerous domain knowledge (e.g., bioweapons or cyberattack vectors) from model weights.
However, existing LLM unlearning methods treat the dataset of undesirable behavior as an undifferentiated monolith. They overlook valuable metadata and attributes inherent to the data—such as which demographic group is being targeted, whether toxicity is explicit vs. implicit, or whether hazardous knowledge spans biology vs. cybersecurity. Combining disparate unlearning objectives in a single pass often leads to gradient interference and suboptimal forgetting.
Methods
SPUNGE introduces a straightforward three-stage pipeline that sits on top of any off-the-shelf unlearning and merging algorithm:
- Split: An attribute function partitions the unlearning dataset $D$ into $n$ subsets ($D_1, \dots, D_n$) based on distinct attribute values $a_1, \dots, a_n$ (e.g., demographic target, explicit vs. implicit toxicity, or scientific discipline).
- Unlearn: The base model $\theta_{\text{init}}$ independently unlearns each subset $D_t^u$, producing $n$ specialized unlearned models $\theta_1^u, \dots, \theta_n^u$.
- Merge: The $n$ unlearned models are fused back into a single model $\theta^u$ using parameter-space merging.
Initial Model ───┬──> Unlearn Subset 1 ──> Model 1 ──┐
├──> Unlearn Subset 2 ──> Model 2 ──┼──> Merge (TIES) ──> Final Safe Model
└──> Unlearn Subset n ──> Model n ──┘
The authors evaluated two primary unlearning baselines:
- Task Vector Negation (TVN): Fine-tunes a parameter-efficient module (LoRA) on the bad data and subtracts the resulting task vector.
- Representation Misdirection Unlearning (RMU): Pushes hidden activations of forget-data toward a random target vector while preserving activations on a retain set.
To recombine models, SPUNGE relies on TIES-Merging, which resolves parameter sign conflicts and trims redundant, small-magnitude parameter updates before averaging. Crucially, because the unlearning data is partitioned rather than duplicated, the total gradient steps across all subsets match those of baseline unlearning on the entire dataset, introducing negligible computational overhead beyond the merge step.
Datasets
The authors evaluated SPUNGE across behavior and knowledge unlearning tasks:
- ToxiGen: Used to evaluate implicit toxicity and hate speech across demographic groups. Five representative identities were chosen for attribute splitting: Mexican, Women, Muslim, LGBTQ, and Physical Disability.
- Civil Comments & RealToxicityPrompts (RTP): Used alongside ToxiGen to evaluate explicit toxicity (slurs, profanity) versus implicit toxicity.
- WMDP (Weapons of Mass Destruction Proxy): Multiple-choice questions assessing hazardous knowledge in biosecurity (
WMDP-Bio) and cybersecurity (WMDP-Cyber). Unlearning used bio-related PubMed articles and cyber-related GitHub text. - General Capabilities: Evaluated on 10 standard academic benchmarks (including Open LLM Leaderboard tasks: ARC-Challenge, ARC-Easy, HellaSwag, MMLU, TruthfulQA, Winogrande, along with GSM8K, MathQA, PIQA, and PubMedQA).
Key Insights and Ideas
- Specialization Avoids Interference: Unlearning different failure modes simultaneously in a single training run creates competing parameter updates. Isolating subsets allows the unlearning objective to push model activations cleanly away from each specific undesirable concept.
- Model Merging Complements Unlearning: Parameter arithmetic via TIES-Merging successfully combines multiple "forgetting directions" without canceling out their safety gains or corrupting general-purpose pre-trained capabilities.
- Zero Extra Training FLOPs: Partitioning the dataset means each component model trains on a fraction of the data. The cumulative training compute remains roughly identical to unlearning on the monolithic dataset.
Key Results
Experiments on Llama-2-7B and Zephyr-7B-Beta showed consistent improvements across domains:
- Demographic Toxicity (ToxiGen):
- On Zephyr-7B-Beta, SPUNGE dropped RMU toxicity from 14.61% to 9.89% (a 32% relative reduction) and TVN toxicity from 5.65% to 3.88% (a 31% reduction).
- On Llama-2-7B, SPUNGE-TVN cut toxicity from 4.26% to 2.96% (a 30% reduction).
- Implicit vs. Explicit Toxicity: When partitioning Civil Comments and ToxiGen, SPUNGE-TVN dropped ToxiGen toxicity from 8.42% to 4.81% and RealToxicityPrompts toxicity from 3.17% to 1.97%.
- Hazardous Scientific Knowledge (WMDP): On Zephyr-7B-Beta with RMU, SPUNGE reduced
WMDP-Bioaccuracy from 31.26% down to 27.57% (an 11.8% reduction in bio-weapon knowledge) andWMDP-Cyberaccuracy from 27.62% to 26.47%. - Capability Retention: In all setups, general reasoning performance across the 10 academic benchmarks remained stable (e.g., within 1% of baseline accuracies).
Limitations and Future Work
- Attribute Availability: SPUNGE requires identifiable metadata or annotations (or an upstream classifier) to create coherent data subsets.
- Hyperparameter Sensitivity: Some baseline unlearning methods (notably RMU on Llama-2-7B) proved extremely sensitive to hyperparameter tuning and could not be successfully stabilized.
- Scope of Applications: Experiments focused on 7B models and two safety domains (toxicity and hazardous STEM knowledge). The authors note that extending SPUNGE to broader data-deletion settings—such as removing copyrighted, proprietary, or licensed text—remains an exciting open direction.
Summary updated