Prune Responsibly

Michela PaganiniarXiv 2020

Abstract

Neural network pruning is a standard tool for making models small enough to run on phones and edge devices, but it isn't a "free lunch." This paper demonstrates that pruning disproportionately degrades performance on underrepresented and complex data classes, exacerbating existing biases. To combat this, the author proposes a Pareto-based framework that treats fairness as a primary engineering objective alongside accuracy and efficiency.

Introduction

In the push for "green AI" and on-device efficiency, researchers often use pruning—removing redundant weights from a trained model—to reduce memory and computational costs. Traditionally, the success of a pruning algorithm is measured by how much it can compress a model while maintaining its aggregate accuracy.

The author argues that this aggregate view hides a "silent" failure: the accuracy loss is rarely distributed evenly. If a model's total accuracy drops by only 1%, that loss might be concentrated entirely on a specific minority group or a difficult sub-category. This paper seeks to quantify how pruning affects "per-class" performance and why certain groups are "forgotten" by the network faster than others.

Methodology

The author conducted a massive empirical study, analyzing nearly one million categories across over 100,000 image classification models.

Key methodological components include:

  • Statistical Modeling: The author used Ordinary Least Squares (OLS) regression to model class-level accuracy as a function of several variables: model sparsity, initial unpruned accuracy, class imbalance (how rare the class is), and average example entropy (a proxy for visual complexity).
  • Pruning Variations: The study compared various techniques, including $L_1, L_2,$ and $L_\infty$ magnitude pruning, random pruning, and global vs. layer-wise approaches.
  • Pareto Optimization: The paper introduces a decision-making framework using Pareto frontiers. Instead of just picking the "smallest" model that hits an accuracy target, engineers are encouraged to plot "Sparsity vs. Fairness" to find operating points that don't unfairly penalize specific classes.

Key Insights and Ideas

  • The "Rich Get Richer" Effect: Pruning widens the gap between easy and hard classes. If a class is already underrepresented or visually complex, it suffers significantly more as the model's capacity shrinks.
  • Loss of Invariance: As models are pruned, they lose the ability to remain invariant to "nuisance" properties. For example, a pruned model might still recognize a perfectly upright "9" but completely fail on a "9" that is tilted at an angle.
  • Complexity is the First to Go: Using Shannon entropy as a measure of image complexity, the author found that "elaborate" or "knotted" examples are the first to be discarded by the network during the compression process.
Per-class accuracy as a function of pruning sparsity, illustrating how different MNIST digits are 'forgotten' at different rates.

Key Results

  • Predictive Power: The statistical model achieved an adjusted $R^2$ of 0.753, confirming that class imbalance and complexity are statistically significant predictors of how much a class will suffer under pruning.
  • The QMNIST Case Study: In one experiment, pruning a LeNet model to ~98% sparsity caused the accuracy for "Writer 469" to plummet from 100% to 47.7%, even while the overall model accuracy remained relatively high.
Pruned vs. unpruned accuracy per writer in QMNIST, showing that writers with lower initial accuracy suffer more from model compression.
  • Group Disparities: Handwriting from high school students (the hsf4 series) was consistently more affected by pruning than handwriting from NIST employees, likely because the students' writing styles were more varied and "challenging" for the compressed model to represent.

Limitations and Future Work

While the OLS model provides high predictive power, the author notes that because accuracy is bounded between 0 and 1, future work could utilize Generalized Linear Models (GLMs) with more appropriate link functions. Additionally, the massive scale of the study precluded exploring every training hyperparameter. Finally, the author encourages the community to explore broader fairness metrics, such as equalized odds, in the context of model compression.

Summary updated

BibTeX
@misc{paganini2020prune,
  author = {Michela Paganini},
  title = {{Prune Responsibly}},
  year = {2020},
  eprint = {2009.09936},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.09936},
}
Figure