The hierarchical prior used in Latent Gaussian models (LGMs) induces a posterior geometry prone to frustrate inference algorithms. Marginalizing out the latent Gaussian variable using an integrated Laplace approximation removes the offending geometry, allowing us to do efficient inference on the hyperparameters. To use gradient-based inference we need to compute the approximate marginal likelihood and its gradient. The adjoint-differentiated Laplace approximation differentiates the marginal likelihood and scales well with the dimension of the hyperparameters. While this method can be applied to LGMs with any prior covariance, it only works for likelihoods with a diagonal Hessian. Furthermore, the algorithm requires methods which compute the first three derivatives of the likelihood with current implementations relying on analytical derivatives. I propose a generalization which is applicable to a broader class of likelihoods and does not require analytical derivatives of the likelihood. Numerical experiments suggest the added flexibility comes at no computational cost: on a standard LGM, the new method is in fact slightly faster than the existing adjoint-differentiated Laplace approximation. I also apply the general method to an LGM with an unconventional likelihood. This example highlights the algorithm's potential, as well as persistent challenges.
翻译:潜高斯模型(LGM)中使用的分层先验会诱导出一种后验几何结构,这种结构容易阻碍推理算法的运行。通过积分拉普拉斯近似边缘化潜高斯变量,可以消除这种不利的几何结构,从而让我们能够对超参数进行高效推理。为了使用基于梯度的推理方法,我们需要计算近似的边缘似然及其梯度。伴随微分拉普拉斯近似对边缘似然进行微分,并且能很好地适应超参数维度的扩展。虽然该方法可应用于具有任意先验协方差的LGM,但它仅适用于海森矩阵为对角阵的似然函数。此外,该算法需要能计算似然函数前三阶导数的方法,而现有实现依赖于解析导数。我提出了一种通用化方法,该方法适用于更广泛类别的似然函数,且无需似然函数的解析导数。数值实验表明,这种新增的灵活性并不增加计算成本:在标准LGM上,新方法的运行速度实际上略快于现有的伴随微分拉普拉斯近似。我还将这种通用方法应用于一个具有非常规似然函数的LGM。该示例突显了算法的潜力,同时也揭示了持续存在的挑战。