Model Sparsity Can Simplify Machine Unlearning

Jinghan Jia, Jiancheng Liu, Parikshit Ram, Yuguang Yao, Gaowen Liu, Yang Liu, Pranay Sharma, Sijia Liu

As data privacy regulations like the GDPR grant individuals the "right to be forgotten," AI developers face a complex challenge: how do you "scrub" the influence of specific data points from a pre-trained machine learning model?

The most reliable method is Exact Unlearning—simply deleting the requested data and retraining the model from scratch. However, for modern deep learning models, this is prohibitively expensive and time-consuming. The industry alternative is Approximate Unlearning, which uses computational shortcuts like fine-tuning or gradient ascent to "forget" data quickly.

The problem with these shortcuts is that they are often "leaky." They might fail to fully remove the data's influence (low efficacy) or accidentally degrade the model's performance on the data it is supposed to keep (low fidelity). This paper asks a pivotal question: Is there a way to make these fast, approximate methods as effective as retraining from scratch?

Overview of the prune first, then unlearn paradigm.

A Model-Based Perspective: Sparsification

To bridge the gap between exact and approximate unlearning, the authors shift the focus from traditional data-centric approaches to a model-based perspective, specifically leveraging Model Sparsification through weight pruning.

They introduce two primary methodologies:

  1. "Prune first, then unlearn": The authors propose that before attempting to unlearn anything, the model should first be pruned to create a sparse subnetwork. Techniques like One-Shot Magnitude Pruning (OMP) or SynFlow are used to remove less important weights. The researchers prove theoretically that the "unlearning error" is bounded by the model's sparsity. Essentially, a sparser model has fewer "parameters to hide in," making the unlearning process more direct and effective.
  2. Sparsity-Aware Unlearning ($\ell_1$-sparse MU): Instead of pruning as a separate preliminary step, this method integrates sparsity directly into the unlearning process itself. It adds an $\ell_1$ regularization penalty to the unlearning objective, encouraging the model to become sparse while it simultaneously learns to forget. A linearly decaying scheduler for this penalty proved most effective—prioritizing sparsity early in the process and then shifting focus to maintaining overall accuracy.

Key Insights and Discoveries

  • Sparsity as a Catalyst: The core breakthrough is that sparsity does more than just make models smaller; it actively simplifies the loss landscape. By reducing the number of active singular values in the Hessian of the loss function, sparsity creates a much easier "unlearning path" for approximate algorithms to follow.
  • The IMP Trap: Iterative Magnitude Pruning (IMP) is often considered the gold standard for finding "winning tickets" in sparse networks. However, the authors found it is actually detrimental to unlearning. Because IMP relies heavily on the original training set (which includes the data you want to forget), it inadvertently "bakes in" the very information you are trying to erase. Simpler, data-agnostic pruning methods like OMP or SynFlow are vastly superior for machine unlearning.
  • Beyond Privacy: The utility of unlearning extends far beyond GDPR compliance. The authors demonstrate that their sparsity-driven unlearning can be used for Trojan Model Cleansing (removing backdoors planted by malicious actors) and for Transfer Learning (removing "harmful" source classes to improve a model's performance on a new downstream task).

Empirical Results

The researchers validated their approach across standard benchmarks (CIFAR-10, CIFAR-100, SVHN, ImageNet) and architectures (ResNet variants, VGG-16, Swin Transformer), testing both class-wise and random data forgetting.

Unlearning performance metrics across varying sparsity levels.

The results highlight significant improvements over dense unlearning baselines:

  • Massive Efficacy Boost: Using sparsity-aware unlearning improved the efficacy of simple fine-tuning (FT) by a staggering 77%, as seen in the sharp upward trends in unlearning accuracy when sparsity increases.
  • Closing the Gap: In numerous tests, the "prune first" approach achieved Unlearning Accuracy (UA) and Membership Inference Attack (MIA) protection nearly identical to retraining from scratch, but at a fraction of the computational cost (often 15-20x faster).
  • Robust Backdoor Defense: The $\ell_1$-sparse MU method effectively scrubbed backdoor triggers from "Trojan" models while maintaining high standard accuracy, outperforming traditional dense unlearning methods.
  • Transfer Learning Speedup: When applying MU to improve transfer learning on ImageNet, the proposed method achieved a 2x speedup over previous state-of-the-art retraining-based approaches.

Limitations and Future Work

While the empirical results are highly promising, the authors note a few areas for further exploration. First, while they provide strong empirical evidence and foundational theoretical bounds, a formal "provable guarantee" for the $\ell_1$-sparse MU method remains an open challenge. Second, the study focused predominantly on Computer Vision; it remains to be seen how these sparsity-driven unlearning patterns translate to Natural Language Processing (NLP), particularly with Large Language Models (LLMs). Finally, the performance of sparsity-aware unlearning can be sensitive to the regularization weight ($\gamma$), requiring careful hyperparameter tuning for different data-model configurations.

Summary updated

BibTeX
@inproceedings{jia2023model,
  author = {Jinghan Jia and Jiancheng Liu and Parikshit Ram and Yuguang Yao and Gaowen Liu and Yang Liu and Pranay Sharma and Sijia Liu},
  title = {{Model Sparsity Can Simplify Machine Unlearning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=0jZH883i34},
}
Figure