LGJul 1, 2025

Kronecker-factored Approximate Curvature (KFAC) From Scratch

arXiv:2507.05127v15 citationsh-index: 12
Originality Synthesis-oriented
AI Analysis

This is an incremental contribution aimed at researchers and practitioners who need to implement or extend KFAC for applications like optimization and Bayesian deep learning.

The paper tackles the challenge of implementing Kronecker-factored approximate curvature (KFAC) in deep learning by providing a tutorial with math, code, and test cases to ensure reliability and ease of use.

Kronecker-factored approximate curvature (KFAC) is arguably one of the most prominent curvature approximations in deep learning. Its applications range from optimization to Bayesian deep learning, training data attribution with influence functions, and model compression or merging. While the intuition behind KFAC is easy to understand, its implementation is tedious: It comes in many flavours, has common pitfalls when translating the math to code, and is challenging to test, which complicates ensuring a properly functioning implementation. Some of the authors themselves have dealt with these challenges and experienced the discomfort of not being able to fully test their code. Thanks to recent advances in understanding KFAC, we are now able to provide test cases and a recipe for a reliable KFAC implementation. This tutorial is meant as a ground-up introduction to KFAC. In contrast to the existing work, our focus lies on providing both math and code side-by-side and providing test cases based on the latest insights into KFAC that are scattered throughout the literature. We hope this tutorial provides a contemporary view of KFAC that allows beginners to gain a deeper understanding of this curvature approximation while lowering the barrier to its implementation, extension, and usage in practice.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes