Preserving Deep Representations in One-Shot Pruning: A Hessian-Free Second-Order Optimization Framework

Ryan Lucas, Rahul Mazumder

TL;DR

SNOWS (Stochastic Newton Optimal Weight Surgeon) is a novel one-shot pruning framework that significantly reduces the computational cost of vision models without the need for expensive retraining. By optimizing a "look-ahead" objective that accounts for nonlinear activations deep in the network and utilizing memory-efficient Hessian-free optimization, SNOWS achieves state-of-the-art accuracy on massive models like ViT-L using only a few thousand calibration samples.

The Challenge of One-Shot Pruning

Neural network pruning—removing redundant weights to speed up inference—usually comes with a catch: you have to retrain the model to recover lost accuracy. For massive modern models, retraining is often too expensive or impossible if the original dataset isn't available.

"One-shot" pruning methods attempt to solve this by adjusting weights in a single pass using a small "calibration" dataset. However, current leaders in this space (like OBC or SparseGPT) typically use layer-wise least squares reconstruction. They try to make the output of a single pruned layer match its original dense version. The problem is that this ignores the "deep" reality of the network. A small error in layer 5 might be amplified by nonlinear activations (like ReLU) in layer 10. By ignoring everything downstream, current methods leave significant performance on the table.

Introducing SNOWS: Bridging Local and Global Optimization

The authors introduce SNOWS, a framework designed to bridge the gap between local layer-wise pruning and global network optimization.

SNOWS Look-Ahead Objective
  1. Global-Aware Objective: Instead of just matching the output of the current layer ($\ell$), SNOWS minimizes the reconstruction error $K$ steps ahead. This "horizon" parameter $K$ allows the algorithm to account for how pruning affects nonlinear activations and representations deeper in the network.
  2. Hessian-Free Second-Order Optimization: Solving this $K$-step nonlinear objective is challenging. Standard SGD is too slow and struggles with the "ill-conditioned" nature of sparse networks. SNOWS uses a Newton-style method, which leverages second-order information (the Hessian) to take much smarter steps.
  3. The Scalability Trick: Normally, the Hessian matrix for a large model is too big to store in memory. SNOWS uses Hessian-free optimization, calculating "Hessian-vector products" via finite differences of gradients. This allows the computation of exact Newton descent steps without ever actually forming the giant Hessian matrix.
  4. Weight Surgeon, Not Mask Maker: SNOWS is agnostic to how you choose which weights to cut (the "mask"). It can be applied on top of any existing method (like Magnitude Pruning or OBC) to "heal" the remaining weights and preserve deep features.

Key Insights and Performance

The researchers evaluated SNOWS on standard computer vision benchmarks, including CIFAR-10/100, ImageNet-1k, and Vision Transformers (ViT-B/16 and ViT-L/16), using only 1,000 to 3,000 calibration samples.

Effect of Horizon Parameter K
  • The "Look-Ahead" Advantage: The paper demonstrates that matching activations even just 1 or 3 layers deeper (setting $K > 0$) provides a much better proxy for final model loss than matching the immediate output. As the horizon $K$ increases, the pruned network better maintains its accuracy throughout the pruning iterations.
  • Newton > SGD for Sparsity: A fascinating insight is that SGD performs poorly in sparse settings because the "curvature" of the loss surface becomes highly uneven. Newton’s method naturally corrects for this, moving much further from the starting point to find better minima in fewer iterations.
  • Cascading Updates: SNOWS prunes layer-by-layer but passes the output of each newly pruned layer as the input to the next. This ensures that errors introduced early on are accounted for by subsequent layers.

State-of-the-Art Results

SNOWS consistently outperformed existing one-shot methods across various architectures:

  • ResNet50 on ImageNet: At 1:4 semi-structured sparsity, SNOWS achieved 66.33% accuracy, while the previous state-of-the-art (OBC) trailed significantly at 46.29%.
  • MobileNetV1: At 70% unstructured sparsity, SNOWS saw only a 5.6% accuracy drop, whereas the best competing method dropped by 12.55%.
  • Vision Transformers: On ViT-L/16 (304M parameters), SNOWS achieved 81.01% Top-1 accuracy when pruning the QKV layers, significantly better than simple Magnitude Pruning (75.55%). Despite the complex math, the Hessian-free approach allows this massive model to be pruned on a single NVIDIA A100 GPU.

Limitations and Future Work

  • Mask Selection: SNOWS focuses on weight readjustment but doesn't propose a new way to select the pruning mask. It relies on other methods for the initial "cut."
  • Computational Overhead: While much faster than retraining, SNOWS is more computationally intensive than simple layer-wise least squares. Increasing the horizon $K$ improves accuracy but increases GPU memory and time.
  • Architecture Specifics: The current implementation is specialized for CNNs and ViTs. Extending this to Large Language Models (LLMs) or Text-to-Speech models would require further specialization of the $K$-step formulation.

The open-source code is available at: https://github.com/mazumder-lab/SNOWS

Summary updated

BibTeX
@inproceedings{lucas2025preserving,
  author = {Ryan Lucas and Rahul Mazumder},
  title = {{Preserving Deep Representations in One-Shot Pruning: A Hessian-Free Second-Order Optimization Framework}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=eNQp79A5Oz},
}
Figure