Source-linked AI summary

WoodFisher: Efficient Second-Order Approximation for Neural Network Compression

Sidak Pal Singh, Dan Alistarh

arXiv:2004.14340v5cs.LGstat.ML

TL;DR

Neural-network compression needs scalable and reliable second-order approximations, but the quality of existing approximations is poorly understood. WoodFisher estimates inverse-Hessian information using empirical-Fisher structure and Woodbury updates, then applies it to pruning. It outperforms prior methods in one-shot pruning and matches or exceeds state-of-the-art approaches in gradual pruning, while supporting global sparsity allocation and limited-data settings.

  • Problem

    Second-order approximations for neural networks have uncertain quality and scalability, despite their importance for optimization and compression.

    Source: §1 · pp. 1–2, §3 · p. 3
  • Method

    WoodFisher approximates Hessian-inverse information through empirical-Fisher structure and the Woodbury identity, integrating it with OBD/OBS-style pruning.

    Source: §1 · p. 2, §4.3 · p. 8
  • Results

    WoodFisher outperforms prior methods for one-shot pruning and matches or exceeds state-of-the-art approaches for gradual pruning.

    Source: §1 · p. 2, §5.1 · p. 10, §5.2 · p. 12
  • Takeaways & Limitations

    The method supports global layer-wise sparsity allocation, compression with limited data, and gradient-aware pruning beyond fully converged models.

    Source: §1 · p. 2, §6.2 · p. 16

    The empirical Fisher sacrifices the true Fisher’s convergence guarantee, and exact multi-parameter pruning becomes intractable.

    Source: §3 · p. 3, §4.2 · p. 8

Abstract

from arXiv · show

Second-order information, in the form of Hessian- or Inverse-Hessian-vector products, is a fundamental tool for solving optimization problems. Recently, there has been significant interest in utilizing this information in the context of deep neural networks; however, relatively little is known about the quality of existing approximations in this context. Our work examines this question, identifies issues with existing approaches, and proposes a method called WoodFisher to compute a faithful and efficient estimate of the inverse Hessian. Our main application is to neural network compression, where we build on the classic Optimal Brain Damage/Surgeon framework. We demonstrate that WoodFisher significantly outperforms popular state-of-the-art methods for one-shot pruning. Further, even when iterative, gradual pruning is considered, our method results in a gain in test accuracy over the state-of-the-art approaches, for pruning popular neural networks (like ResNet-50, MobileNetV1) trained on standard image classification datasets such as ImageNet ILSVRC. We examine how our method can be extended to take into account first-order information, as well as illustrate its ability to automatically set layer-wise pruning thresholds and perform compression in the limited-data regime. The code is available at the following link, https://github.com/IST-DASLab/WoodFisher.

1 Introduction

WoodFisher addresses whether second-order approximations can be accurate and scalable for neural-network compression, extending OBD/OBS pruning to large models. It outperforms prior approaches in both one-shot and gradual pruning while adding global sparsity control, limited-data compression, and first-order extensions.

  • Large neural networks create deployment costs, motivating compression methods rooted in the Optimal Brain Damage/Surgeon framework.Source: §1 · p. 1
  • Existing second-order approximations are computationally coarse, and their quality and scalability for neural networks remain poorly understood.Source: §1 · pp. 1–2
  • WoodFisher approximates the Hessian through empirical-Fisher structure and uses the Woodbury identity for iteratively improving, efficient inverse-Hessian-vector products.Source: §1 · p. 2
  • WoodFisher achieves state-of-the-art compression on models including RESNET-50 [4] and MOBILENET [27] on ILSVRC [28].Source: §1 · p. 2
  • WoodFisher outperforms prior methods for one-shot pruning without retraining and matches or exceeds state-of-the-art approaches under gradual pruning.Source: §1 · p. 2
  • Its extensions provide global parameter-importance measures, automatic layer-wise sparsity allocation, limited-data compression, and gradient-aware pruning of unconverged models.Source: §1 · p. 2

2 Background

The background develops Hessian and Fisher formulations for neural-network loss geometry. It distinguishes true and empirical Fisher matrices and states the conditions under which Fisher information can approximate the Hessian.

  • The training objective averages a loss over input-output examples and learns a parameterized function whose predictions approximate observed outputs.Source: §2 · p. 2
  • The Hessian captures local loss geometry and supports a quadratic approximation around the current parameters.Source: §2 · p. 2
  • The Fisher matrix is defined from the model’s conditional output distribution in the probabilistic formulation.Source: §2 · pp. 2–3
  • When model and data conditional distributions match, the Fisher and Hessian are equivalent.Source: §2 · p. 3
  • The empirical Fisher replaces the model distribution with the empirical training distribution, yielding a more practical approximation.Source: §2 · p. 3
  • The paper distinguishes true Fisher from empirical Fisher and directs readers to prior work for further exposition.Source: §2 · p. 3

3 Efficient Estimates of Inverse-Hessian Vector Products

This section evaluates practical approximations to inverse-Hessian information and introduces WoodFisher, which uses empirical-Fisher structure and Woodbury updates. Experiments support its structural fidelity, local-loss accuracy, and scalability advantages over alternatives.

3 Efficient Estimates of Inverse-Hessian Vector Products

  • Inverse-Hessian-vector products are useful across optimization and machine learning, but direct Hessian storage and computation are prohibitive.Source: §3 · p. 3
  • The empirical Fisher trades the true Fisher’s convergence guarantee for substantially lower computational cost, motivating empirical evaluation in neural networks.Source: §3 · p. 3

3.1 The (Empirical) Fisher and the Hessian: A Visual Tour

  • Hessian and empirical-Fisher blocks show similar structure across layers, including before full convergence, although their main difference is scale.Source: §3.1 · pp. 3–4, Figure 1 · p. 4

3.2 The WoodFisher Approximation

  • WoodFisher uses the Woodbury identity to update inverse empirical-Fisher estimates, with damping making the initial matrix positive definite.Source: §3.2 · pp. 4–5
  • The WoodFisher local quadratic model accurately predicts actual training loss along three 50%-sparsity pruning directions, with damping controlling conservativeness.Source: §3.2 · p. 5, Figure 2 · p. 5
  • Block-wise approximation reduces inversion cost to O(mcd), making computation linear in parameter dimension d under fixed block size c.Source: §3.2 · p. 5

3.3 Context and Alternative Methods

  • Diagonal approximations can be inaccurate, whereas WoodFisher provides better IHVP estimates at an additional constant-factor cost; K-FAC also has architectural and approximation limitations.Source: §3.3 · pp. 5–6
  • WoodFisher extends earlier empirical-Fisher ideas to modern network sizes and can outperform K-FAC even for fully connected networks.Source: §3.3 · p. 6

4 Model Compression

The paper formulates pruning as minimizing a local quadratic loss increase and uses inverse-Hessian statistics to select parameters. Because exact multi-parameter optimization is intractable, WoodFisher supplies practical global or layerwise approximations.

4 Model Compression

  • Pruning methods are organized into second-order, iterative, dynamic, and variational or regularization-based classes; WoodFisher belongs to the second-order class and can combine with iterative or dynamic methods.Source: §4 · p. 6
  • Optimal Brain Damage minimizes the local quadratic loss increase caused by setting selected weights to zero, typically omitting the gradient term at a local optimum.Source: §4 · p. 6

4.1 Removing a single parameter wq

  • For one parameter, the constrained perturbation fixes that weight to zero and the pruning statistic ranks candidates by their estimated loss increase.Source: §4.1 · p. 7

4.2 Removing multiple parameters at once

  • Exact selection of many parameters becomes exponentially difficult, so practical pruning requires an approximation rather than solving the full constrained problem.Source: §4.2 · p. 8
  • Multi-parameter interactions make the dual problem nonseparable whenever relevant off-diagonal inverse-Hessian terms are nonzero.Source: §4.2 · p. 8

4.3 Discussion

  • WoodFisher forms a pruning direction by sorting parameters by pruning statistic and summing optimal updates for the selected removals.Source: §4.3 · p. 8
  • Diagonal Hessians recover Optimal Brain Damage, while isotropic Hessians recover global magnitude pruning.Source: §4.3 · p. 8
  • Global WoodFisher jointly selects parameters across layers, automatically allocating sparsity without layer sensitivity analysis or heuristics such as skipping boundary layers.Source: §4.3 · p. 9

5 Experimental Results

Experiments evaluate WoodFisher for one-shot and gradual unstructured pruning across ResNet and MobileNet benchmarks, including approximation, chunk-size, and inference analyses. WoodFisher consistently outperforms the reported pruning baselines while offering accuracy–latency trade-offs and automatic sparsity allocation.

5.1 One-shot pruning

  • In one-shot ResNet-20 pruning, WoodFisher-joint beats global magnitude pruning by about 5% and 10% test accuracy at 70% and 80% sparsity, respectively.Both joint and independent variants outperform magnitude and diagonal-Fisher pruning; diagonal-Fisher becomes worse than magnitude pruning above 30% sparsity.Source: §5.1 · p. 9, Figure 3 · p. 9
  • Larger WoodFisher chunks improve performance monotonically, while Hessian-inverse recomputation further improves one-shot ResNet-50 pruning without retraining.The chunk-size trend supports more accurate inverse estimates, and recomputation addresses the local quadratic model’s limited trust region.Source: §5.1 · pp. 9–10, Figure 4 · p. 10
  • WoodFisher also outperforms L-OBS at every reported sparsity level, with independent and joint variants improving test accuracy by up to approximately 3.5% and 20% at 65% sparsity.The comparison uses Top-5 accuracy for one-shot ResNet-50 pruning on ImageNet.Source: §5.1 · p. 10, Figure 5 · p. 11

5.2 Gradual Pruning

  • WoodFisher outperforms all baselines across gradual and dynamic pruning for ResNet-50, with Top-1 gains of approximately 1%, 1.5%, and 3.3% over STR at 90%, 95%, and 98% sparsity.The comparison is reported in Table 1 for the specified sparsity regimes.Source: §5.2 · p. 11, Table 1 · p. 12

ADDITIONAL COMPARISONS

  • WoodFisher outperforms state-of-the-art methods across all considered sparsity regimes for both ResNet-50 and MobileNetV1, establishing the reported unstructured-pruning benchmark result.The summary covers the additional comparisons, including statistically significant gains over Global Magnitude on MobileNetV1.Source: Table 4 · p. 13, ADDITIONAL COMPARISONS · p. 14, Table 5 · p. 14

5.3 What goes on during gradual pruning?

  • During gradual pruning, WoodFisher produces better pruning directions after almost every step, and global magnitude pruning fails to catch up despite substantial intervening retraining.Magnitude pruning performs worse in the corresponding stepwise comparison.Source: §5.3 · p. 14, Figure 6 · p. 14

5.4 Actual inference speed-up

  • At approximately 90% global sparsity, WF-Joint gains 0.95% Top-1 accuracy over STR for a 1.2 ms batch-1 latency difference, while WF-Independent offers a similar accuracy improvement with a 0.5 ms difference.All evaluated methods speed up inference relative to the dense baseline, and the standard WoodFisher variants trade higher accuracy for higher inference time than STR.Source: §5.4 · p. 15, Table 6 · p. 15

6 Extensions

The extensions broaden WoodFisher from standard pruning to structured pruning, nonstationary training points, and unlabeled-data settings. Across these cases, the supplied results show WoodTaylor’s advantage at a general training point and comparable empirical versus sampled Fisher behavior without labels.

6.1 WoodFisher for structured pruning

  • Structured pruning extends the pruning statistic from individual parameters to parameter groups, with a correlation-aware formulation intended for blocks or filters.The group indicator is represented by a one-hot vector, and the formulation is obtained by combining multiple removal constraints.Source: §6.1 · pp. 15–16
  • The structured-pruning extension remains incompletely evaluated, with a detailed empirical investigation left for future work.Source: §6.1 · p. 16

6.2 WoodTaylor: Pruning at a general point

  • WoodTaylor incorporates the first-order gradient term into the pruning analysis, making the method applicable when gradients are not close to zero.This targets pruning during training or models that are far from an optimum.Source: §6.2 · pp. 16–17
  • WoodTaylor improves over magnitude and diagonal-Fisher pruning, even exceeding the initial dense model’s accuracy by about 5% up to roughly 90% sparsity.The experiment uses one-shot compression of a partially trained MLPNET on MNIST, with 8000 Fisher samples and dampening 1e-1.Source: §6.2 · p. 17, Figure 7 · p. 17
  • On pre-trained RESNET-20 on CIFAR-10, WoodTaylor can also outperform WoodFisher because the gradient is usually not exactly zero.Source: §6.2 · p. 17

6.3 Sampled Fisher: The case of unlabelled data

  • Sampled WoodFisher computes gradients using samples from the model distribution rather than labels, enabling unsupervised compression; on RESNET-50, it performs similarly to empirical WoodFisher with slightly higher variance.The comparison concerns one-shot pruning on ImageNet, and the authors conclude that sampled WoodFisher is usable when labels are unavailable.Source: §6.3 · p. 18, Table 7 · p. 18

7 Discussion

The paper positions WoodFisher as a successful large-scale extension of foundational pruning ideas. It concludes that the method achieves state-of-the-art results while motivating broader investigation of second-order properties beyond compression.

7 Discussion

  • Future applications include structured pruning, compression of Transformer models, and efficient inverse-Hessian-vector products for influence functions.Source: §7 · p. 18
  • WoodFisher extends foundational neural-network pruning work to large-scale settings and yields state-of-the-art results.Source: §7 · p. 18

S1.1 Pruning schedule

The gradual-pruning experiments use a common retraining and sparsity schedule across WoodFisher and magnitude-based baselines. Pruning timing and learning-rate decay are adjusted for the model architecture.

S1.1 Pruning schedule

  • The overall procedure runs for 100 epochs with retraining between pruning steps and afterward, using SGD with learning rate 0.005, momentum 0.9, and weight decay 0.0001.Source: S1.1 Pruning schedule · p. 23
  • ResNet-50 is pruned every five epochs from epoch 1 through epoch 40, followed by exponential learning-rate decay from epochs 40 to 90.Source: S1.1 Pruning schedule · p. 23
  • MobileNetV1 is pruned every four epochs from epoch 4 through epoch 24, followed by exponential learning-rate decay from epoch 30 through epoch 100.Source: S1.1 Pruning schedule · p. 23
  • The pruning amount at each step follows a polynomial schedule with initial sparsity set to 0.05.Source: S1.1 Pruning schedule · p. 23
  • WoodFisher, Global Magnitude, and Magnitude use the same gradual-pruning schedule, with the pruner replaced inside a procedure originally designed for magnitude pruning.Source: S1.1 Pruning schedule · p. 23

S1.2 WoodFisher Hyperparameters

WoodFisher’s hyperparameters control Fisher estimation, block size, damping, and batch processing. The reported settings vary mainly by model size and are accompanied by a dedicated ablation study.

S1.2 WoodFisher Hyperparameters

S1.3 Run time costs for WoodFisher pruning steps

WoodFisher pruning steps add measurable computational cost, but the cost is limited in the gradual-pruning schedule and can be traded against accuracy through hyperparameter choices.

S2 More on the related work for IHVPs

This section examines alternative inverse-Hessian approximations and WoodFisher extensions for pruning, covering approximation structure, scalability, cost-aware compression, and empirical-Fisher behavior. It also analyzes FLOPs-aware and first-order variants, their tradeoffs and sensitivities, and related pruning configurations and conditions.

S2.1 K-FAC

  • K-FAC enables efficient Fisher inversion through Kronecker factors, but its expectation-factorization approximation can be inaccurate and requires further approximations for convolutional, recurrent, and large networks.WoodFisher is presented as an alternative using the empirical Fisher with a Woodbury-based inverse.Source: S2.1 K-FAC · pp. 24–25

S2.2 Other methods

  • Other inverse-Hessian approaches trade accuracy or scalability for simplicity: exact Hessians are cubic-time, diagonal estimates are less accurate, Hessian-free solvers may require many iterations, and Neumann methods require spectral scaling.Woodbury-based OBS extensions are more specialized, whereas WoodFisher is described as more general and experimentally better at scale.Source: S2.2 Other methods · pp. 25–26
  • At 65% sparsity on ImageNet ResNet-50, independent and joint WoodFisher outperform L-OBS by up to ∼3.5% and 20% top-5 accuracy, respectively.Both WoodFisher variants outperform L-OBS at all reported sparsity levels, with joint WoodFisher also automatically adjusting sparsity distributions.Source: S2.2 Other methods · p. 26, Figure S1 · p. 26

S3.1 All figures for Hessian and empirical Fisher comparison on CIFARNET

S3.2 Across different stages of training

  • The empirical Fisher retains Hessian-like structure throughout training, including as early as 0.5 epochs, even when model and data distributions theoretically do not match.MNIST experiments found substantial similarity in 200 × 200 last-layer submatrices using 16 samples, with similar trends for larger sample counts.Source: S3.2 Across different stages of training · pp. 28–29, Figure S4 · p. 29

S4.1 One-shot Pruning

  • For one-shot pruning on ImageNet, WoodFisher outperforms Global Magnitude and Magnitude on ResNet-50, including with as few as 8,000 data samples, and also outperforms both on MobileNetV1.Increasing the fisher subsample size from 80 to 240 helps a bit. Recomputing the Hessian inverse estimate during pruning significantly improves performance because the local quadratic model is valid only within a small trust-region.Source: S4.1 One-shot Pruning · p. 30, Figure S5 · p. 30

S5 Gradual pruning scores at best runs

S6 FLOPs and Inference Costs

  • FLOPs-aware pruning normalizes each parameter’s pruning statistic by its layer’s FLOP cost, controlling the FLOPs–accuracy trade-off without manually designing sparsity distributions.The parameter β controls FLOP influence, while the remainder of the pruning procedure stays unchanged and costs are measured on active parameters during gradual pruning.Source: S6 FLOPs and Inference Costs · p. 37
  • STR produces more uniform layer-wise sparsity and lower theoretical FLOP costs than standard WoodFisher or Global Magnitude, despite worse pruned-model accuracy.The methods can redistribute sparsity differently across layers, while practical sparsity profiles correlate with layer parameter counts.Source: S6 FLOPs and Inference Costs · p. 37
  • With FLOPs-aware pruning, WoodFisher achieves higher accuracy and lower FLOP costs than STR for both ResNet-50 and MobileNetV1, including an ≈1% accuracy gain at 101 M FLOPs on MobileNetV1.The comparison uses β = 0.30 for ResNet-50 and β = 0.35 for MobileNetV1.Source: S6 FLOPs and Inference Costs · p. 37
  • FLOPs-aware WoodFisher yields a 20% relative inference-time improvement over STR at batch size 64.The result is reported for the FLOPs-aware statistic with β = 0.30 on the CPU inference benchmark.Source: S6 FLOPs and Inference Costs · p. 38, Table S7 · p. 38

S7.1 ResNet-50

  • The supplement reports WoodFisher and Global Magnitude’s layer-wise sparsity distributions for ResNet-50 at 80%, 90%, 95%, and 98% sparsity.The reported distributions cover ImageNet sparsification settings for both methods.Source: Table S8 · p. 39

S7.2 MobileNetV1

  • A corresponding layer-wise sparsity comparison for MobileNetV1 reports WoodFisher and Global Magnitude at 75% and 89% sparsity.These distributions are reported for ImageNet sparsification settings.Source: Table S9 · p. 40

S8 FLOPs-aware sparsity distributions

  • FLOPs-aware sparsity distributions are reported for WoodFisher on ResNet-50 at 90% sparsity and MobileNetV1 at 75.28% sparsity across the listed β settings.The reported β values are 0.00 and 0.30 for ResNet-50, and 0.00, 0.30, and 0.35 for MobileNetV1.Source: Table S10 · p. 41, Table S11 · p. 42

S9.1 Pre-trained model

  • On full-matrix ResNet-20 pruning, WoodTaylor with damp=1e−3 outperforms WoodFisher across almost all target sparsity levels.The comparison prunes three convolutional layers in a CIFAR-10 pretrained model without block-wise assumptions.Source: S9.1 Pre-trained model · p. 43, Figure S13 · p. 43, Figure S14 · p. 43
  • WoodTaylor requires dampening tuning because its gradient–inverse-Hessian interaction makes performance more sensitive to hyperparameters, whereas WoodFisher is hyperparameter-free.With damp=1e−5, the WoodTaylor weight update has about 10× the original weight norm; these experiments use 50,000 samples.Source: S9.1 Pre-trained model · p. 43
Loading 2004.14340v5…