-
Notifications
You must be signed in to change notification settings - Fork 107
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 adaptation on HMC trajectory length to increase the expected Change in the Estimator of the Expected Square (ChEES-HMC) #421
Conversation
Codecov Report
@@ Coverage Diff @@
## main #421 +/- ##
==========================================
- Coverage 99.14% 99.14% -0.01%
==========================================
Files 49 50 +1
Lines 2117 2218 +101
==========================================
+ Hits 2099 2199 +100
- Misses 18 19 +1
|
Isn't it called ChEES? 😁 |
Oh no 🤦 |
@albcab time to pick this up again (no pressure lol)? |
What's missing here? Would be great to get this sampler in! |
Need to rebase and resolve conflicts for all the remaining, restructuring, etc. that have been done during the past year. Other than that, the algorithm is done. |
@albcab Great, let us know if you need any help! |
Nice, seems like conflicts are solved, just some mypy errors:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sending out first round of review, I will need a bit more time on chees_adaptation.py
Could you add a test to check that it learns a good step size and trajectory_length_moving_average? |
I don't get it; how do we know that an avg step size of 1.5 and an avg number of steps of 15 are the "correct" amounts? Also, they target an acceptance rate of .75 while we do .651, which would change the target step size and number of steps. |
I think those values comes from empirical, we should get similar number with the similar log_density set up. Could you turn .651 into an kwarg? |
…ize and number of steps
I've added the test, although the number of integration steps depends on the optimizer/learning rate used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, thanks for working on this!
Interesting. Makes sense. |
Co-authored-by: Junpeng Lao <[email protected]>
log_step_size_moving_average | ||
Running moving average of the log step_size parameter. | ||
trajectory_length | ||
Value of the num_integration_steps / step_size parameter of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be
Value of the num_integration_steps / step_size parameter of | |
Value of the num_integration_steps * step_size parameter of |
right?
Amazing! 🥳 |
…ge in the Estimator of the Expected Square (ChEES-HMC) (#421) * ChEES-HMC * geometric weighted moving average and tests for convergence of step size and number of steps * Update blackjax/adaptation/chees_adaptation.py Co-authored-by: Junpeng Lao <[email protected]> --------- Co-authored-by: Junpeng Lao <[email protected]>
Closes #382