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

O3.7.1 Momentum-accelerated EKP #321

Open
4 of 8 tasks
odunbar opened this issue Aug 9, 2023 · 1 comment
Open
4 of 8 tasks

O3.7.1 Momentum-accelerated EKP #321

odunbar opened this issue Aug 9, 2023 · 1 comment
Assignees

Comments

@odunbar
Copy link
Collaborator

odunbar commented Aug 9, 2023

Tasks

  1. eviatarbach odunbar

Offline we have been experimenting with a few momentum-based accelerations of EKI with good success. Integration of such approaches into the code for application with general EKP-type methods is detailed below. In general we have identified a rough template of what such accelerators will look like:

# type for flow accelerators
abstract type Accelerator

# e.g. the Nesterov type contains the parameter and a history of states
Nesterov <: Accelerator 
    momentum_parameter
    state_history
end

# it lives in the general EKP object
struct EnsembleKalmanProcess{..., A<:Accelerator}
    ...
    accelerator::A
end

# the state history is intialized with the initial ensemble
function initial_ensemble(...)
    ...
    ekp.accelerator.state_history = initial_ensemble 
end

# the update involves updating the particles with the usual method, along with the augmented state
function update_ensemble(g)
    new_ens= update_ensemble!(ekp.u[end],g,ekp.process)  # update to perform an approximate gradient step 
    new_momentum_ens = accelerator_update(ekp.accelerator, new_ens) # shift new ensemble by accelerator
    append!(ekp.u, new_momentum_ens)
    ekp.accelerator.state_history = new_ens
    ...
return new_momentum_ens
end

It is also important that the saved pairs are the momentum-shifted ensemble members and the evaluations of them (i.e. v and G(v) remain consistent). This works because accelerators typically still involve the calculation of a typical gradient-based update, and are simply followed by a perturbation of the particles by momentum.

Hopefully UKI,EKI,Transform-EKI,SEKI, (maybe even EKS, which also represents a gradient flow) can be all be updated with the same interface.

Happy to iterate a bit here.

@sydneyvernon
Copy link
Contributor

Note on timestepping in momentum-accelerated EKP methods:
Our goal is to implement momentum-inspired accelerators without changing existing update methods, as detailed above. EKI and "momentum-accelerated" EKI apply virtually the same update, but scale by dt and dt^2 respectively. It is possible that this distinction won't cause a problem in individual applications, since we have optimized timesteppers in place. That said I will need to verify that the currently-implemented EKP timestep (related to the observation error covariance) makes sense in the accelerated context.

@odunbar odunbar changed the title Momentum-accelerated EKP O3.7.1 Momentum-accelerated EKP Sep 13, 2023
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

No branches or pull requests

3 participants