Integrated Laplace approximation roadmap

There is a GitHub repo which makes it straightforward to install a fork of Stan with the prototype ILA. I got it working and used it to run some experiments. @stevebronder wants to clean up the transpiler, which now spits a lot of C++ messages. Once that’s done, I’ll update the StanCon 2020 notebook with the new variadic interface and demo the routine which allows users to specify their own observational model. Based on feedback from other Stan developers, we’ll only propose routines with pre-specified likelihoods for Stan, but the code for user-defined likelihood will exist on a branch.

There is also documentation on the implementation of ILA, notably the underlying autodiff used to computed Hessians and higher-order derivatives required to differentiate the approximate marginal density. Since this document is subject to further edits in the near future, I’m reluctant to post it now. That said, if you want to take a look, you can send me a private message.

We’re very close: I’m tempted to share everything now but I want Steve and I to do a few more tests first.

6 Likes

Yes its looking good but i worry about showing everything until i at least clean up all the easy errors we can catch at the stanc compiler level. Though I’m hoping to have that done today

10 Likes

@stevebronder @charlesm93 don’t hurry up, please :-)
I am an end-user and I would like to try some models made by other (Blangiardo&Cameletti, and Log-Gaussian COX Process for example), but in a “principled way”. IMHO a tested ILA software is the right way to go, so definitely take all the time needed to make it smooth. When ILA will be available I will try it and then I will share here in the community the results of the analyses! Thanks a lot on keep working on ILA.

5 Likes

Hi all,
I’m releasing a DRAFT of the updated notebook which showcases how to use the new API @stevebronder and I have been working on. Instructions on installing the new prototype are available on the ReadMe.

Use the files under notebook-2022. If you look at notebook-2022/models, there are a handful of examples, which should give you some template to build your own models. I also include some code to demo how to compare your results against a benchmark.

We’re going to have an informal two weeks trial to collect some feedback from users. If you get around trying this out, either post on this thread or raise an issue.

10 Likes

Having officially met all the requirements set by Columbia University, I’m now sharing a PDF of my thesis (https://charlesm93.github.io/files/thesis.pdf). In time, it will appear in Columbia’s official dissertation library.

Relevant to this conversation is Chapter 5, “General Adjoint-differentiated Laplace approximation”, which describes the inner-working of the algorithm, including Hessian computation, differentiation of the Hessian, different types of Newton solver, etc. and how we were able to support user-defined likelihoods!

18 Likes

@charlesm93 @stevebronder Can you use these functions to marginalize out random effects in your model then run Stan’s optimizer on the remaining hyperparameters instead of sampling?

Also, any plans to bring this into an official release of Stan? I’ve been working on a lot of slow ODE models lately and this would be a nice speedup during prototyping.

1 Like

Yes

1 Like