Kronecker-factored Approximate Curvature (KFAC) From Scratch

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Dangel, Felix, Mucsányi, Bálint, Weber, Tobias, Eschenhagen, Runa
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911042655748096
author Dangel, Felix
Mucsányi, Bálint
Weber, Tobias
Eschenhagen, Runa
author_facet Dangel, Felix
Mucsányi, Bálint
Weber, Tobias
Eschenhagen, Runa
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2507_05127
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Kronecker-factored Approximate Curvature (KFAC) From Scratch
Dangel, Felix
Mucsányi, Bálint
Weber, Tobias
Eschenhagen, Runa
Machine Learning
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.
title Kronecker-factored Approximate Curvature (KFAC) From Scratch
topic Machine Learning
url https://arxiv.org/abs/2507.05127