arXiv:2610.23825stat.MLOct 2026

Manuscript Offprint

arXiv:2610.23825

ENFR: Evidence Networks with Flow-Matched References for Amortized Simulation-Based Model Inference

Kai Lehman, Jameson Dong, Carolina Cuesta-Lazaro, Niall Jeffrey, Benjamin D. Wandelt, Francisco Villaescusa-Navarro, Sven Krippendorf, Jochen Weller

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Kai Lehman 1,2,3^{1,2,3}, Jameson Dong 4^{4}, Carolina Cuesta-Lazaro 2,5^{2,5}, Niall Jeffrey 6,7^{6,7}, Benjamin D. Wandelt 4,8^{4,8}, Francisco Villaescusa-Navarro 2,9^{2,9}, Sven Krippendorf 10^{10}, Jochen Weller 1,11,3^{1,11,3}

1^{1}Universitäts-Sternwarte München, Fakultät für Physik,

Ludwig-Maximilians-Universität, Scheinerstr. 1, 81679 München, Germany

2^{2}Center for Computational Astrophysics, Flatiron Institute, 162 5th Avenue, New York, NY, 10010, USA

3^{3}Excellence Cluster ORIGINS, Boltzmannstr. 2, 85748 Garching, Germany

4^{4}Department of Physics and Astronomy, Johns Hopkins University,

3400 North Charles Street, Baltimore, MD, 21218, USA

5^{5}Center for Cosmology and Particle Physics, Department of Physics, New York University,

726 Broadway, New York, NY 10003, USA

6^{6}Department of Physics & King's Institute for Artificial Intelligence, King's College London,

Strand, London WC2R 2LS, United Kingdom

7^{7}Department of Physics & Astronomy, University College London, Gower Street, London, WC1E 6BT, UK

8^{8}Department of Applied Mathematics and Statistics, Johns Hopkins University,

3400 North Charles Street, Baltimore, MD, 21218, USA

9^{9}Department of Astrophysical Sciences, Princeton University, Princeton, NJ 08544, USA

10^{10}Cavendish Laboratory and Department of Applied Mathematics and Theoretical Physics,

University of Cambridge, Cambridge CB3 0WA, United Kingdom

11^{11}Max-Planck-Institut für extraterrestrische Physik, Giessenbachstr. 1, 85748 Garching, Germany

kai.lehman@physik.lmu.de

ABSTRACT

The evidence, Z=p(x∣M)\mathcal{Z} = p(x|\mathcal{M}), of a data-generating model M\mathcal{M} is a powerful tool in Bayesian frameworks: it enables model inference, model misspecification tests, and goodness-of-fit assessment as an alternative to standard discrepancy statistics, e.g. χ2\chi^2. While versatile, the evidence is notoriously difficult to compute, even when the likelihood is available. In both likelihood-based and simulation-based inference, estimating Z\mathcal{Z} provides an immediate solution to high-dimensional goodness-of-fit or model misspecification tests: using Z(x)\mathcal{Z}(x) as the test statistic induces a minimum-volume level- α\alpha test. Such tests are essential to assess model fidelity, which is necessary to trust simulation-based parameter inference. Existing learned approaches largely target Bayes factors, which only measure evidence ratios. Instead, we provide accurate, fast, and amortized estimates of the absolute evidence. We present ENFR: Evidence Networks with Flow-matched References. Building on the Evidence Network framework of Jeffrey & Wandelt (2024), the proposed method first learns Bayes factors with respect to a flow-matched reference, from which the absolute evidence is recovered. We show improvement in estimation of Z\mathcal{Z} over the flow-based baseline in all applications considered and the best performance of all density estimation methods considered in our benchmarks. We furthermore introduce and provide the proof for an architecture that jointly learns the individual evidences of a set of models {Mi}\{\mathcal{M}_i\}. We demonstrate the performance and scaling behavior of these approaches on data from a variety of scientific applications.

1 INTRODUCTION

Science is fundamentally tasked with modeling nature from first principles, and increasingly this modeling is done with high-fidelity simulators that produce samples from a likelihood that cannot itself be evaluated (e.g. Agostinelli et al., 2003; Mesinger et al., 2011; Villaescusa-Navarro et al., 2021). Simulation-based inference (SBI) has changed how such models are confronted with data: instead of requiring a tractable likelihood, it enables likelihood-free inference directly from simulator samples (Papamakarios & Murray, 2016; Alsing et al., 2018; Brehmer et al., 2020; Cranmer et al., 2020). These methods have already unlocked information in the data that was previously inaccessible (e.g. von Wietersheim-Kramsta et al., 2025; Thomsen et al., 2026, for recent scientific applications), and are being readily adopted across scientific disciplines.

The focus of SBI so far has been parameter estimation. What we ultimately care about in science, however, is assessing the relative fits of models when confronted to data. In a Bayesian framework this is measured by the evidence p(x∣M)p(x|\mathcal{M}), which is the probability that the observed data xx has been produced by a physical or statistical model M\mathcal{M}. In parameterized settings it is common to express the evidence as the marginal likelihood using the model parameters θ\theta:

p(x∣M)=∫p(x∣θ,M)p(θ∣M)dθ,(1)p(x|\mathcal{M})=\int p(x|\theta,\mathcal{M})p(\theta|\mathcal{M})d\theta, \tag{1}

where p(θ∣M)p(\theta|\mathcal{M}) denotes the prior on the parameters and p(x∣θ,M)p(x|\theta,\mathcal{M}) is the model likelihood. The evidence serves this purpose in two ways. For model comparison, we are interested in the Bayes factor log⁡K=log⁡p(x∣M)p(x∣M0)\log K = \log \frac{p(x|\mathcal{M})}{p(x|\mathcal{M}_0)} with respect to some reference model M0\mathcal{M}_0. Beyond model comparison, the absolute evidence enables powerful tests of the data such as model misspecification tests, and an alternative to χ2\chi^2 goodness-of-fit tests in high dimensions that does not require summary statistics.

Estimating the evidence has not been the focus of SBI, and the methods to do so are correspondingly less developed. Traditionally, computing the evidence has been a daunting task as the naive estimation of the integral is quickly intractable in high dimensions. Computationally heavy methods such as nested sampling (e.g. Feroz et al., 2009; Handley et al., 2015; Speagle, 2020) have been developed for these cases, but they require the ability to evaluate the likelihood, and even then have seen limited use in scientific applications due to computational infeasibility. How to evaluate the model evidence and Bayes factors when the likelihood is intractable but a simulator is available has remained a largely underexplored topic.

Jeffrey & Wandelt (2024) presented the application of neural network based density ratio estimators to learn Bayes factors in this regime. We build on this previous work and introduce ENFR, Evidence Networks with Flow-matched References, which combines flow-based models and evidence networks: using a generative flow as the reference model, we obtain not only Bayes factors but precise estimates of the absolute evidence. We furthermore introduce a new loss function to jointly estimate the Bayesian evidence and Bayes factors of multiple models in Section 3.

Alongside the method, we introduce an evaluation framework built on scientifically relevant applications from a range of disciplines in Section 4. It includes cases with a known likelihood, where the evidence can be estimated with nested sampling and our estimates can therefore be tested accurately against a ground truth, as well as simulation-based cases where only the calibration of the Bayes factors can be assessed. Across these applications, ENFR performs best of all learned estimators considered.

References (65)