edward icon indicating copy to clipboard operation
edward copied to clipboard

No U-Turn Sampler

Open dustinvtran opened this issue 8 years ago • 11 comments

Also see http://discuss.edwardlib.org/t/any-plans-for-nuts/.

References

  • https://arxiv.org/abs/1111.4246

dustinvtran avatar Mar 13 '17 06:03 dustinvtran

I will eventually give it a try to implement this. If anyone else wants to do this in the meantime, just give a shout here!

korkinof avatar Mar 16 '17 22:03 korkinof

I'd be happy to try my hand at this.

ssequeira avatar Mar 28 '17 20:03 ssequeira

Hi ! I created a PR https://github.com/blei-lab/edward/pull/728 with the implementation of the Dual Averaging algorithm for adapting the step size of HMC, which is a first step to implement NUTS.

emilemathieu avatar Aug 03 '17 12:08 emilemathieu

Hi I wondered if there was any update to this? I think there's probably a fair bit of demand for this feature and if help is required, I'd like to chip in.

Razcle avatar Feb 21 '18 15:02 Razcle

No need to put effort into. @axch has been working on this. Maybe he can reply on when something public-facing may appear in TF?

dustinvtran avatar Feb 22 '18 02:02 dustinvtran

Don't know about time lines, exactly, but work is proceeding.

axch avatar Feb 25 '18 06:02 axch

Actually, @dustinvtran, can you assign me this github issue (or give me sufficient permissions to assign it to myself)?

axch avatar Feb 25 '18 06:02 axch

Gave you permission. Looks like you need to accept before assignments are available.

FYI, if I recall correctly, @axch has mostly been working on the adaptive path length. For reference, it could be useful to look at @emilemathieu's implementation of the adaptive step size in #728.

dustinvtran avatar Feb 25 '18 20:02 dustinvtran

As an update, there is now a draft barebones NUTS implementation in TensorFlow Probability, at https://github.com/tensorflow/probability/tree/master/experimental/no_u_turn_sampler. This implementation is expected to be compatible with Edward2. See also the associated TFP issues https://github.com/tensorflow/probability/issues/125, https://github.com/tensorflow/probability/issues/126, https://github.com/tensorflow/probability/issues/142, and https://github.com/tensorflow/probability/issues/143.

axch avatar Sep 25 '18 16:09 axch

TFP now has a batch NUTS (path length adaptation, haven't tested step size adaptation yet but don't anticipate excessive problems) here: https://github.com/tensorflow/probability/blob/master/tensorflow_probability/python/experimental/mcmc/nuts.py.

axch avatar Jun 04 '19 16:06 axch

NUTS sampler with multinominal sampling is currently on master: https://github.com/tensorflow/probability/commit/e57eba6c0ff15b2c94e0d802115641683206c38a

You can have a look at this end2end test of how to do sampling with dualaveraging step size adaptation: https://github.com/tensorflow/probability/blob/e57eba6c0ff15b2c94e0d802115641683206c38a/tensorflow_probability/python/mcmc/nuts_test.py#L284-L381

junpenglao avatar Aug 20 '19 08:08 junpenglao