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 documentation for Accelerators #411

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sydneyvernon
Copy link
Contributor

No description provided.

@odunbar
Copy link
Collaborator

odunbar commented Oct 2, 2024

Hi @sydneyvernon to get the docs to work you will need to add a link accelerator page into docs/make.jl
Currently you have added the docs page but the documenter is not using it to generate the docs. So it may still contain errors. Thanks!

Copy link
Collaborator

@odunbar odunbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sydney - this looks great!

Recently we have found that people much prefer seeing the API, and how-to-use, and graph performance above the math, so reordering is the main comment! Otherwise I have a couple of extra references and phrasing of the math introduction

docs/src/accelerators.md Outdated Show resolved Hide resolved
docs/src/accelerators.md Outdated Show resolved Hide resolved
docs/src/accelerators.md Outdated Show resolved Hide resolved

## Implementation in Ensemble Kalman Inversion Algorithm

EKI can be understood as an approximation of gradient descent ([Kovachki and Stuart 2019](https://iopscience.iop.org/article/10.1088/1361-6420/ab1c3a)). This fact inspired the implementation of Nesterov momentum-inspired accelerators in the EKP package. For an overview on the algorithm without modification, please see the documentation for Ensemble Kalman Inversion.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a better story line for this paragraph, maybe say that
(1) Nesterov can be used to accelerate Gradient flows (e.g. Su et al. 2016, https://arxiv.org/abs/1503.01243)
(2) EKI approximates "a form of gradient flow". use reference https://arxiv.org/abs/2209.11371 to talk about this rather than Kovachki stuart.
(3) Kovachki stuart 2019 used a particle-based modification of the Nesterov acceleration and saw acceleration.
(4) We use this update to accelerate a variety of our processes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I just pushed a modified version with this story line, but I am not confident that the section flows well. Please let me know if there's anything else I can do to make it clearer. Thanks!

docs/src/accelerators.md Outdated Show resolved Hide resolved
docs/src/accelerators.md Outdated Show resolved Hide resolved

The `NesterovAccelerator` (shown in blue) has been found to produce the most consistent acceleration on this problem, as seen below. The `FirstOrderNesterovAccelerator` (shown in red) uses a momentum coefficient very similar to that of the `NesterovAccelerator`, and enjoys similar performance. The `ConstantNesterovAccelerator` (shown in green) is effective in this test case, but can be very unstable. These methods differ only in their momentum coefficient values, which are plotted on the right. Vanilla EKI is shown in black. The experiment is repeated 50 times; ribbons denote one standard error from the mean.

<img src="assets/momentumcoeffs.png" alt="EKI convergence for different momentum coefficients" width="300"/> <img src="assets/momentumcoeffs_values.png" alt="Coefficient values" width="300"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these do not display for me offline but I think they are linked correctly

docs/src/accelerators.md Outdated Show resolved Hide resolved
docs/src/accelerators.md Outdated Show resolved Hide resolved
docs/src/accelerators.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants