TL;DR
The Empirical Fisher (EF) is a popular but flawed shortcut used to speed up deep learning optimization. This paper identifies a systematic "inversely-scaled projection" error in EF and introduces Improved Empirical Fisher (iEF), a simple scaling fix that provides better convergence, superior approximation of true Natural Gradients, and remarkable robustness to hyperparameters.
The Problem with Empirical Fisher
In deep learning, models typically navigate the loss landscape using first-order gradient methods like SGD or Adam. However, Natural Gradient Descent (NGD) is theoretically superior because it uses the "curvature" of the landscape—encoded in the Fisher Information Matrix (FIM)—to take more direct paths toward the minimum.
The catch is that calculating the exact FIM is computationally prohibitive for modern models. To bypass this, researchers often use the Empirical Fisher (EF), which approximates the FIM by recycling the gradients already calculated during backpropagation. While easy to implement, EF has a well-known reputation for poor performance.
The authors of this paper pinpoint exactly why EF fails: the inversely-scaled projection issue. They mathematically demonstrate that standard EF updates induce an equal loss reduction on every sample in a batch. This means a sample that is nearly converged (with a tiny gradient) gets a massive update relative to its needs, while a sample that needs significant adjustment (large gradient) is relatively ignored. Consequently, EF updates are biased toward samples that are already well-trained, leading to distorted training trajectories and unstable updates.
The Solution: Improved Empirical Fisher (iEF)
To resolve this, the authors propose Improved Empirical Fisher (iEF).
iEF introduces a diagonal scaling matrix based on the gradient norm at the model's output (logits). This simple fix ensures that the loss reduction for each sample is proportional to its current "convergence level," effectively correcting the inversely-scaled projection issue.
Evaluating these approximations is notoriously difficult because computing the true Fisher matrix for large models is impossible. To prove iEF's efficacy, the authors introduce a novel evaluation framework that uses matrix-vector products (via a double-differentiation trick) to measure approximation quality without ever needing to store or invert the full Fisher matrix.
Experimental Setup
The researchers evaluated iEF across several practical deep learning setups:
- GLUE Benchmark: Seven tasks (CoLA, SST-2, MRPC, QQP, MNLI, QNLI, RTE) using a T5-base model.
- CIFAR-100: Image classification using a Vision Transformer (ViT).
- CIFAR-10: A train-from-scratch experiment using a 10M parameter Multi-layer Perceptron (MLP) to test the method on larger trainable parameter counts.
- PEFT Methods: Most experiments utilized Parameter-Efficient Fine-Tuning (LoRA and Prompt-Tuning) to keep the "exact" versions of these optimizers computationally feasible.
Key Insights and Results
EF is "Attracted" to the Wrong Things
Visualizations of optimization trajectories clearly show the flaws in EF and the corrections made by iEF. EF updates are literally pulled toward the optimal parameters of individual samples that are already converged, rather than the global minimum. iEF completely eliminates this distortion, mirroring the direct path of true NGD.
Optimization and Generalization Performance
iEF achieved the lowest training loss for 12 out of 15 evaluated tasks. In Prompt-Tuning experiments, iEF outperformed the well-tuned Adafactor baseline in 6 out of 7 GLUE tasks, demonstrating strong generalization capabilities.
Robustness to Damping
Most second-order methods require "damping" (adding a small value to the diagonal of the matrix to keep it invertible). EF and Sampled Fisher (SF) are notoriously sensitive to this hyperparameter. iEF, however, works exceptionally well even with near-zero damping, making it significantly easier to tune in practice.
Better than "Unbiased" Methods
Surprisingly, iEF often provided a better approximation to the true Natural Gradient than the "Sampled Fisher" (SF) method, which is theoretically unbiased but more computationally expensive. Under the new evaluation framework, iEF consistently showed higher "direction-wise" similarity to exact Natural Gradient updates compared to both EF and SF.
Stability
While EF often diverged halfway through training in the experiments, iEF remained stable and continued to improve throughout the entire training process.
Limitations and Future Work
While iEF presents a major step forward, challenges remain for massive-scale deployment:
- Memory Constraints: The "exact" version of iEF used in this paper requires storing per-sample gradients. While feasible for PEFT (where only a few parameters are trained), it is currently too memory-intensive for full-parameter training of massive LLMs.
- Integration with K-FAC: To scale iEF to the largest models, it needs to be integrated with "structure-aware" approximations like K-FAC. The authors provide a preliminary proof-of-concept for this in the appendix, but further development is required.
- Optimizer Features: The current implementation of the iEF optimizer is "vanilla." It does not yet incorporate common optimization tricks like momentum or weight decay, which could further boost its performance.
Ultimately, iEF isn't just an optimizer; it's a fundamentally better way to approximate the Fisher matrix itself. This opens the door to improving a wide variety of Fisher-based algorithms, including those used for model compression and pruning.
Summary updated