HMC/NUTS sampler config for Stan

2 views
Skip to first unread message

Bob Carpenter

unread,
Feb 15, 2012, 7:13:33 PM2/15/12
to stan...@googlegroups.com
I'd like to be able to configure our (auto-tuned) HMC/NUTS
by choosing one item from each of the following lists:

1. a. specify fixed step size
b. specify interval of step sizes
c. adapt fixed step size
d. adapt interval of step sizes

2. a. specify fixed number of steps
b. NUTS adaptation for number of steps

I think it'll be easiest to configure this with command-line
options of:

--step-size
-----------------
Set to fixed step size (turn off step size auto tuning)

--step-interval
--------------------
Sample in interval from (1-val)*size to (1+val)*size.

--steps
-------
Set fixed number of steps (turn off NUTS number of steps adaptation)

This leads to the following params for the above
cases:

1.a. { --step-size }
1.b. { --step-size, --step-interval }
1.c. { }
1.d. { --step-interval }

2.a { --steps }
2.b. { }

This would lead to the two extreme configs:

Basic NUTS as in the paper/talk: { }

Basic HMC: { --step-size, --steps }

and the one Radford likes:

Basic HMC w. interval: { --step-size, --step-interval, --steps }

If no one objects, I'll see if I can push this through
the code. I don't think there'll be an easy way to avoid
a big "if" on the NUTS vs. no-NUTS.

- Bob

Matt Hoffman

unread,
Feb 15, 2012, 7:22:00 PM2/15/12
to stan...@googlegroups.com
Seems reasonable to me. Should we have both the ability to specify a range of step sizes and a range of numbers of steps? May not be necessary, since either should be enough to break the resonances we may be worried about.

Bob Carpenter

unread,
Feb 16, 2012, 6:31:29 PM2/16/12
to stan...@googlegroups.com

On 2/15/12 7:22 PM, Matt Hoffman wrote:
> Seems reasonable to me. Should we have both the ability to specify a
> range of step sizes and a range of numbers of steps? May not be
> necessary, since either should be enough to break the resonances we may
> be worried about.

It didn't seem necessary to me. But it's also
a possibility.

It might also be good to put something in place
to allow throttling of NUTS so that it doesn't
effectively run forever without saying why. I
haven't figured out a good way to configure that,
though.

- Bob

>
> On Wednesday, February 15, 2012, Bob Carpenter <ca...@alias-i.com

Andrew Gelman

unread,
Feb 16, 2012, 6:33:33 PM2/16/12
to stan...@googlegroups.com
Matt and I talked about having an upper limit on #steps in an iteration, perhaps 128 or 256?
A
Reply all
Reply to author
Forward
0 new messages