The Right to be Forgotten in Pruning: Unveil Machine Unlearning on Sparse Models

Yang Xiao, Gen Li, Kaiyuan Deng, Jie Ji, Ruimeng Ye, Xiaolong Ma, Bo HuiSubmission to ICLR 2026 · Withdrawn

TL;DR

When you prune a neural network, the resulting sparse architecture (the mask) memorizes the training data just as the weights do. This paper introduces un-pruning—a framework that updates both model weights and pruning masks to honor "the right to be forgotten" without costly retraining from scratch, while showing that standard Membership Inference Attacks (MIAs) are fundamentally unreliable for evaluating unlearning.

What Problem Does This Paper Address?

Under regulations like GDPR and CCPA, users have the "right to be forgotten," requiring systems to remove their data's influence via machine unlearning. While unlearning for dense models is widely studied, sparse models introduce an overlooked vulnerability: pruned topology is data-dependent.

Removing just 5% of training data causes a ResNet-18 (at 60% sparsity) to share only ~58% of its pruned parameters compared to a model retrained and repruned from scratch. Prior sparse unlearning approaches only adjusted remaining unpruned weights, leaving the data-dependent sparse mask frozen. As a result, the model's structure still retains private information about deleted data. Retraining and repruning from scratch is the "gold standard" for privacy, but it is computationally prohibitive.

Methods

The authors propose un-pruning, an iterative algorithm compatible with any standard dense unlearning algorithm (e.g., Gradient Ascent, Fisher, SCRUB, WoodFisher):

  1. Re-activate and Re-initialize Pruned Weights: Pruned (zeroed) weights are unfrozen and re-initialized (using either their original initialization or random values) so they can receive gradient updates.
  2. Dense Unlearning Step: The full model runs an unlearning update step on the retain/forget datasets.
  3. Iterative Topology Growth: Over $T$ iterations, the top $p_\Theta\%$ parameters with the largest magnitudes are restored to the active mask.
  4. Final Pruning: The model is pruned back to the target sparsity ratio via one-shot magnitude pruning, producing updated weights $\Theta_u$ and a new mask $M_u$.

The authors also derive an upper bound showing that the un-pruning mask error scales with learning rate, iterations, Hessian spectral norm, and sparsity: $\mathcal{O}(\eta^2 t \|M \odot \Theta\|_2 \lambda(M))$.

Original Sparse Model (Frozen Mask) 
        ↓
Unfreeze & Re-initialize Pruned Weights
        ↓
Apply Dense Unlearning (e.g., SCRUB, Fisher)
        ↓
Iteratively Grow / Re-select Active Parameters
        ↓
Re-prune to Target Sparsity → Privacy-Preserving Sparse Model

Datasets

The authors evaluate their approach across standard image classification benchmarks:

  • CIFAR-10 (tested on ResNet-18 and ResNet-20)
  • FashionMNIST (tested on ResNet-18)
  • ImageNet (tested on ResNet-18 and Vision Transformers / ViT)

No new datasets were introduced, but the experiments evaluate data deletion at multiple deletion ratios (e.g., 10%, 20%, 40%) across varying sparsity levels (30% to 95%).

Key Insights and Ideas

  • Pruning masks encode private data: Prior training data can be reconstructed directly from sparse topologies. Un-pruning reduces image reconstruction fidelity (SSIM drops from 0.44 to 0.35 when un-pruning 40% of data), demonstrating genuine forgetting.
  • MIA metrics are fragile: Membership Inference Attack (MIA) metrics—routinely used to judge unlearning—are hyper-sensitive to small changes in shadow dataset sample balances. Shifting the retain-to-test ratio by as little as $\pm 5\%$ causes MIA accuracy to swing unpredictably between 0.0 and 1.0, rendering it largely useless as a standalone benchmark.
  • Topological metrics are better benchmarks: The authors propose IoM (Intersection over Mask) and IoU (Intersection over Union) against the gold standard (retrained + repruned model) to directly evaluate whether the correct network topology was recovered.
  • Original initialization beats random initialization: Restoring weights to their original initialization prior to un-pruning consistently achieves higher topological overlap with the retrained baseline than random initialization.

Key Results

  • Drastic Speedups: Compared to full retraining + repruning on ResNet-18, un-pruning reduces runtime by orders of magnitude. At 95% sparsity, retraining + repruning takes 39,235 seconds (~10.9 hours), whereas un-pruning with WoodFisher takes 48 seconds and SFRon takes 88 seconds (>400× faster).
  • High Topological Alignment: On ImageNet (ResNet-18, 19.03% sparsity, 20% data deletion), un-pruning with WoodFisher achieved 84.22% IoU and 85.06% IoM relative to retraining from scratch, while preserving test accuracy (57.42% vs. 56.57% for retrained).
  • Structured vs. Unstructured Pruning: Un-pruning performs particularly well on structured pruning (e.g., Soft Filter Pruning), where channel-level saliency differences are sharper and easier to recover than individual weights.

Limitations and Future Work

  • Catastrophic Accuracy Collapse at Extreme Sparsities: At extreme pruning levels (e.g., 90–95% sparsity), unlearning can lead to severe degradation (dropping model accuracy to ~10% in some runs), which the authors had to omit.
  • Complex Pruning Paradigms: The method is designed for magnitude- or norm-based pruning. Pruning techniques that introduce auxiliary learnable parameters (e.g., BiP) cannot be directly accommodated without developing specialized update rules.
  • Generative and Sequence Models: The current study focuses primarily on vision models (CNNs and small ViTs); extending un-pruning to generative models (DDPMs) and large language models (LLMs) remains an open challenge.

Summary updated

Abstract

Machine unlearning aims to efficiently eliminate the memory about deleted data from trained models and address the right to be forgotten. Despite the success of existing unlearning algorithms, unlearning in sparse models has not yet been well studied. In this paper, we empirically find that the deleted data has an impact on the pruned topology in a sparse model. Motivated by the observation and the right to be forgotten, we define a new terminology ``un-pruning" to eliminate the impact of deleted data on model pruning. Then we propose an un-pruning algorithm to approximate the pruned topology driven by retained data. We remark that any existing unlearning algorithm can be integrated with the proposed un-pruning workflow and the error of un-pruning is upper-bounded in theory. Also, our un-pruning algorithm can be applied to both structured sparse models and unstructured sparse models. In the experiment, we further find that Membership Inference Attack (MIA) accuracy is unreliable for assessing whether a model has forgotten deleted data, as a small change in the amount of deleted data can produce arbitrary MIA results. Accordingly, we devise new performance metrics for sparse models to evaluate the success of un-pruning. Lastly, we conduct extensive experiments to verify the efficacy of un-pruning with various pruning methods and unlearning algorithms. Our code is released at https://anonymous.4open.science/r/UnlearningSparseModels-FBC5 .
BibTeX
@inproceedings{xiao2025right,
  author = {Yang Xiao and Gen Li and Kaiyuan Deng and Jie Ji and Ruimeng Ye and Xiaolong Ma and Bo Hui},
  title = {{The Right to be Forgotten in Pruning: Unveil Machine Unlearning on Sparse Models}},
  booktitle = {RegML @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=0DOTaITO6I},
}
Figure