Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KFAC optimizer #35801

Open
n-gao opened this issue Apr 1, 2020 · 3 comments
Open

Add KFAC optimizer #35801

n-gao opened this issue Apr 1, 2020 · 3 comments
Assignees
Labels
module: optimizer Related to torch.optim needs research We need to decide whether or not this merits inclusion, based on research world triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@n-gao
Copy link

n-gao commented Apr 1, 2020

🚀 Feature

Add the Kronecker-factored Approximate Curvature (KFAC) optimizer and/or E-KFAC.

Motivation

These are both approximate second order methods with promising results in terms of convergence rate. KFAC uses an block-diagonal approximation to the Fisher information matrix to approximate natural gradients. This allows for larger learning rates and thus improved convergence rate. Having a fully features built-in optimizer allows researchers and deep learning engineers to quickly iterate and test.

Pitch

A KFAC implementation that works out of the box for all supported layers should be added to the built-in optimizers.

Additional context

An unmaintained Pytorch implementation
The standard TF implementation
KFAC for CNN
KFAC for RNN

cc @vincentqb

@ezyang ezyang added module: optimizer Related to torch.optim needs research We need to decide whether or not this merits inclusion, based on research world triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Apr 1, 2020
@gchanan
Copy link
Contributor

gchanan commented Apr 28, 2020

@vincentqb can you make a call on if we want this in PyTorch core?

@n-gao
Copy link
Author

n-gao commented May 5, 2020

I want to add two figures to illustrate why KFAC is, imo, such an important algorithm. The figures show the optimization landscape and how KFAC and SGD reach the optimum.
image
image

@n-gao
Copy link
Author

n-gao commented Mar 9, 2021

In case someone is looking for a KFAC implementation in KFAC: https://github.com/n-gao/pytorch-kfac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: optimizer Related to torch.optim needs research We need to decide whether or not this merits inclusion, based on research world triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants