The Challenge: The Cost of Parameter Importance
In deep learning, we often need to know which parameters are most "important" to a model's function. The Fisher Information Matrix (FIM) provides a principled way to measure this sensitivity. Its diagonal elements reveal how much a small change in a specific weight will affect the model's output. This information is vital for advanced tasks like model merging (combining fine-tuned models), pruning (removing unimportant weights to compress the model), and continual learning (preventing a model from catastrophically forgetting old tasks).
However, calculating the Fisher diagonal is notoriously difficult for two main reasons:
- Computational Cost: It requires computing per-example gradients, which is incredibly slow and memory-intensive in standard frameworks like PyTorch or TensorFlow.
- Data Access: You need the original training data to compute it. If you download a pre-trained model from a hub, the original dataset might be proprietary or unavailable.
This paper asks a clever question: Since modern adaptive optimizers like Adam already track a "moving average of squared gradients" during training, can we just recycle that state instead of recalculating the Fisher from scratch?
Introducing Squisher: The "Free" Fisher
The authors propose Squisher (Squared gradient accumulator as an approximation of the Fisher), a method that approximates the Fisher diagonal "for free" by simply reusing the squared gradient accumulators already stored by the optimizer.
- The Standard Approach: To get the Fisher diagonal, you typically run hundreds or thousands of examples through the model, calculate the gradient for each, square them, and average them.
- The Squisher Approach: You simply extract the
state_dictof the optimizer (like Adam or AdamW) at the end of training. Specifically, you isolate the $v$ term, which represents the second moment estimate.
The paper provides a theoretical bridge connecting these two concepts. It shows that the optimizer's accumulator is closely related to the "Joint Fisher"—a variant of the FIM that squares the sum of gradients rather than summing the squares. For tasks where the absolute magnitude matters (like Elastic Weight Consolidation in continual learning), the authors introduce a simple "undo scale" step to account for the difference between the optimizer's moving average and the standard Fisher's sum.
Key Insights and Ideas
- The "Free" Lunch: The most significant insight is that the deep learning community has been throwing away a gold mine of sensitivity information. Every time we delete an optimizer checkpoint after training to save disk space, we are deleting a pre-computed approximation of the Fisher diagonal.
- Scale Invariance: Many applications, like pruning or FISH masking, only care about the relative rank of the parameters (e.g., identifying the top 10% most important weights). For these tasks, Squisher can be used exactly as-is without any rescaling.
- Data-Free Analysis: Because Squisher relies entirely on the saved optimizer state, you can perform complex model merging or pruning on a pre-trained model even if you don't have a single row of the original training data.
Key Results
The researchers validated Squisher across a massive range of models and datasets, including NLP tasks (T5-Large, RoBERTa, BERT-Large on GLUE) and Computer Vision tasks (VGG-13, MLPs/CNNs).
- Performance Parity: Across six diverse applications—Fisher Merging, UBGM Merging, Pruning, FISH Masking, Task Embedding, and EWC—Squisher performed almost identically to the "true" Fisher diagonal.
- Massive Speedup: The computational savings are staggering. In the Model Merging experiments, computing the true Fisher took nearly 8 hours ($2.93 \cdot 10^4$ seconds). Squisher took less than 0.1 seconds because it only required loading existing values from disk.
- Beating Baselines: Squisher consistently outperformed "Fisher-free" baselines (like random masking or simple parameter averaging), proving that the optimizer state contains genuine, high-quality structural information about the loss landscape.
Limitations and Future Work
While powerful, Squisher does have limitations. It relies on an Exponential Moving Average (EMA). If a model is only trained for a few steps, the accumulator might be noisy or reflect the "old" geometry of the starting weights rather than the final converged state. Additionally, this method strictly requires an adaptive optimizer; if a model is trained with vanilla SGD (which doesn't track squared gradients), Squisher cannot be used.
Looking forward, the authors suggest exploring whether more advanced optimizers that track non-diagonal information (like K-FAC or Shampoo) could be similarly "recycled." This could potentially approximate the full, non-diagonal Fisher matrix, unlocking even more precise model surgery in the future.
Summary updated