Scalable Bayesian computation for crossed and nested hierarchical models

Omiros Papaspiliopoulos, Timothée Stumpf-Fétizon, Giacomo Zanella
3/19/2021
13 citations
stat.COstat.ME
bayesian

Official code: timsf/crossed-effects (3 stars, Python, MIT, last commit 2025-10-24). 1 more implementation below.

Abstract

We develop sampling algorithms to fit Bayesian hierarchical models, the computational complexity of which scales linearly with the number of observations and the number of parameters in the model. We focus on crossed random effect and nested multilevel models, which are used ubiquitously in applied sciences.

Show full abstract

The posterior dependence in both classes is sparse: in crossed random effects models it resembles a random graph, whereas in nested multilevel models it is tree-structured. For each class we identify a framework for scalable computation, building on previous work. Methods for crossed models are based on extensions of appropriately designed collapsed Gibbs samplers, where we introduce the idea of local centering; while methods for nested models are based on sparse linear algebra and data augmentation. We provide a theoretical analysis of the proposed algorithms in some simplified settings, including a comparison with previously proposed methodologies and an average-case analysis based on random graph theory. Numerical experiments, including two challenging real data analyses on predicting electoral results and real estate prices, compare with off-the-shelf Hamiltonian Monte Carlo, displaying drastic improvement in performance.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
timsf/crossed-effectsOfficial3PythonMIT2025-10-24
timsf/nested-effectsOfficial0Jupyter NotebookMIT2025-04-13
MIT

Reference implementation for scalable Bayesian crossed effects models.

31Python, Jupyter NotebookJul 29, 20211 years agoMIT
MIT

Reference implementation for scalable Bayesian nested effects models.

00Jupyter Notebook, PythonJul 29, 20211 years agoMIT

Similar Papers

Cite this paper

@article{papaspiliopoulos2021scalable,
  title  = {Scalable Bayesian computation for crossed and nested hierarchical models},
  author = {Omiros Papaspiliopoulos and Timothée Stumpf-Fétizon and Giacomo Zanella},
  year   = {2021},
  eprint = {2103.10875},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.10875}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2103.10875.svg)](https://codeofpaper.com/paper/2103.10875)

Discussion