# Learned harmonic mean estimation of the marginal likelihood for multimodal posteriors with flow matching

arXiv: https://arxiv.org/abs/2601.18683 · HTML: https://mlsanity.com/paper/2601.18683/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Placed in Flow matching, time series and science, one of 14 directions in Diffusion models.
- Builds on 10 of its 27 references that are in the map.
- First posted on arXiv 26 Jan 2026.

## Placed in

- Diffusion models / [Flow matching, time series and science](https://mlsanity.com/diffusion/flow-matching-time-series-and-science/)

## Builds on (most cited first, 10 of 10)

- [Neural Ordinary Differential Equations](https://mlsanity.com/paper/1806.07366/) (2018)
- [Variational Inference: A Review for Statisticians](https://mlsanity.com/paper/1601.00670/) (2016)
- [FFJORD: Free-form Continuous Dynamics for Scalable Reversible Generative Models](https://mlsanity.com/paper/1810.01367/) (2018)
- [The frontier of simulation-based inference](https://mlsanity.com/paper/1911.01429/) (2019)
- [Hamiltonian Monte Carlo for Hierarchical Models](https://mlsanity.com/paper/1312.0906/) (2013)
- [Machine learning assisted Bayesian model comparison: learnt harmonic mean estimator](https://mlsanity.com/paper/2111.12720/) (2021)
- [Learned harmonic mean estimation of the Bayesian evidence with normalizing flows](https://mlsanity.com/paper/2405.05969/) (2024)
- [The future of cosmological likelihood-based inference: accelerated high-dimensional parameter estimation and model comparison](https://mlsanity.com/paper/2405.12965/) (2024)
- [Learned harmonic mean estimation of the marginal likelihood with normalizing flows](https://mlsanity.com/paper/2307.00048/) (2023)
- [Accelerated Bayesian parameter estimation and model selection for gravitational waves with normalizing flows](https://mlsanity.com/paper/2410.21076/) (2024)

## Abstract (arXiv)

The marginal likelihood, or Bayesian evidence, is a crucial quantity for Bayesian model comparison but its computation can be challenging for complex models, even in parameters space of moderate dimension. The learned harmonic mean estimator has been shown to provide accurate and robust estimates of the marginal likelihood simply using posterior samples. It is agnostic to the sampling strategy, meaning that the samples can be obtained using any method. This enables marginal likelihood calculation and model comparison with whatever sampling is most suitable for the task. However, the internal density estimators considered previously for the learned harmonic mean can struggle with highly multimodal posteriors. In this work we introduce flow matching-based continuous normalizing flows as a powerful architecture for the internal density estimation of the learned harmonic mean. We demonstrate the ability to handle challenging multimodal posteriors, including an example in 20 parameter dimensions, showcasing the method's ability to handle complex posteriors without the need for fine-tuning or heuristic modifications to the base distribution.
