API𝞡
Extended Kalman filter (EKF)𝞡
ekf.dense_fisherapplies an online Bayesian update based on a Taylor approximation of the log-likelihood. Uses the empirical Fisher information matrix as a positive-definite alternative to the Hessian. Natural gradient descent equivalence following Ollivier, 2019.ekf.diag_fishersame asekf.dense_fisherbut uses the diagonal of the empirical Fisher information matrix instead.
Laplace approximation𝞡
laplace.dense_fishercalculates the empirical Fisher information matrix and uses it to approximate the posterior precision, i.e. a Laplace approximation.laplace.dense_ggncalculates the Generalised Gauss-Newton matrix which is equivalent to the non-empirical Fisher in most neural network settings - see Martens, 2020.laplace.dense_hessiancalculates the Hessian of the negative log posterior.laplace.diag_fishersame aslaplace.dense_fisherbut uses the diagonal of the empirical Fisher information matrix instead.laplace.diag_ggnsame aslaplace.dense_ggnbut uses the diagonal of the Generalised Gauss-Newton matrix instead.
All Laplace transforms leave the parameters unmodified. Comprehensive details on Laplace approximations can be found in Daxberger et al, 2021.
Stochastic gradient Markov chain Monte Carlo (SGMCMC)𝞡
sgmcmc.sgldimplements stochastic gradient Langevin dynamics (SGLD) from Welling and Teh, 2011.sgmcmc.sghmcimplements the stochastic gradient Hamiltonian Monte Carlo (SGHMC) algorithm from Chen et al, 2014 (without momenta resampling).sgmcmc.sgnhtimplements the stochastic gradient Nosé-Hoover thermostat (SGNHT) algorithm from Ding et al, 2014, (SGHMC with adaptive friction coefficient).sgmcmc.baoaimplements the BAOA integrator for SGHMC from Leimkuhler and Matthews, 2015 - p271.
For an overview and unifying framework for SGMCMC methods, see Ma et al, 2015.
Variational inference (VI)𝞡
vi.denseimplements a Gaussian variational distribution. Expects atorchoptoptimizer for handling the minimization of the NELBO. Also findvi.dense.nelbofor simply calculating the NELBO with respect to alog_posteriorand Gaussian distribution.vi.diagsame asvi.densebut uses the diagonal of the Gaussian variational distribution.
A review of variational inference can be found in Blei et al, 2017.
Optim𝞡
optimwrapper fortorch.optimoptimizers within the unifiedposteriorsAPI that allows for easy swapping with UQ methods.