[Paper Review] Bayesian model comparison for simulation-based inference
This paper introduces a flexible, sampler-agnostic method to compute Bayesian model evidence in simulation-based inference (SBI) using the learned harmonic mean estimator (harmonic), which requires only posterior samples. It enables reliable model comparison across all major SBI frameworks—neural posterior estimation (NPE), neural likelihood estimation (NLE), and neural ratio estimation (NRE)—with NLE showing superior accuracy, validated against likelihood-based nested sampling methods.
Comparison of appropriate models to describe observational data is a fundamental task of science. The Bayesian model evidence, or marginal likelihood, is a computationally challenging, yet crucial, quantity to estimate to perform Bayesian model comparison. We introduce a methodology to compute the Bayesian model evidence in simulation-based inference (SBI) scenarios (also often called likelihood-free inference). In particular, we leverage the recently proposed learnt harmonic mean estimator and exploit the fact that it is decoupled from the method used to generate posterior samples, i.e. it requires posterior samples only, which may be generated by any approach. This flexibility, which is lacking in many alternative methods for computing the model evidence, allows us to develop SBI model comparison techniques for the three main neural density estimation approaches, including neural posterior estimation (NPE), neural likelihood estimation (NLE), and neural ratio estimation (NRE). We demonstrate and validate our SBI evidence calculation techniques on a range of inference problems, including a gravitational wave example. Moreover, we further validate the accuracy of the learnt harmonic mean estimator, implemented in the HARMONIC software, in likelihood-based settings. These results highlight the potential of HARMONIC as a sampler-agnostic method to estimate the model evidence in both likelihood-based and simulation-based scenarios.
Motivation & Objective
- To address the lack of reliable, general-purpose methods for computing Bayesian model evidence in simulation-based inference (SBI) scenarios.
- To enable Bayesian model comparison in SBI settings where likelihoods are intractable or computationally prohibitive.
- To leverage the learned harmonic mean estimator’s sampler-agnostic property to support diverse posterior sampling methods in SBI.
- To validate the accuracy of the harmonic software’s evidence estimates against established likelihood-based nested sampling methods.
- To compare the performance of evidence estimation across the three main SBI approaches: NPE, NLE, and NRE.
Proposed method
- Utilizes the learned harmonic mean estimator (harmonic), which estimates model evidence from posterior samples alone, decoupling it from the sampling strategy.
- Applies the harmonic estimator to posterior samples generated by any SBI method, including NPE, NLE, and NRE, enabling broad applicability.
- Employs a multi-stage validation: first in likelihood-based settings using PolyChord and MultiNest as reference, then in SBI settings with synthetic and real-world examples.
- Uses violin plots and log-Bayes factor comparisons to assess agreement between harmonic estimates and nested sampling results.
- Employs amortized and sequential training schemes for density estimators in SBI pipelines to ensure robustness across different inference regimes.
- Quantifies estimator accuracy and variance, noting that NLE-based evidence estimation shows lower bias than NPE and NRE.
Experimental results
Research questions
- RQ1Can the learned harmonic mean estimator reliably compute model evidence in SBI settings where likelihoods are intractable?
- RQ2How does the performance of evidence estimation vary across different SBI frameworks—NPE, NLE, and NRE—when using the same posterior samples?
- RQ3To what extent do harmonic-based evidence estimates agree with those from established nested sampling algorithms like PolyChord and MultiNest?
- RQ4Does the choice of SBI method (amortized vs. sequential) affect the accuracy of evidence estimation via harmonic?
- RQ5Can the harmonic estimator serve as a viable alternative to nested sampling for model evidence computation in both likelihood-based and SBI settings?
Key findings
- The learned harmonic mean estimator in harmonic produces model evidence estimates that are in excellent agreement with those from likelihood-based nested sampling methods (MultiNest and PolyChord) across multiple test cases.
- NLE-based evidence estimation yields more accurate and less biased log-Bayes factor estimates compared to NPE and NRE, particularly in complex inference problems.
- All SBI evidence estimation pipelines (NPE, NLE, NRE) produce log-Bayes factors that generally favor the true source model, with results consistent across likelihood-based and SBI-based estimators.
- The harmonic estimator demonstrates robustness and flexibility, as it only requires posterior samples and is independent of the sampling method used to generate them.
- The method successfully extends to real-world applications, including a gravitational wave inference problem, demonstrating practical viability in high-dimensional, complex scenarios.
- The study highlights the potential of harmonic as a general-purpose tool for Bayesian model selection in SBI, with future work focusing on variance estimation and scalability to larger problems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.