Abstract
Deep neural networks (DNNs) are currently predominantly trained using first-order methods. Some of these methods (e.g., Adam, AdaGrad, and RMSprop) incorporate a small amount of curvature information by using a diagonal matrix to precondition the stochastic gradient. Recently, effective second-order methods, such as KFAC, K-BFGS, Shampoo, and TNT, have been developed for training DNNs by preconditioning the stochastic gradient by layer-wise block-diagonal matrices. Here we propose a "mini-block Fisher (MBF)" preconditioned gradient method that lies in between these two classes of methods. Specifically, our method uses a block-diagonal approximation to the empirical Fisher matrix, where for each layer, the associated diagonal block is itself block-diagonal and is composed of a large number of mini-blocks of modest size. Our approach utilizes GPU parallelism to efficiently perform computations, resulting in a per-iteration cost only slightly higher than first-order methods. We validate MBF on autoencoder and CNN problems, demonstrating its effectiveness in time efficiency and generalization.
Introduction
The optimization of deep neural networks (DNNs) typically relies on first-order methods like SGD or Adam due to their low computational overhead. However, these methods often converge slowly in "ill-conditioned" landscapes characterized by narrow valleys. Second-order methods address this by utilizing curvature information (the Hessian or Fisher Information Matrix) to precondition the gradient, enabling larger and more effective steps. The primary challenge for second-order methods is the immense size of these matrices, which makes direct storage and inversion infeasible for modern models. While methods like KFAC provide layer-wise approximations, they remain computationally and memory-intensive.
The Mini-Block Fisher (MBF) Method
The proposed Mini-Block Fisher (MBF) method introduces a granular approximation of the Empirical Fisher Matrix (EFM) to bridge the gap between diagonal (first-order) and block-diagonal (second-order) preconditioning.
MBF subdivides each layer's diagonal block into thousands of independent "mini-blocks":
- Convolutional Layers: Each mini-block corresponds to a single input-output channel pair (a kernel).
- Fully Connected Layers: Each mini-block corresponds to the weights of a single output neuron.
This granularity allows for massive parallelism on GPUs, as thousands of small matrices (e.g., $3 \times 3$ or $5 \times 5$) can be inverted simultaneously. To further reduce overhead, the Fisher statistics and their inverses are updated periodically (amortized) rather than at every iteration. Specifically, statistics are updated every $T_1$ iterations (e.g., 10), and matrix inverses are recomputed every $T_2$ iterations (e.g., 100). Theoretically, the authors prove that an idealized version of MBF achieves linear convergence, closing the gap to the optimal solution at a consistent exponential rate.
Empirical Justification and Results
The core assumption of MBF is that the most significant curvature information is concentrated along the diagonal of the Fisher matrix. Heatmaps of the inverse Fisher matrix support this, showing that off-diagonal correlations between different kernels or neurons are relatively negligible.
Performance Benchmarks
MBF was evaluated against standard baselines (Adam, SGD-m, KFAC) on several datasets:
- Generalization: On CIFAR-100 with VGG16, MBF achieved ~74.8% validation accuracy, outperforming Adam (~72.9%) and KFAC (~74.3%).
- Efficiency: On ResNet32, MBF's wall-clock speed per epoch was comparable to Adam, but it required fewer iterations to converge, leading to superior overall efficiency.
- Optimization Power: In highly ill-conditioned autoencoder tasks (MNIST, FACES, CURVES), MBF significantly outperformed first-order methods and matched the performance of more complex second-order optimizers like Shampoo.
Conclusion
MBF offers a "Goldilocks" solution for DNN optimization, providing the benefits of second-order curvature information with a computational cost near that of first-order methods. By leveraging the local concentration of curvature and GPU parallelism, it achieves superior generalization and convergence speed. Future work will explore extending MBF to architectures like Transformers and RNNs, as well as developing a fully stochastic convergence theory.
Summary updated