Structured Inverse-Free Natural Gradient: Memory-Efficient & Numerically-Stable KFAC
Wu Lin, Felix Dangel, Runa Eschenhagen, Kirill Neklyudov, Agustinus Kristiadi, Richard E. Turner, Alireza Makhzani
TL;DR
This work tackles the memory and numerical stability drawbacks of second-order methods in deep learning, notably KFAC, by introducing Structured Inverse-Free NGD (SINGD). SINGD unifies inverse-free updates (INGD) with structured Kronecker factors to achieve memory efficiency and robustness, often surpassing AdamW in mixed-precision settings. It demonstrates that IKFAC aligns with KFAC in the inverse-free regime and shows that a range of structured factors (diagonal, block-diagonal, hierarchical, Toeplitz) can substantially reduce memory while preserving performance. Empirical results across CNNs, transformers, and GNNs, including large-scale ViT on ImageNet-100, indicate that SINGD delivers competitive or superior test accuracy with lower memory and comparable or lower iteration cost, thereby broadening the applicability of second-order methods in low-precision training.
Abstract
Second-order methods such as KFAC can be useful for neural net training. However, they are often memory-inefficient since their preconditioning Kronecker factors are dense, and numerically unstable in low precision as they require matrix inversion or decomposition. These limitations render such methods unpopular for modern mixed-precision training. We address them by (i) formulating an inverse-free KFAC update and (ii) imposing structures in the Kronecker factors, resulting in structured inverse-free natural gradient descent (SINGD). On modern neural networks, we show that SINGD is memory-efficient and numerically robust, in contrast to KFAC, and often outperforms AdamW even in half precision. Our work closes a gap between first- and second-order methods in modern low-precision training.
