While generalized linear mixed models are a fundamental tool in applied statistics, many specifications, such as those involving categorical factors with many levels or interaction terms, can be computationally challenging to estimate due to the need to compute or approximate high-dimensional integrals. Variational inference is a popular way to perform such computations, especially in the Bayesian context. However, naive use of such methods can provide unreliable uncertainty quantification. We show that this is indeed the case for mixed models, proving that standard mean-field variational inference dramatically underestimates posterior uncertainty in high-dimensions. We then show how appropriately relaxing the mean-field assumption leads to methods whose uncertainty quantification does not deteriorate in high-dimensions, and whose total computational cost scales linearly with the number of parameters and observations. Our theoretical and numerical results focus on mixed models with Gaussian or binomial likelihoods, and rely on connections to random graph theory to obtain sharp high-dimensional asymptotic analysis. We also provide generic results, which are of independent interest, relating the accuracy of variational inference to the convergence rate of the corresponding coordinate ascent algorithm that is used to find it. Our proposed methodology is implemented in the R package, see https://github.com/mgoplerud/vglmer . Numerical results with simulated and real data examples illustrate the favourable computation cost versus accuracy trade-off of our approach compared to various alternatives.
翻译:尽管广义线性混合模型是应用统计学中的基础工具,但许多模型设定(例如包含多水平分类因子或交互项的模型)由于需要计算或近似高维积分,在估计时可能面临计算挑战。变分推断是执行此类计算的常用方法,在贝叶斯背景下尤为普遍。然而,对这些方法的简单使用可能导致不可靠的不确定性量化。我们证明对于混合模型确实如此,并严格证明标准平均场变分推断在高维情形下会严重低估后验不确定性。随后我们展示如何适当放松平均场假设,从而得到在高维情况下不确定性量化不会恶化、且总计算成本随参数和观测数量线性增长的方法。我们的理论与数值结果聚焦于具有高斯或二项似然的混合模型,并借助与随机图理论的联系获得精确的高维渐近分析。我们还提供了关于变分推断精度与用于求解的坐标上升算法收敛速率之间关系的通用结论,这些结论具有独立的理论价值。我们提出的方法已在R包中实现,详见 https://github.com/mgoplerud/vglmer 。通过模拟和实际数据案例的数值结果表明,相较于多种替代方法,我们的方法在计算成本与精度权衡方面具有显著优势。