Large language models are often deployed in a compressed form called 2:4 sparsity. In every run of four consecutive weights, exactly two are set to zero, and recent NVIDIA GPUs skip those zeros to run roughly twice as fast. This proposal asks what unlearning should look like for such a model. Unlearning here means removing specific knowledge, such as hazardous biology or a fictitious author's biography, without retraining from scratch.
Our answer is to leave the weights' values alone and change only which two weights in each group of four are kept. A deployed 2:4 model already discards half of each group, and those discarded weights still have known values in the dense model it came from. Unlearning can therefore drop a kept weight that carries the unwanted knowledge and swap back in a discarded weight that supports general ability. Every group keeps exactly two nonzeros, so the hardware speedup survives. Because no weight value is pushed by gradient ascent, the runaway damage that makes unlearned models babble is ruled out by construction rather than suppressed by regularization. Because unlearning zeros look exactly like compression zeros, the mask no longer shows an attacker where the deleted knowledge lived.
The opportunity sits between two findings that currently conflict. Pruning-based unlearning avoids collapse, but its zero pattern acts as a roadmap for reviving erased concepts. The proposed defense, filling pruned weights with noise, destroys the sparsity that made pruning attractive in the first place. Mask swapping inside a fixed N:M pattern (N zeros per M consecutive weights) is a way to get collapse-free editing, hardware compatibility and mask camouflage at the same time.
Core Claim
Fix a 2:4 sparse model produced by one-shot pruning of a dense parent with weights $W$. For each group $g$ of four weights, choose which pair $P_g$ of the six possible pairs stays nonzero, using the parent's original values. The choice maximizes importance on retain data minus importance on forget data:
$$P_g^\star = \arg\max_{P \subset g,\ |P|=2} \sum_{i \in P} \big( s_i^{\text{retain}} - \lambda\, s_i^{\text{forget}} \big),$$
Here $s_i^{\text{retain}}$ and $s_i^{\text{forget}}$ are per-weight importance scores, for example squared gradient times squared weight (a diagonal Fisher estimate) computed on retain and forget text. $\lambda \ge 0$ sets how aggressively we forget. Because each group has only six candidate pairs, the problem is solved exactly and independently per group, with no optimizer.
We claim three things. First, at matched forgetting on WMDP and TOFU, this edit damages general ability less than whole-neuron pruning and less than gradient-based unlearning restricted to the 2:4 mask. Second, it preserves 2:4 hardware speed by construction. Third, it is markedly harder to revert with training-free mask-completion attacks than zero-masking in a dense model. The third claim holds under a stated threat model in which the attacker holds only the released sparse model, not the pre-unlearning sparse checkpoint and not the parent's compression mask.
Relation to Prior Work
The work that motivates this proposal shows that pruning helps unlearning but has studied only the two ends of the granularity spectrum.
Model Sparsity Can Simplify Machine Unlearning prunes vision classifiers before unlearning. It bounds unlearning error by sparsity and warns that iterative pruning bakes forget data into the mask. We inherit its one-shot pruning recommendation, but we edit the mask itself rather than fine-tuning on top of it, and we target generative language models.
Two methods remove whole neurons whose activations are high on forget data relative to retain data: Dissecting Language Models: Machine Unlearning via Selective Pruning and MANU. The cost is collateral damage. In Dissecting Language Models, cutting OPT-6.7B's coding ability by 80% cost 20% of general text performance. We test whether editing at the scale of four-weight groups keeps that surgical quality while avoiding the damage of excising whole neurons.
WAGLE chooses which dense weights an unlearning objective may update. FAPM prunes 90% of a fine-tuning update to protect general knowledge. Both supply the idea that the location of an edit governs collateral damage. Both still change weight values in a dense model, which mask swapping does not.
The constraining work concerns security. Roots Beneath the Cut revives concepts erased by zero-masking in diffusion models using low-rank completion and sign recovery, restoring erased-object accuracy from 8% to 54%. Its proposed fix, Gaussian noise in place of zeros, is incompatible with sparse execution. The Right to be Forgotten in Pruning shows that masks fingerprint training data: removing 5% of the data changes the re-pruned mask to about 58% overlap.
Our camouflage argument directly answers the first paper. Our method could still leak data in the second paper's sense, so we measure mask overlap against a retrained-and-re-pruned reference.
Finally, An Illusion of Unlearning? shows that apparently erased knowledge often remains readable from internal representations. This makes representation probing and relearning mandatory checks rather than optional ones.
The hardware premise comes from Learning N:M Fine-grained Structured Sparse Neural Networks From Scratch, which established N:M patterns accelerated by sparse tensor cores. The broader granularity tension is documented in LLM-Pruner and MACKO. The file reports no prior unlearning study on N:M sparse models.
Research Program
Base models and sparsification. We start from Zephyr-7B, matching the WMDP evaluation of RMU, and Llama2-7b fine-tuned on TOFU, matching WAGLE. We convert each to 2:4 using one-shot magnitude pruning, with short retain-data recovery training if needed, and treat the result as the deployed model.
Mask-swap unlearning. We compute forget and retain importance scores against the parent's dense values. We then solve the per-group selection above, sweeping $\lambda$ to trace a forget-versus-utility curve.
Hybrid variant. Swapping can only remove or reinstate pretrained weights; it cannot actively push representations away from the forget data. We therefore also test a hybrid. Mask swapping comes first. A short RMU-style update follows, restricted to the newly chosen mask and limited to the small fraction of groups whose mask changed.
Granularity analysis. The same scores and the same edit budget, measured in number of changed nonzeros, are applied at six granularities. These are individual weights (unstructured, which breaks the hardware pattern), 2:4 groups, 4:8 groups, 8:16 groups, whole MLP neurons as in Dissecting Language Models, and whole attention heads. This gives the first matched-budget measurement of how edit granularity trades forgetting against collateral damage and against revival risk in a language model.
Baselines
Do-nothing reference. The do-nothing reference is the 2:4 model before unlearning. It gives forget-set and utility ceilings and confirms that sparsification alone did not already erase the target knowledge.
Masked RMU and masked SimNPO. The strongest competitor on the forgetting-versus-utility question is gradient-based unlearning run on the 2:4 model with its mask frozen. Only the existing nonzeros may change, so the pattern and speedup are kept. We run two versions.
The first is RMU from The WMDP Benchmark, which steers hidden activations on forget inputs toward a random direction. On dense Zephyr-7B it reduced WMDP-Bio accuracy from 63.7% to 31.2% while MMLU fell only from 58.1% to 57.1%, close to the 25% chance level.
The second is SimNPO, a reference-free preference-style unlearning loss. It reports a TOFU Forget Quality of 0.99 against NPO's 0.79, where 1.00 corresponds to retraining from scratch. It also reports MUSE News KnowMem of 39.65 against 37.58 for NPO.
Both get the same forget and retain data, the same wall-clock budget, and the same hyperparameter search size as our $\lambda$ sweep. We also report their dense-model numbers as an upper reference. No reported result was found on Lacuna for any unlearning method on a 2:4 sparse language model.
Beating masked RMU and masked SimNPO. On WMDP-Bio, we must reach WMDP-Bio accuracy within two points of masked RMU with higher MMLU, or lower WMDP-Bio at equal MMLU. On TOFU, we must match masked SimNPO's Forget Quality with higher Model Utility. In both cases we must also show lower revival after the relearning and mask-completion attacks.
Selective neuron pruning. The Dissecting Language Models method also preserves hardware compatibility. It is the natural "simpler" competitor. We run it at its recommended 2–5% pruning rate, following MANU, and at matched numbers of changed nonzeros.
Zero-only ablation. The decisive ablation isolates the swap. It removes forget-critical weights but never swaps in retain-critical ones, so the affected groups simply become sparser than 2:4. A random-swap control that changes the same number of groups tests whether the importance scores matter at all.
Gaussian obfuscation. The Roots Beneath the Cut defense is the security baseline. It fills removed weights with noise, at the cost of breaking sparsity.
Why not just…?
Why not just run SimNPO or RMU on the sparse model with its mask frozen? This is the real threat, and it may match or beat mask swapping on raw forgetting. The case against it alone rests on two points. First, gradient-based value changes are what produce collapse, and TOFU reports that baseline methods at 5–10% forget sets made models unusable. Second, value changes leave the kind of internal traces that An Illusion of Unlearning? shows can be reactivated. The matched-budget comparison and the relearning attack settle this. If masked RMU wins on every axis, we report that mask swapping is unnecessary and keep only the granularity analysis.
Why not just prune whole neurons, which already keeps matrices dense and fast? The file's evidence says neuron excision is blunt: the 80%-forget, 20%-collateral result in Dissecting Language Models, and LLM-Pruner's breakdown at 50% structural removal. But neuron-level unlearning removes only 2–5% of neurons, far below that wall. The matched-budget granularity sweep is exactly the experiment that shows whether finer groups reduce collateral damage at equal forgetting.
Why not just zero forget weights in the dense model and accept no speedup? Unstructured zeroing is the accuracy upper bound for pruning. But Roots Beneath the Cut shows its mask is a revival roadmap, and its noise-filling fix destroys sparsity. We include unstructured zeroing as a granularity point and run the same revival attack on it.
Why not just swap with a LoRA adapter or subtract a knowledge delta? Adapters keep the base model dense and the knowledge in the base weights. Removing the adapter, or fine-tuning, trivially restores the knowledge, and adapters add rather than remove inference cost. We include a forget-set LoRA negation in the relearning experiment as a reference.
Proposed Experiments
Forgetting versus utility. We report WMDP-Bio and WMDP-Cyber accuracy against MMLU on Zephyr-7B. On Llama2-7b we report TOFU Forget Quality and Model Utility at 1%, 5% and 10% forget splits. We add WikiText2 perplexity and the zero-shot suite of BoolQ, PIQA, HellaSwag, WinoGrande, ARC and OpenbookQA as collapse detectors, and MUSE News KnowMem as a secondary check. Curves come from sweeping $\lambda$ and each baseline's strength.
Robustness. There are three attacks. The first is relearning: a few hundred steps of fine-tuning on a small forget subset, measuring how fast WMDP or TOFU recall returns. The second is linear probing of hidden states for forget-set answers. The third is a language-model adaptation of the Roots Beneath the Cut completion-and-sign attack, given only the released sparse model.
We also run a stronger attacker who holds the public dense parent. This attacker can simply restore the parent's values in any group, so we state that camouflage offers no protection in this regime. We measure how much the parent-holding attacker gains, which honestly bounds the claim to settings where the dense parent is not available.
Data leakage through the mask. We compute IoU between the unlearned mask and a mask obtained by recovering the dense model without forget data and re-pruning. This follows the metric from The Right to be Forgotten in Pruning.
Efficiency. We measure 2:4 kernel latency before and after unlearning to confirm no regression. We compare against the dense-kernel latency forced by Gaussian obfuscation and by unstructured zeroing.
Decisive checks. The proposal succeeds if three things hold. First, mask swapping, alone or in its hybrid, sits on or above the masked-RMU/SimNPO forgetting-versus-utility frontier. Second, it beats the zero-only ablation, which shows that swapping in retain weights is what prevents collateral damage. Third, it lowers mask-completion revival relative to dense zero-masking without losing the 2:4 speedup.
It fails informatively if swap-only forgetting stalls well above chance on WMDP-Bio. That outcome would show that pretrained knowledge is too spread out to remove by choosing among existing weights.
References
- Model Sparsity Can Simplify Machine Unlearning
- Dissecting Language Models: Machine Unlearning via Selective Pruning
- Modality-Aware Neuron Pruning for Unlearning in Multimodal Large Language Models
- WAGLE: Strategic Weight Attribution for Effective and Modular Unlearning in Large Language Models
- Mitigating Catastrophic Forgetting in Large Language Models with Forgetting-aware Pruning
- Roots Beneath the Cut: Uncovering the Risk of Concept Revival in Pruning-Based Unlearning for Diffusion Models
- The Right to be Forgotten in Pruning: Unveil Machine Unlearning on Sparse Models
- An Illusion of Unlearning? Assessing Machine Unlearning Through Internal Representations
- Learning N: M Fine-grained Structured Sparse Neural Networks From Scratch
- LLM-Pruner: On the Structural Pruning of Large Language Models
- MACKO: Sparse matrix-vector multiplication for low sparsity
- The WMDP Benchmark: Measuring and Reducing Malicious Use with Unlearning
- TOFU: A Task of Fictitious Unlearning for LLMs
- Simplicity Prevails: Rethinking Negative Preference Optimization for LLM Unlearning