Accurate Neural Network Pruning Requires Rethinking Sparse Optimization

Denis Kuznedelev, Eldar Kurtic, Eugenia Iofinova, Elias Frantar, Alexandra Peste, Dan Alistarh

Abstract

Recent research reveals that the massive accuracy drops seen in highly sparse neural networks (90%+) aren't just due to a lack of model capacity, but are primarily an optimization failure. By treating sparse training as a distinct challenge—specifically by significantly extending training schedules and using tailored "sparse-aware" recipes—the authors achieve state-of-the-art results, such as a 90%-sparse ResNet50 that nearly matches its dense counterpart's accuracy.

Introduction: The Sparsity Wall

Neural network pruning—the process of removing redundant weights to create "sparse" models—is essential for deploying massive AI models on edge devices. However, there is a "sparsity wall": while you can often remove 70-80% of weights with little impact, accuracy falls off a cliff once you hit 90-95% sparsity.

The authors identify a critical oversight in how the community approaches this: most researchers use the same training "recipes" (learning rates, epoch counts, and schedules) for sparse models as they do for dense ones. This paper argues that sparse models are fundamentally harder to optimize. When trained with standard schedules, these models exhibit clear signs of undertraining—their loss hasn't saturated, and their predictions remain "unconfident" (high entropy).

The "Undertraining" Hypothesis

Sparse models take much longer to reach their peak performance. While a dense ResNet50 might start overfitting after 100 epochs, a 95% sparse version is often still "getting started" and continues to improve even at 500 epochs.

Validation accuracy and training loss across different sparsity levels and training durations.

As shown in the figure above, sparse models move through the loss landscape more slowly and have to overcome more "bumps" (loss barriers) to find good minima. Undertrained sparse models have high output entropy, meaning they are less certain about their predictions. This correlates directly with lower accuracy, providing a diagnostic tool for researchers. The authors show that the "Lottery Ticket" (the ideal sparse mask) exists, but finding the right weights for that mask is a slog.

Methods

The researchers investigated two primary scenarios: sparse pre-training (training a sparse model from scratch) and sparse transfer (fine-tuning a pre-pruned model on a new task).

  1. AC/DC++ (Vision): They built upon the Alternating Compressed/Decompressed (AC/DC) algorithm, which cycles between training the model in a sparse state and a dense state. The "++" version involves scaling the runtime (up to 10x longer than standard dense training) and utilizing modern training innovations like the FFCV library for faster data loading.
  2. Gradual Layer Unfreezing (NLP): For BERT models, they found that simply training longer led to rapid overfitting. To solve this, they adapted a "gradual unfreezing" approach: starting by training only the classifier head, then slowly unfreezing transformer blocks from back-to-front. This stabilized the learning process for sparse architectures.
  3. Loss Landscape Analysis: They used Hessian analysis (measuring the "sharpness" of the loss surface) and loss interpolation to prove that sparse models face more significant "loss barriers" during optimization than dense models.

Key Results

The authors set new state-of-the-art benchmarks for high-sparsity models:

  • ResNet50 on ImageNet:
    • 90% Sparse: Achieved 78.5% Top-1 accuracy (the dense baseline was 78.78%). This effectively "closes the gap" for 90% sparsity.
  • 95% Sparse: Achieved 77.7% accuracy, significantly higher than previous methods that struggled to stay above 74-75%.
  • 98% Sparse: Even at this extreme level, they maintained 75.2% accuracy.
  • BERT on GLUE: On challenging tasks like CoLA and RTE, their gradual unfreezing recipe improved accuracy by 3 points over previous state-of-the-art sparse transfer methods at 90% sparsity.

Limitations and Future Work

The most obvious limitation is computational cost. Achieving these "accurate" sparse models requires training for 5x to 10x longer than standard dense models. While the resulting model is efficient for inference, the training process is expensive.

The authors suggest that future research should focus on developing "sparsity-aware" optimizers—algorithms that can navigate the difficult sparse loss landscape more efficiently, reaching these high-accuracy targets without needing hundreds of extra epochs. They also note that while they focused on ResNet and BERT, the principles likely apply to newer architectures like Vision Transformers (ViTs) and Large Language Models (LLMs).

Summary updated

BibTeX
@article{kuznedelev2024accurate,
  author = {Denis Kuznedelev and Eldar Kurtic and Eugenia Iofinova and Elias Frantar and Alexandra Peste and Dan Alistarh},
  title = {{Accurate Neural Network Pruning Requires Rethinking Sparse Optimization}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2024},
  url = {https://openreview.net/forum?id=3eOlamFRX0},
}
Figure