Source-linked AI summary
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
TL;DR
Bayesian evidence is useful for assessing model fit, but simulation-based inference has focused on parameter estimation and learned approaches have largely targeted evidence ratios. ENFR combines a flow-matched reference with evidence networks to estimate absolute evidence, outperforming the flow baseline across applications and supporting a DESI DR2 misspecification test. The method's high-dimensional flow reference and simulation requirements remain practical boundaries.
Problem
Assessing models requires evidence, but simulation-based inference has focused on parameter estimation and estimating evidence for simulator models remains underexplored.
Source: §1 · p. 2Method
ENFR learns Bayes factors against a flow-matched reference and combines them with its evaluated density to estimate absolute evidence, including jointly across models.
Source: §1 · p. 2, §6 · p. 10Results
SingleENFR improves on its flow baseline in every benchmark, while MultiENFR is the most accurate estimator across the scientific applications considered.
Source: §1 · p. 2, §6 · p. 10Takeaways & Limitations
Amortized evidence estimation makes evidence cheap enough to use as a test statistic, demonstrated with a prior-predictive misspecification test on DESI DR2 data.
Source: §6 · p. 10The flow reference degrades beyond about 500 dimensions, and benchmarks use about 10^5 simulations per model, which many scientific simulators cannot afford.
Source: §6 · p. 10
Abstract
from arXiv · showhide
The evidence, $\mathcal{Z} = p(x | \mathcal{M})$, of a data-generating model $\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. $\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 $\mathcal{Z}$ provides an immediate solution to high-dimensional goodness-of-fit or model misspecification tests: using $\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 $\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 $\{\mathcal{M}_i\}$. We demonstrate the performance and scaling behavior of these approaches on data from a variety of scientific applications.
1 INTRODUCTION
Bayesian evidence measures how well a model accounts for observed data, but estimating it for simulators with intractable likelihoods remains underexplored. ENFR combines flow-based references and evidence networks to estimate absolute evidence, and performs best among learned estimators in the applications considered.
1 INTRODUCTION
- Evidence p(x|M) measures whether observed data were produced by a model and supports model comparison and high-dimensional goodness-of-fit tests.The latter can be performed without summary statistics as an alternative to χ² tests.Source: §1 · p. 2
- Estimating evidence and Bayes factors for simulators with intractable likelihoods remains underexplored, while traditional high-dimensional evidence estimation can be computationally infeasible.Methods such as nested sampling require likelihood evaluation.Source: §1 · p. 2
- ENFR uses a generative flow as a reference for evidence networks, recovering absolute evidence from learned Bayes factors; it also introduces a joint multi-model loss.This builds on Jeffrey & Wandelt (2024), who applied neural density-ratio estimators to learn Bayes factors.Source: §1 · p. 2
- Across applications, ENFR performs best among the learned estimators considered, with tests against ground truth where likelihoods are known and Bayes-factor calibration tests otherwise.The evaluation framework includes both likelihood-known and simulation-based cases.Source: §1 · p. 2
2 RELATED WORK
Related approaches provide density estimates or density ratios, but differ in their objectives and limitations. ENFR focuses on accurate absolute evidence, using flow-matched references with evidence networks.
Generative models for evidence estimation
- Flow-based generative models can sample from a target distribution and evaluate its density, but their training objectives prioritize velocity or score estimation rather than density evaluation.Flow matching learns a velocity field mapping noise samples to data, with density obtained by integrating the continuity equation.Source: §2 · pp. 2–3
Evidence Networks
- Evidence networks learn Bayes factors as density ratios against a reference model, whose known density is needed to reconstruct absolute evidence.Large distributional distances can cause the density-chasm failure mode; the l-POP transform is intended to improve extreme-ratio estimation.Source: §2 · p. 3
Telescoping ratio estimation
- Telescoping ratio estimation uses intermediate waymark distributions to bridge density gaps, but the cited work did not benchmark reconstructed densities against known normalized pointwise values.Its approach also differs from ENFR in architecture.Source: §2 · p. 3
Time Score Matching (CTSM)
- Time-score matching integrates a learned time score into a density estimate, but high variance near the data and imperfect-training normalization issues can limit it.The paper evaluates VP and SB interpolants, including SB with a learned flow reference.Source: §2 · p. 3
Featurized Density Ratio Estimation
- Featurized density-ratio estimation uses an invertible flow to create a common feature space and estimate ratios, whereas this work targets actual densities as well as ratios.Flow contrastive estimation jointly trains an energy-based model and a flow using a noise-contrastive objective; its density benchmarks were limited beyond two dimensions.Source: §2 · pp. 3–4
3 ENFR: EVIDENCE NETWORKS WITH FLOW-MATCHED REFERENCES
ENFR learns a flow-matched reference and uses an evidence network to correct it, yielding absolute evidence from Bayes factors and evaluated flow density. MultiENFR extends the approach to multiple models with a pairwise loss whose population minimizers recover Bayes factors under stated conditions.
3 ENFR: EVIDENCE NETWORKS WITH FLOW-MATCHED REFERENCES
- The evidence network learns a correction to the flow estimate by discriminating simulations from flow samples, while the evaluated flow density converts the learned Bayes factor into evidence.Figure 1 depicts flow matching followed by evidence-network training for SingleENFR and MultiENFR.Source: §3 · p. 4, Figure 1 · p. 4
- SingleENFR needs accurate flow samples to generate half of the evidence-network training data, and evaluates the flow density only at inference time.When the flow already fits the data well, the population-optimal constant correction is zero under balanced training.Source: §3 · p. 4
ENFR with multiple models (MultiENFR)
- MultiENFR introduces a pairwise l-POP loss to jointly estimate evidences for a set of models.The method uses an additional flow trained on data from all models as a reference class, then combines its density with each model's learned Bayes factor.Source: §3 · pp. 4–5
- Under the theorem's assumptions, every global population-risk minimizer has outputs equal to each model's log density plus a model-independent function, yielding pairwise Bayes factors.The assumptions include equal model sampling, positive densities on common support, sufficient expressivity, finite risk, and convergence to a global minimizer.Source: §3 · p. 5
4 RESULTS
Across the analytical and simulation-based applications, ENFR methods generally improve evidence estimation over flow-based baselines, with MultiENFR leading in several applications. Where likelihood-based evidence is unavailable, MultiENFR’s Bayes factors are reported as well calibrated.
4.1 ANALYTICAL EVIDENCE: GAUSSIAN MIXTURE MODEL
- SingleENFR consistently outperforms tested methods in GMM scaling, while improving on its flow reference at every plotted point and leading the density estimators considered.The flow reference degrades beyond about 500 dimensions, where the evidence-network correction yields only minor improvements.Source: §4.1 · p. 5, Figure 2 · p. 6
4.2.1 BARYONIC ACOUSTIC OSCILLATIONS
- SingleENFR and MultiENFR consistently outperform the flow and CTSM-SB with a flow reference on held-out BAO simulations.On DESI DR2 observed data, MultiENFR estimates agree with likelihood-based estimates to the order of the nested-sampling error bars.Source: Table 1 · p. 6, §4.2.1 · p. 7, Table 2 · p. 7
4.2.2 TIME SERIES FROM AN ODE
- MultiENFR outperforms all tested models for the noisy ODE time series, and both ENFR variants produce more precise evidence estimates than the flow.The full results also identify CTSM-SB with a flow reference as having the highest RMSE, hence the worst performance among the tested models.Source: §4.2.2 · p. 7
4.2.3 DIFFUSION DRIFT SDE
- MultiENFR produces the highest-precision evidence estimates for both constant- and leaky-drift models, improving on the already precise flow estimates.The Figure 3 caption reports good evidence estimation over a large dynamical range.Source: §4.2.3 · pp. 7–8, Figure 3 · p. 8
4.3 SIMULATION-BASED APPLICATIONS
- For applications without an available likelihood-based evidence estimate, the evaluation instead uses blind coverage testing to assess Bayes-factor calibration.The test bins predicted model posteriors and checks whether the fraction of simulations from each model matches the assigned posterior probability.Source: §4.3 · p. 8
4.3.1 THE HODGKIN-HUXLEY MODEL
- MultiENFR’s Bayes factors are well calibrated for the Hodgkin-Huxley application across four models that vary the included ionic contributions.The variants add slow potassium, L-type calcium, or both to the sodium, potassium, and leak model.Source: §4.3.1 · p. 8, Figure 4 · p. 9
4.3.2 GALAXY ASSEMBLY BIAS
- MultiENFR is well calibrated for the galaxy assembly-bias comparison and could be used to determine the underlying bias model from observations without a likelihood.The comparison uses a mass-only model and an extension with assembly and phase-space bias, based on 362-dimensional summary statistics.Source: §4.3.2 · p. 9
5 FAST EVIDENCES IN ACTION: HYPOTHESIS TESTING
The authors use amortized MultiENFR evidence estimates to compare 1,000 ΛCDM prior-predictive simulations with DESI DR2 data and a non-standard dark-energy simulation. The data show no indication of misspecification under ΛCDM, while the toy model is distinguishable from the simulations.
5 FAST EVIDENCES IN ACTION: HYPOTHESIS TESTING
- The test estimates evidence for 1,000 prior-predictive BAO simulations under ΛCDM and compares those values with the data's evidence estimate.The simulations form the null hypothesis, and the comparison yields a prior-predictive p-value.Source: §5 · p. 9
- The finite-sample estimator counts simulations with evidence lower than or equal to the data's and uses that count to estimate the prior-predictive p-value.The estimator's count is denoted R.Source: §5 · p. 9
- 46.1% of ΛCDM prior-predictive simulations have lower evidence than DESI DR2, while none has lower evidence than the toy w(z) simulation.The comparison finds no indication of misspecification for the dataset but picks up the toy model's misspecification.Source: Figure 5 · p. 9, §5 · p. 9
6 LIMITATIONS AND CONCLUSIONS
ENFR estimates absolute Bayesian evidence with a flow-matched reference, and its single- and multimodel versions improve on their respective baselines in the reported benchmarks. The authors identify high-dimensional density estimation and simulation costs as remaining limitations.
6 LIMITATIONS AND CONCLUSIONS
- Beyond ∼500 dimensions in the GMM scaling test, the flow reference degrades and the evidence network recovers only a small correction.The authors identify high-dimensional density estimation as a continuing bottleneck.Source: §6 · p. 10
- The benchmarks use O(105) simulations per model, a scale that many scientific simulators cannot afford.The evidence-network correction is most effective in the small-data regime, according to Figure 2b.Source: §6 · p. 10
- SingleENFR improves on its flow baseline in every benchmark, while MultiENFR is the most accurate estimator across the scientific applications.The MultiENFR approach uses a new pairwise l-POP loss for which the authors prove asymptotic recovery of all Bayes factors.Source: §6 · p. 10
- Amortized inference makes evidence estimates cheap enough for a prior-predictive misspecification test on DESI DR2 data.The authors position the work as extending simulation-based inference beyond parameter estimation to misspecification testing, goodness-of-fit assessment, and model comparison.Source: §6 · p. 10
A DETAILS ABOUT THE EXPERIMENTS
The appendix details the experiment setups, priors, data representations, and simulation procedures used across the paper's benchmarks. It covers the GMM scaling test, cosmology and dark-energy applications, decision and neuron models, and galaxy assembly bias.
A DETAILS ABOUT THE EXPERIMENTS
- The appendix collects numerical experiment details, including GMM setup, cosmological priors, ODE and DDM applications, Hodgkin–Huxley simulations, and galaxy-bias comparisons.It also directs readers to architecture details in Appendix B.Source: A DETAILS ABOUT THE EXPERIMENTS · p. 15
A.1 GMM
- GMM components lie on a radius-3.8 sphere; the dimensionality test uses 5M draws, with separate flow and evidence-network training splits and 200 fresh test draws.Data are standardized using training-set statistics, with the transformation Jacobian included in density estimates.Source: §A.1 · p. 16
A.2 BAO AND PRIORS
- The BAO data vector contains 13 distance-to-sound-horizon quantities at seven redshifts, and the cosmology experiments use Gaussian likelihood simulations with DESI DR2 covariance.The experiment generates 500k training simulations and 2k evaluation simulations per model, plus 100 nested-sampling runs per model.Source: §A.2 · p. 17, Table 3 · p. 17
A.3 TOY DARK ENERGY MODEL
- The toy dark-energy model transitions from w ≃ −0.6 at low redshift toward w = −1 at high redshift.The ODE oscillator experiment uses independent uniform priors and trains on 1M simulations per model, with 10% held out for validation.Source: §A.3 · p. 18, Table 4 · p. 18, §A.4 · p. 18
A.4 ODE APPLICATION DETAILS AND PRIORS
- The ODE application details section reports its priors and a training set of 1M simulations per model, with 10% used for validation.The reported results are in Table 5.Source: §A.4 · p. 18
A.5 DDM
- The DDM likelihood is available through the corresponding Fokker–Planck equation, and each model uses 500k training simulations with 10% reserved for validation.The authors use prior ranges from Schröder & Macke (2024) and report results in Table 7.Source: §A.5 · p. 18
A.6 HODGKIN-HUXLEY
- The Hodgkin–Huxley setup defines voltage-gated currents and uses 13 hand-picked summaries, assigning physical-limit values when summaries are undefined.Simulations use a noisy current step and Crank–Nicolson integration at Δt = 0.025 ms; 400k simulations per model are generated for training.Source: §A.6 · pp. 18–19
A.7 GALAXY ASSEMBLY BIAS
- The galaxy-bias comparison contrasts a mass-only HOD with an extension incorporating assembly and phase-space bias, using a disjoint split of 64,000 training simulations.The split also includes 8,000 validation and 8,000 frozen test simulations; a pooled flow supplies a third class for the pairwise evidence networks.Source: §A.7 · pp. 19–20
B ARCHITECTURES
The architecture appendix describes the flow, evidence-network, and continuous-time score-matching implementations. It also records model choices that vary across applications and a hyperparameter-search limitation.
B ARCHITECTURES
- The work implements its neural networks in PyTorch and lists software licenses for the libraries and DESI data products.The appendix also describes the numerical architectures used in the experiments.Source: B ARCHITECTURES · p. 20
B.1 FLOW MATCHING
- The flow-matching velocity field uses a 256-unit, four-layer MLP with SiLU activations, while the DDM flow uses permutation-equivariant DeepSets.The authors leave the effects of thorough hyperparameter searches and alternative optimizers for future study.Source: §B.1 · p. 21
B.2 ENFR
- Evidence-network architectures vary by application, and most experiments use equally weighted five-network ensembles; the GMM uses single networks.For DDM, MultiENFR uses a permutation-invariant DeepSet, with an equally weighted five-member ensemble.Source: §B.2 · p. 22
B.3 CTSM
- The CTSM baselines use either variance-preserving or Schrödinger-bridge interpolants, with architectures matching the corresponding SingleENFR runs.The flow reference supplies x0 and model data supply x1; the noise scale is 1.Source: §B.3 · p. 22
C RESULTS OF THE GMM SCALING EXPERIMENT
The GMM scaling results are reported in Table 11, with Figure 6 illustrating the improvement from adding the evidence network at 128 dimensions.
C RESULTS OF THE GMM SCALING EXPERIMENT
- Table 11 reports the GMM scaling results.Its caption describes RMSE comparisons of estimated and true log densities over held-out test draws.Source: C RESULTS OF THE GMM SCALING EXPERIMENT · p. 22
- Figure 6 presents an example plot illustrating improvement from adding the evidence network in 128 dimensions.Source: C RESULTS OF THE GMM SCALING EXPERIMENT · p. 22
- The reported figure compares the flow with SingleENFR.No numerical result is stated in the supplied passage.Source: C RESULTS OF THE GMM SCALING EXPERIMENT · p. 22
D BAYES FACTOR ANALYSIS FOR DESI DR2 DATA
The section compares simulation-based MultiENFR Bayes factors with likelihood-based analysis on DESI DR2 data. The reported errors are largely comparable in three of four models.
D BAYES FACTOR ANALYSIS FOR DESI DR2 DATA
- The simulation-based estimate's error is largely comparable to the likelihood-based estimate in three of the four models.The comparison concerns Bayes factors with respect to ΛCDM on DESI DR2 data.Source: D BAYES FACTOR ANALYSIS FOR DESI DR2… · p. 22, Table 12 · p. 23
- Table 12 presents Bayes factors with respect to ΛCDM on the DESI DR2 data.The prose identifies it as an explicit comparison of MultiENFR Bayes factors with likelihood-based analysis.Source: D BAYES FACTOR ANALYSIS FOR DESI DR2… · p. 22, Table 12 · p. 23
- The supplied comparison does not specify the result for the remaining model.The reported comparable errors apply to three of four models.Source: Table 12 · p. 23
E PROOF OF MINIMIZER OF EVIDENCE NETWORKS
The appendix establishes the l-POP loss minimizer for evidence networks and examines a constant-prediction case. Under equal model weights, that constant correction asymptotically does not degrade a well-trained flow's evidence estimate.
E PROOF OF MINIMIZER OF EVIDENCE NETWORKS
- With equal prior model weights, the l-POP loss minimizer is the Bayes factor.The appendix presents this result for an evidence network.Source: E PROOF OF MINIMIZER OF EVIDENCE… · p. 24
F EN CORRECTION TO THE FLOW UNDER CONSTANT PREDICTION
- When the evidence network returns only a constant, its asymptotically optimal correction does not degrade a well-trained flow's evidence estimate under equal model weights.This is the stated constant-prediction case for the l-POP loss evidence network.Source: F EN CORRECTION TO THE FLOW UNDER… · pp. 25–26
G PROOF OF MINIMA OF THE MULTICLASS EVIDENCE NETWORK
For the multiclass evidence network, the proof shows that the loss is minimized by Bayes factors. The minimizing outputs may share an undetermined common offset because the loss depends only on pairwise differences.
G PROOF OF MINIMA OF THE MULTICLASS EVIDENCE NETWORK
- The multiclass evidence network loss is minimized by Bayes factors.The proof considers N models sampled with equal probability.Source: G PROOF OF MINIMA OF THE MULTICLASS… · p. 26
- At the minimum, each model output has the form of its log density plus a common, non-identifiable offset.Taking differences between outputs removes the common offset.Source: G PROOF OF MINIMA OF THE MULTICLASS… · p. 28
- The stationary family is a global minimizer because it attains the pointwise lower bound of the population-risk integrand.The loss depends only on pairwise differences between outputs, leaving the common function undetermined.Source: G PROOF OF MINIMA OF THE MULTICLASS… · p. 28
Related papers
This paper cites
- PyTorch: An Imperative Style, High-Performance Deep Learning Library2019
- Score-Based Generative Modeling through Stochastic Differential Equations2020
- Generative Modeling by Estimating Gradients of the Data Distribution2019
- dynesty: A Dynamic Nested Sampling Package for Estimating Bayesian Posteriors and Evidences2019