Skip to content

Conversation

@bhargavvader
Copy link
Contributor

@bhargavvader bhargavvader commented May 30, 2017

PR to discuss and implement RM-HMC.
Right now I'm placing the file in the hmc directory, but we could also re-structure the sampling methods directory if needed.

Like mentioned in my proposal, one of the stumbling blocks in the Stan implementation was the potential fragility of 2nd and 3rd order autodiff. A first step would be to tackle this problem, or look at a different way to go about this, by maybe taking some inspiration from the MATLAB implementation.

@aseyboldt
Copy link
Member

aseyboldt commented Jun 28, 2017

@bhargavvader btw, you might want to have a look at #2345. That contains a class for computing the value and gradient of a theano tensor, that merges the inputs into one array (and is typically quite a bit faster than the old version). Maybe something similar would work for the hessian (you need the full hessian, do you, or is a hessian-vector product enough?)

@bhargavvader
Copy link
Contributor Author

Thanks @aseyboldt - I'll definitely have a look, and it should be handy. I might need the full hessian if I also do a NUTS for manifolds, for now I'm just focusing on rewriting the Hamiltonian Equations using the SoftAbs metric.
@ColCarroll , @jsalvatier - since the only real change with using manifolds is the metric, which changes the energy and velocity equations, I'm working on coding these up.

@bhargavvader
Copy link
Contributor Author

bhargavvader commented Jul 14, 2017

@aseyboldt I'll be trying to use some Hessian approximations, the gradients will take forever if I don't. Just for reference, I'm trying to implement algorithm 1 and algorithm 2 on page 12 in this paper which describes a possible Hamiltonian evolution for RMHMC.

@aseyboldt
Copy link
Member

Which approximations are you implementing? The diagonal Hessian looks useful (and I think that should be possible to compute in theano without having to go for the whole hessian and hopefully without scan as well). Footnote 3 sounds interesting, too. :-)

@bhargavvader
Copy link
Contributor Author

Closing this PR to accommodate for @aseyboldt refactoring.

@aseyboldt
Copy link
Member

I hope you don't have to change too much. If you need any help with that, just ping me on slack.
You can just rebase and force push to the pull request by the way.

@bhargavvader bhargavvader mentioned this pull request Jul 21, 2017
@bhargavvader bhargavvader deleted the rmhmc branch July 21, 2017 10:53
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

Successfully merging this pull request may close these issues.

2 participants