University of Liège Exposes How AI Inference Tools Silently Mislead Scientists
A new PhD thesis shows that ML-based scientific simulators routinely produce overconfident posteriors, and introduces two principled fixes: balancing and Bayesian neural networks.
ProTakeaways
- All major SBI algorithms (NPE, NRE, NLE, ABC) produce overconfident posteriors on at least one benchmark, risking false scientific conclusions.
- A new diagnostic called expected coverage measures this: if your 90% credible region contains the truth only 70% of the time, your model is overconfident.
- Balanced Neural Ratio Estimation (BNRE) adds a simple regularization term to NRE training and consistently produces conservative posteriors across all tested benchmarks. Code here.
- Balancing was extended to NPE and NRE-C variants, covering most widely-used SBI algorithms. Code here.
- BNN-SBI uses Bayesian neural networks with a GP-derived prior to achieve conservativeness with as few as ~10 simulator runs, for expensive simulators. Code here.
- No method guarantees conservativeness for a single observation; all results are in expectation, and score-based (diffusion) models are not yet covered.
Science advances by building models, testing them against data, and discarding the ones that fail. But what happens when the statistical machinery used to test those models is quietly lying to you? That is the central question of "Towards Reliable Simulation-Based Inference", a doctoral thesis by Arnaud Delaunoy at the University of Liège, and the answer is unsettling: most of the time, you would never know.
When simulators replace equations
Many modern scientific fields , cosmology, particle physics, epidemiology, neuroscience , have grown too complex for closed-form mathematical models. Instead, researchers write simulators: programs that stochastically generate synthetic observations given some parameters. Think of a simulator for gravitational waves that takes black hole masses as input and produces a noisy interferometry signal as output. The goal of simulation-based inference (SBI) is to invert this process: given a real observation, recover a probability distribution over the parameters that could have produced it. That distribution is the posterior.
Because simulators define the likelihood function only implicitly (you can sample from it but cannot evaluate it), classical Bayesian inference breaks down. The SBI field has responded with a family of neural network-based approximations , Neural Posterior Estimation (NPE), Neural Ratio Estimation (NRE), Neural Likelihood Estimation (NLE) , that learn surrogate models from simulator runs. These methods have been applied to everything from Higgs boson discovery to dark matter substructure. But they come with a hidden cost.
The overconfidence problem
All of these neural approximations are imperfect. The question is: imperfect in which direction? In Popperian science, the asymmetry matters enormously. Underconfident posteriors (too wide) mean you fail to rule out wrong theories , annoying, but not catastrophic. Overconfident posteriors (too narrow) mean you wrongly rule out correct theories, potentially steering entire research programs in the wrong direction.
The thesis introduces a diagnostic called expected coverage to measure this. The idea is simple: if you claim a 90% credible region, the true parameter should fall inside it 90% of the time across many test cases. A perfectly calibrated model sits on the diagonal of a coverage plot. Overconfident models fall below it. The first major empirical result of this thesis, drawn from months of computation across seven benchmarks (including real gravitational wave and stellar stream problems), is stark:
- Every benchmarked algorithm , NPE, NRE, NLE, ABC, and their sequential variants , produced overconfident posteriors on at least one benchmark.
- The pathology was worst with small simulation budgets, precisely the regime sequential methods are designed for.
- Amortized methods (trained once, applied to any observation) were more conservative than non-amortized sequential methods.
- Ensembling five models consistently improved coverage, but still offered no guarantee.
The practical stakes are illustrated with a dark matter example: an overconfident estimator could simultaneously favor cold dark matter and reject the Sterile Neutrino , a leading warm dark matter candidate , not because the data demands it, but because the neural network ran out of training samples.
Fix one: Balancing
The first solution introduced is Balanced Neural Ratio Estimation (BNRE), published at NeurIPS 2022. The core insight is that the neural classifier at the heart of NRE has a natural symmetry property at its global optimum: the Bayes-optimal classifier is always balanced, meaning its average output over joint samples and marginal samples sums to one. Standard training does not enforce this constraint, so finite-data approximations can violate it and become overconfident.
BNRE enforces balancing through a simple regularization penalty added to the cross-entropy loss:
# Standard NRE loss
loss = cross_entropy(classifier, joint_samples, marginal_samples)
# BNRE: add a balancing penalty
balance_error = (
classifier(joint_samples).mean()
+ classifier(marginal_samples).mean()
- 1.0
) ** 2
loss_bnre = loss + lambda_ * balance_error # lambda=100 works well
Two theorems prove that any balanced classifier tends to be less confident than the Bayes-optimal one , in expectation, it underestimates the likelihood-to-evidence ratio in high-posterior regions and overestimates it in low-posterior regions, producing posteriors that lie between the prior and the true posterior. Empirically, BNRE produced conservative coverage curves on all six tested benchmarks across all simulation budgets, while standard NRE frequently fell below the diagonal. The cost is a small loss in statistical sharpness at low budgets, which vanishes as the simulation budget grows.
A follow-up paper extended balancing beyond NRE. The thesis shows that the balancing condition can be expressed as a chi-squared divergence between the marginal classifier output and the target class distribution, and that this reformulation applies to any algorithm that produces an explicit posterior density , including NPE with normalizing flows (BNPE) and contrastive NRE variants (BNRE-C). Code for all variants is available at github.com/ADelau/balancing_sbi.
Fix two: Bayesian neural networks with a tailored prior
Balancing has a weakness: it works through regularization, which requires enough training data to enforce the constraint reliably. When simulators are extremely expensive , think N-body cosmological simulations costing millions of CPU hours , you might have only tens of training samples. In that regime, balancing can fail.
The thesis introduces a second approach: Bayesian neural networks (BNNs) with a simulation-aware prior. The key insight is that overconfidence in the low-data regime stems from epistemic uncertainty , uncertainty about the neural network weights themselves , being ignored. Many networks can fit a small training set equally well, yet make wildly different predictions on test data. A standard neural network picks one and commits to it. A BNN maintains a distribution over networks and averages their predictions.
The critical ingredient is the prior on network weights. A naive Gaussian prior produces a prior predictive distribution that is not calibrated , the a priori Bayesian model average is neither conservative nor overconfident in any principled sense. The thesis designs a prior by working in function space rather than weight space:
- Define a Gaussian process (GP) over posterior functions, centered at the simulator's prior distribution
p(θ). This is provably calibrated: if you have no data, your best guess is the prior, which has exactly 90% coverage at the 90% level. - Fit the weight-space prior so that the BNN's prior predictive distribution matches this GP, using KL divergence minimization with Spectral Stein Gradient Estimation.
- At inference time, use mean-field variational inference to approximate the posterior over weights, then average predictions over sampled networks.
The result is a posterior approximation that is conservative even with simulation budgets as low as O(10) samples , something no other method achieves. On the Quijote cosmological N-body benchmark (35 million CPU hours to generate 44,100 simulations), BNN-NPE produced calibrated posteriors with only a few hundred training samples, while standard NPE was overconfident. The implementation is available at github.com/ADelau/low_budget_sbi_with_bnn.
What it is good at, and where it falls short
The practical picture looks like this:
| Method | Best for | Limitation |
|---|---|---|
| BNRE / BNPE | Moderate simulation budgets; drop-in replacement for NRE/NPE | Can fail at very low budgets; no hard coverage guarantee |
| BNN-SBI | Expensive simulators, very few samples (O(10)–O(100)) | Slower predictions (100 forward passes); needs prior tuning; slower convergence to sharp posteriors |
| Ensembles | Immediate improvement with no code changes | 5x compute cost; still no guarantee |
None of these methods guarantee conservativeness for a single observation , all guarantees are in expectation. Score-based methods (diffusion models) are also not covered, because the balancing condition requires posterior density evaluation, which diffusion models do not provide directly. And the expected coverage diagnostic itself is not invariant to reparametrization of the parameter space, a subtlety that matters when domain experts choose their parameterization.
Why this matters beyond the paper
The deeper contribution is a shift in how the SBI community thinks about quality. Standard ML metrics , KL divergence, classifier two-sample tests , treat overconfident and underconfident approximations as equally bad. The thesis argues they are not: in falsificationist science, overconfidence is strictly worse. Expected coverage is now widely adopted in applied SBI papers across astrophysics, cosmology, and particle physics as the primary reliability diagnostic. BNRE is integrated into the SBI toolkit and the LAMPE library.
The thesis closes with a philosophical note: even perfect coverage in expectation may not be enough for Popperian falsification, which requires conclusions about specific observations. A more realistic long-term goal may be to evolve the scientific method itself , treating approximate refutations as probabilistic rather than definitive, and making the quality of the approximation itself an object of scientific criticism.