TL;DR
Computing the diagonal of the Fisher Information Matrix (FIM) is a powerful way to measure parameter sensitivity, but it demands significant post-training computational overhead. This paper introduces Squisher, a method that recycles the squared gradient accumulators already tracked "for free" by adaptive optimizers like Adam during training. Across five distinct deep learning applications, Squisher performs comparably to the true Fisher diagonal while completely eliminating the extra computational cost.
What Problem Does This Paper Address?
In deep learning, knowing which parameters are most critical to a model's performance is incredibly useful. The diagonal elements of the Fisher Information Matrix (the "Fisher diagonal") serve as a mathematically principled metric for this parameter importance. It underpins many popular techniques, including model pruning, sparse training (FISH Mask), calculating task similarities (Task2Vec), mitigating catastrophic forgetting (Elastic Weight Consolidation), and merging distinct models.
However, computing the Fisher diagonal comes with a catch: it requires an expensive post-training phase. Practitioners must sample labels, compute per-example gradients, square them, and average them over thousands of examples. This process is notoriously difficult to parallelize efficiently in modern deep learning frameworks, often forcing sequential computations. Furthermore, it requires access to the original training data, which is frequently unavailable when working with open-source pre-trained models.
The authors ask a simple yet elegant question: Can we recycle an optimizer's saved state to approximate the Fisher diagonal for free?
Methods
Modern optimizers like Adam and AdamW already maintain an exponential moving average (EMA) of the squared gradients to dynamically adjust learning rates during training.
The authors bridge the gap between these optimizer statistics and the Fisher Matrix by utilizing the concept of the Joint Fisher. While the standard Fisher diagonal requires a square-then-sum operation on per-sample gradients, adaptive optimizers perform a sum-then-square operation over each mini-batch. The paper highlights that this sum-then-square structure directly corresponds to the diagonal of the joint empirical FIM.
The proposed method, Squisher (SQUared gradient accumulator as an approximation of the FISHER), simply extracts the optimizer's squared gradient accumulator ($v^{(t)}$) at the end of training. By applying an appropriate scaling factor ($N$, representing dataset or batch size properties), Squisher acts as a drop-in replacement for the Fisher diagonal.
Datasets
The authors evaluated Squisher across a diverse array of models and benchmarks:
- Model Merging (Fisher & UBGM): T5-Large-LM-Adapt evaluated on text datasets (COSMOS_QA, PAWS, QASC, QUAIL, QUARTZ, ROPES, SOCIAL_IQA, WIKI_QA) and RoBERTa on standard text classification tasks.
- Fisher Pruning: VGG-13 trained on the CIFAR-100 image dataset.
- FISH Mask (Sparse Training): BERT-Large evaluated on the GLUE benchmark (including CoLA, MNLI, MRPC, QNLI, QQP, RTE, SST-2, STS-B).
- Task Embedding (Task2Vec): BERT fine-tuned across 22 classification, regression, and question-answering datasets.
- Elastic Weight Consolidation (Continual Learning): MLPs and CNNs evaluated on Split MNIST, Permuted MNIST, and Split CIFAR-100.
Key Insights and Ideas
- The "Aha!" Moment of Scale Invariance: For the majority of applications (such as pruning, masking, model merging, and task embeddings), only the relative importance of parameters matters, not their absolute scale. Because of this, Squisher requires zero hyperparameter tuning to act as a drop-in replacement for the Fisher.
- Data-Free Importance Metrics: Because Squisher relies entirely on the optimizer states saved alongside model checkpoints, it enables practitioners to use Fisher-based methods on models even when the underlying training data is completely missing or proprietary.
- The Joint Fisher Justification: Rather than treating the optimizer's accumulator as a loose heuristic, the authors provide a rigorous connection showing it mathematically aligns with the joint empirical Fisher distribution.
Key Results
The authors ran extensive experiments comparing the true Fisher diagonal, Squisher, and a Fisher-free baseline (like random masking or unweighted averaging).
- Comparable Performance: As shown in Figure 2, Squisher consistently performs on par with—and occasionally outperforms—the explicitly calculated Fisher diagonal across all six evaluation settings, while significantly beating the Fisher-free baselines.
- Massive Speedups: While computing the true Fisher can take hours or even over half a day (e.g., ~14.4 hours for Task Embedding), Squisher takes less than 0.1 seconds because it simply loads pre-existing data from disk.
Limitations and Future Work
Despite its strengths, Squisher has a few notable limitations:
- Sensitivity to Training History: Because Squisher relies on an exponential moving average, its values are heavily influenced by the final steps of training. If a model is early-stopped or hasn't fully converged, the accumulator might not accurately reflect the true parameter importance.
- Absolute Scale Requirements: In rare applications like Elastic Weight Consolidation (EWC), the absolute magnitude of the metric alters regularization strength. In these cases, Squisher requires an explicit scaling factor ($N$) that must be tuned.
- Future Directions: The authors suggest exploring advanced optimizers that track non-diagonal Fisher approximations, or maintaining a running average of the true Fisher throughout the training process to smooth out late-stage training noise.
Summary updated