Machine learning assisted Bayesian model comparison: learnt harmonic mean estimator
Not on the map. Why?
Abstract (arXiv)
We resurrect the infamous harmonic mean estimator for computing the marginal likelihood (Bayesian evidence) and solve its problematic large variance. The marginal likelihood is a key component of Bayesian model selection to evaluate model posterior probabilities; however, its computation is challenging. The original harmonic mean estimator, first proposed by Newton and Raftery in 1994, involves computing the harmonic mean of the likelihood given samples from the posterior. It was immediately realised that the original estimator can fail catastrophically since its variance can become very large (possibly not finite). A number of variants of the harmonic mean estimator have been proposed to address this issue although none have proven fully satisfactory. We present the learnt harmonic mean estimator, a variant of the original estimator that solves its large variance problem. This is achieved by interpreting the harmonic mean estimator as importance sampling and introducing a new target distribution. The new target distribution is learned to approximate the optimal but inaccessible target, while minimising the variance of the resulting estimator. Since the estimator requires samples of the posterior only, it is agnostic to the sampling strategy used. We validate the estimator on a variety of numerical experiments, including a number of pathological examples where the original harmonic mean estimator fails catastrophically. We also consider a cosmological application, where our approach leads to ~ 3 to 6 times more samples than current state-of-the-art techniques in 1/3 of the time. In all cases our learnt harmonic mean estimator is shown to be highly accurate. The estimator is computationally scalable and can be applied to problems of dimension O(103) and beyond. Code implementing the learnt harmonic mean estimator is made publicly available
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). First posted on arXiv 24 Nov 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 2; 2024: 4; 2025: 0; 2026: 3.
9 papers.
- 2023Proximal nested sampling with data-driven priors for physical scientistscited by 4
- 2024The future of cosmological likelihood-based inference: accelerated high-dimensional parameter estimation and model comparisoncited by 3
- 2026Sample-efficient evidence estimation of score based priors for model selectioncited by 3
- 2023Learned harmonic mean estimation of the marginal likelihood with normalizing flowscited by 2
- 2024mathttemuflow: Normalising Flows for Joint Cosmological Analysiscited by 2
- 2024Regularized Neural Ensemblerscited by 1
- 2024Accelerated Bayesian parameter estimation and model selection for gravitational waves with normalizing flowscited by 1
- 2026Learned harmonic mean estimation of the marginal likelihood for multimodal posteriors with flow matchingcited by 0
- 2026Automatic Laplace Collapsed Sampling: Scalable Marginalisation of Latent Parameters via Automatic Differentiationcited by 0
- 2026Automatic Laplace Collapsed Sampling: Scalable Marginalisation of Latent Parameters via Automatic Differentiation27 Mar 2026
- 2026Sample-efficient evidence estimation of score based priors for model selection24 Feb 2026
- 2026Learned harmonic mean estimation of the marginal likelihood for multimodal posteriors with flow matching26 Jan 2026
- 2024Accelerated Bayesian parameter estimation and model selection for gravitational waves with normalizing flows28 Oct 2024
- 2024Regularized Neural Ensemblers6 Oct 2024
- 2024mathttemuflow: Normalising Flows for Joint Cosmological Analysis2 Sep 2024
- 2024The future of cosmological likelihood-based inference: accelerated high-dimensional parameter estimation and model comparison21 May 2024
- 2023Proximal nested sampling with data-driven priors for physical scientists30 Jun 2023
- 2023Learned harmonic mean estimation of the marginal likelihood with normalizing flows30 Jun 2023