TL;DR
Second-order pruning methods like Optimal Brain Surgeon (OBS) achieve impressive compression by calculating parameter importance and compensatory updates, but calculating and inverting the Fisher Information Matrix (FIM) is computationally brutal and error-prone. FishLeg Surgeon (FLS) repurposes the FishLeg second-order optimizer to directly learn a structured, low-rank approximation of the inverse FIM online. This avoids explicit matrix inversion, dynamically refines curvature estimates during fine-tuning, and outperforms standard OBS baselines at extreme sparsities.
What Problem Does This Paper Address?
Modern deep neural networks require massive compute and memory, making them impractical for edge devices or resource-constrained research teams. While pruning removes redundant weights, the highest-performing compression methods rely on second-order derivatives (Hessian or Fisher information) to determine which weights are least critical and how to adjust the surviving weights to compensate (the OBS framework).
However, classical OBS techniques face two major bottlenecks:
- Inversion and Noise: Estimating the empirical Fisher matrix and then explicitly inverting it amplifies gradient noise and requires aggressive approximations (e.g., partitioning parameters into tiny independent blocks of size 50).
- Curvature Discarding: In gradual pruning, standard methods throw away previously learned curvature at every pruning step and recalculate/invert the Fisher from scratch.
Methods
FLS bridges the gap between second-order optimization and neural compression by adapting the FishLeg optimizer for pruning:
- Direct Inverse Estimation: Instead of estimating the Fisher matrix $F$ and inverting it, FLS meta-learns an amortized approximation of the inverse Fisher, $Q(\lambda) \approx (F + \gamma I)^{-1}$, by optimizing an auxiliary loss derived from Legendre duality.
-
Expressive Tensor Factorization: To keep parameter counts manageable across entire layers, $Q(\lambda)$ is structured using Kronecker products combined with diagonal scaling matrices: $$Q(\lambda) = D (LL^\top \otimes RR^\top) D$$ This formulation scales to full layers (both dense and convolutional) while allowing efficient extraction of diagonal elements needed for OBS saliency scores.
-
Rolling Online Updates: Rather than discarding curvature information between pruning steps, FLS alternates between masked model fine-tuning and taking auxiliary gradient steps on $Q(\lambda)$. The inverse Fisher is continually refined rather than recomputed from scratch.
- Initialization and Preconditioning:
- Theoretical analysis of the auxiliary loss dynamics showed that the largest eigenvalues of $Q$ converge slowest. The authors initialize $Q_0 = \alpha I$ with a large $\alpha \approx \gamma^{-1}$ (where $\gamma$ is the damping parameter) so slow-moving directions start near their optimal targets.
- They introduce a dynamic preconditioner $P(t) = Q(t)$ on the auxiliary loss, which costs only one additional matrix-vector product per step but dramatically accelerates asymptotic convergence.
+-------------------------------------------------------+
| Gradual Pruning Loop |
| |
| 1. Score & Prune weights via Q(lambda) diag |
| 2. Fine-tune remaining weights using FishLeg |
| 3. Refine Q(lambda) online via auxiliary loss |
+-------------------------------------------------------+
Datasets
The authors evaluate FLS on standard vision benchmarks using a ResNet18 backbone:
- CIFAR-10 (10 classes)
- Tiny ImageNet (TinyIM) (200 classes)
- Synthetic linear regression benchmarks are used for controlled ablation studies of curvature convergence, block sizes, and conditioning.
No new datasets were introduced.
Key Insights and Ideas
- Fitting the Inverse Directly Eliminates Inversion Bias: Inverting a noisy empirical Fisher matrix yields an estimator whose bias persists asymptotically. Directly optimizing $Q$ against mini-batch Fisher-vector products provides an unbiased gradient on the auxiliary loss, naturally smoothing out stochastic noise.
- Curvature Continuity in Gradual Pruning: Gradual pruning removes small percentages of weights at a time. Because network parameters change slowly between steps, amortizing the inverse FIM in a rolling fashion allows curvature knowledge to carry over from one step to the next.
- Kronecker + Diagonal Expressivity: Standard KFAC methods strictly use Kronecker factors derived from mathematical approximations. Adding a diagonal parameter matrix $D$ significantly increases expressiveness, allowing FLS to outperform small-block OBS approximations and low-rank methods like M-FAC.
Key Results
- High-Sparsity Unstructured Pruning: FLS substantially outperforms standard OBS and magnitude pruning at high sparsity levels:
- CIFAR-10: At 95% sparsity, FLS achieves 84% accuracy, compared to 60% for OBS. At 99% sparsity, FLS experiences only a ~2.5% drop from the dense baseline (83.4%).
- TinyIM: At 80% sparsity, FLS achieves 53% accuracy versus 48% for OBS (dense baseline: 55.4%).
- 2:4 Semi-Structured Pruning:
- On CIFAR-10, FLS attains 84.03% test accuracy (improving over the 83.4% dense baseline, likely due to regularization/Occam’s razor effects), outperforming OBS (81.50%) and magnitude pruning (80.28%).
- On TinyIM, FLS reaches 51.09%, closely competing with OBS (52.04%) and beating magnitude pruning (47.53%).
Limitations and Future Work
- Layer Type Coverage: The current structured factorizations of $Q$ are designed specifically for dense and 2D convolutional layers. Transformer-specific architectures (e.g., multi-head attention) require their own tailored factorizations.
- Scale of Evaluation: Experiments were restricted to ResNet18 on small-to-medium vision benchmarks (CIFAR-10 and Tiny ImageNet) trained on a single RTX 2080 GPU. Validating the approach on modern large language models (LLMs) or large-scale vision backbones remains open.
- Hardware Acceleration: The paper evaluates theoretical sparsity and accuracy, leaving runtime benchmarks on specialized sparse hardware (such as Nvidia Sparse Tensor Cores) and integration with quantization to future work.
Summary updated