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

[WIP] Riemannian Manifold HMC #2240

Closed
wants to merge 7 commits into from
Closed

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 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

@bhargavvader bhargavvader commented Jun 29, 2017

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 added 4 commits Jul 5, 2017
@bhargavvader
Copy link
Contributor Author

@bhargavvader 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

@aseyboldt aseyboldt commented Jul 15, 2017

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

@bhargavvader bhargavvader commented Jul 21, 2017

Closing this PR to accommodate for @aseyboldt refactoring.

@aseyboldt
Copy link
Member

@aseyboldt aseyboldt commented Jul 21, 2017

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 bhargavvader:rmhmc branch Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants