We present the learned harmonic mean estimator with normalizing flows - a robust, scalable and flexible estimator of the Bayesian evidence for model comparison. Since the estimator is agnostic to sampling strategy and simply requires posterior samples, it can be applied to compute the evidence using any Markov chain Monte Carlo (MCMC) sampling technique, including saved down MCMC chains, or any variational inference approach. The learned harmonic mean estimator was recently introduced, where machine learning techniques were developed to learn a suitable internal importance sampling target distribution to solve the issue of exploding variance of the original harmonic mean estimator. In this article we present the use of normalizing flows as the internal machine learning technique within the learned harmonic mean estimator. Normalizing flows can be elegantly coupled with the learned harmonic mean to provide an approach that is more robust, flexible and scalable than the machine learning models considered previously. We perform a series of numerical experiments, applying our method to benchmark problems and to a cosmological example in up to 21 dimensions. We find the learned harmonic mean estimator is in agreement with ground truth values and nested sampling estimates. The open-source harmonic Python package implementing the learned harmonic mean, now with normalizing flows included, is publicly available.
翻译:我们提出了基于归一化流的学习调和均值估计器——一种用于模型比较的贝叶斯证据的鲁棒、可扩展且灵活的估计器。由于该估计器与采样策略无关,仅需后验样本,因此可使用任何马尔可夫链蒙特卡洛(MCMC)采样技术(包括保存的MCMC链)或任何变分推断方法计算证据。近期引入的学习调和均值估计器开发了机器学习技术,通过学习合适的内部重要性采样目标分布来解决原始调和均值估计器方差爆炸的问题。本文在估计器内部采用归一化流作为机器学习技术。归一化流可与学习调和均值优雅结合,提供比先前考虑的机器学习模型更鲁棒、灵活且可扩展的方法。我们进行了一系列数值实验,将方法应用于基准测试问题以及最高21维的宇宙学实例。结果表明学习调和均值估计器与真实值及嵌套采样估计结果一致。实现学习调和均值的开源harmonic Python包现已公开,包含归一化流功能。