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

Feature/issue 2814 warmup auto #2815

Open
wants to merge 7 commits into
base: develop
from

Conversation

@bbbales2
Copy link
Member

commented Sep 11, 2019

Submission Checklist

  • Run unit tests: ./runTests.py src/test/unit
  • Run cpplint: make cpplint
  • Declare copyright holder and open-source license: see below

Summary

The goals/reasons are outlined here: #2814

There'll be a CmdStan pull to go with this (and this probably shouldn't go in until that pull is good too).

This adds another metric that the samplers use to compute all their gradients and such: src/stan/mcmc/hmc/hamiltonians/auto_e_metric.hpp, and src/stan/mcmc/hmc/hamiltonians/auto_e_point.hpp

And then an adaptation routine to actually compute that metric: src/stan/mcmc/auto_adaptation.hpp

Edit: To review this pull request you'll want to pull this version of cmdstan and at least try out the adaptation on a couple models: stan-dev/cmdstan#729

Intended Effect

The adaptation routine updates the metric and tells it whether to act like a dense or diagonal metric at the end of each warmup stage where the metric is recomputed.

How to Verify

The new tests can be run with:
./runTests.py src/test/unit/mcmc/auto_adaptation_learn_covariance_pick_dense_test
./runTests.py src/test/unit/mcmc/auto_adaptation_learn_covariance_pick_diag_test

and

./runTests.py src/test/unit/mcmc/auto_adaptation_test

Side Effects

Hopefully none

Documentation

Yet to be written

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Columbia University

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@betanalpha

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

Before consideration this is going to require a good bit of empirical validation more than what's in the arXiv paper, especially with regard to varying dimensions and curvatures. To be open I am hesitant about the robustness of automatically switching between diagonal and dense given how small the early windows are, and how noisy those off-diagonal estimates are (not to mention the eigenvalue approximations). For something like this goes to go in it will have to be verified to work properly for diagonally-dominant problems, dense-dominated problems, and everything in between without a significant increase in cost.

Keep in mind that we're trying to minimize the sampler variants in the code base and not have "experimental" versions on dev/master. At some point we'll clean up the other samplers in there.

@bbbales2

This comment has been minimized.

Copy link
Member Author

commented Sep 11, 2019

Before consideration this is going to require a good bit of empirical validation more than what's in the arXiv paper, especially with regard to varying dimensions and curvatures. To be open I am hesitant about the robustness of automatically switching between diagonal and dense given how small the early windows are, and how noisy those off-diagonal estimates are (not to mention the eigenvalue approximations). For something like this goes to go in it will have to be verified to work properly for diagonally-dominant problems, dense-dominated problems, and everything in between without a significant increase in cost.

Yup, hopefully we can find some models that break and learn stuff!

@betanalpha

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

In general I recommend working through the validation before creating a pull request and using up testing resources. Instead a branch can be discussed on Discourse.

Because of how this proposal modifies warmup it will require studying, at the very least,

  • sensitivity to initial conditions
  • sensitivity to heavy tails
  • sensitivity to dimension
  • warmup time
  • models with spatially-varying covariances
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.