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

Recommend AutoNormal guide when hessian in AutoLaplace is singular #1118

Merged

Conversation

freddyaboulton
Copy link
Contributor

Fixes #1001

To be honest, I'm not 100% sure what the gauss-newton hessian is so I'm taking my best guess from what I read here 😅

@freddyaboulton freddyaboulton marked this pull request as ready for review August 6, 2021 00:39
@fehiepsi
Copy link
Member

fehiepsi commented Aug 6, 2021

@freddyaboulton Really sorry, I didn't find references for that feature request. I found this article is helpful and it seems that this method is called "outer product of gradients (OPG)" or BHHH estimator in literature. As I understand, this estimator assumes that the likelihood is f(latent) = (f_1(latent), ..., f_n(latent)) - then the precision matrix can be approximated by the sum/average of the outer product of gradients of those f_i. This seems to be a bit different from the formula that you use: outer product of gradients of sum(f_i). What do you think?

For now, I'm not sure what is a good way to get a covariance matrix for Laplace approximation in general cases. I guess we can defer users to AutoNormal guides in case the Hessian is singular.

@freddyaboulton
Copy link
Contributor Author

@fehiepsi Thanks for the feedback! Do you want me to update the warning message to recommend the AutoNormal guide when the Hessian is singular or would you rather I close out the PR until we do more research?

@fehiepsi
Copy link
Member

fehiepsi commented Aug 7, 2021

recommend the AutoNormal guide when the Hessian is singular

Sure, please go ahead. It is great to have a better warning message. Thanks!

@freddyaboulton freddyaboulton force-pushed the gauss-newton-hessian-in-laplace branch from 8fe7120 to 338deaa Compare August 20, 2021 15:11
@freddyaboulton freddyaboulton changed the title Use Gauss-Newton hessian matrix in laplace approximation Recommend AutoNormal guide when hessian in AutoLaplace is singular Aug 20, 2021
@fehiepsi
Copy link
Member

Thanks, @freddyaboulton!

@fehiepsi fehiepsi merged commit 9da69d2 into pyro-ppl:master Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Gauss-Newton hessian matrix in laplace approximation
2 participants