🤖 AI Summary
Bayesian multilevel models (MLMs) offer interpretability and full uncertainty quantification, but their high computational cost severely limits practical deployment. To address this, we propose an amortized variational inference framework based on deep generative networks—the first systematic integration of deep learning into MLM posterior estimation—balancing statistical reliability with computational efficiency. Our method leverages the hierarchical probabilistic structure of MLMs to design a dedicated neural architecture, synergistically combining simulation-based inference (SBI) and neural posterior estimation. Evaluated on multiple real-world datasets, our approach achieves statistical accuracy comparable to Stan’s MCMC sampler while accelerating inference by two to four orders of magnitude. All code is publicly released. This work establishes a new paradigm for Bayesian multilevel modeling: efficient, statistically sound, and scalable.
📝 Abstract
Multilevel models (MLMs) are a central building block of the Bayesian workflow. They enable joint, interpretable modeling of data across hierarchical levels and provide a fully probabilistic quantification of uncertainty. Despite their well-recognized advantages, MLMs pose significant computational challenges, often rendering their estimation and evaluation intractable within reasonable time constraints. Recent advances in simulation-based inference offer promising solutions for addressing complex probabilistic models using deep generative networks. However, the utility and reliability of deep learning methods for estimating Bayesian MLMs remains largely unexplored, especially when compared with gold-standard samplers. To this end, we explore a family of neural network architectures that leverage the probabilistic factorization of multilevel models to facilitate efficient neural network training and subsequent near-instant posterior inference on unseen datasets. We test our method on several real-world case studies and provide comprehensive comparisons to Stan's gold standard sampler, where possible. Finally, we provide an open-source implementation of our methods to stimulate further research in the nascent field of amortized Bayesian inference.