Bayesian Deep Learning

Laplace approximation

Find the peak of the posterior, then pretend it is a bell curve. You first train normally to get a MAP estimate, the mode of the posterior, and then fit a Gaussian whose center is that mode and whose width is set by how sharply the posterior curves there: narrow curvature means high confidence, a flat region means uncertainty.

The width is the inverse Hessian of the negative log-posterior at the mode. In practice the Hessian is replaced by the Fisher information or the Gauss-Newton/GGN approximation, and for deep nets even that is too large, so it is factored as a diagonal, a Kronecker-factored (KFAC) matrix, or restricted to the last layer. A clean modern recipe is the linearized Laplace: keep the trained weights untouched and add the Gaussian on top after the fact, giving uncertainty essentially for free.

Its great virtue is being a post-hoc method that requires no change to training and reuses the network you already have, which the laplace-redux library made turnkey. Its weakness is that a single Gaussian around one mode cannot represent the genuinely multi-modal, heavy-tailed posteriors of deep nets, and the quality hinges entirely on the Hessian approximation you can afford.

p(\theta\mid\mathcal{D})\approx\mathcal{N}\!\left(\theta_{\mathrm{MAP}},\,H^{-1}\right),\quad H=-\nabla^2\log p(\theta\mid\mathcal{D})\big|_{\theta_{\mathrm{MAP}}}

A Gaussian centered at the MAP mode with covariance the inverse Hessian of the negative log-posterior.

Also called
拉普拉斯近似