From Simulations to Posteriors:
A Tour of Simulation-Based Inference
Justine Zeghal
STATSTRO 2026, Toronto, Canada
Mila, Université de Montréal



Outline
Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Compression
Generative Models
How to validate the inference?
Why we need SBI?
To understand the mechanisms underlying observed phenomena, we usually build a model parametrized by parameters:
Then, the goal is to infer the parameters that could have generated the observation:
Observable
Parameters of interest
Posterior distribution
Why we need SBI?
Example
Relying only on a few parameters:


Credit: ESA
Why we need SBI?
Bayes theorem
Intractable
Markov Chain Monte Carlo (Metropolis-Hastings-based) methods have a way to solve this by accepting a proposed sample if




Why we need SBI?
Bayes theorem
Intractable
Markov Chain Monte Carlo (Metropolis-Hastings-based) methods have a way to solve this by accepting a proposed sample if
Why we need SBI?
Bayes theorem
Why we need SBI?
Bayes theorem
Instead of relying on an analytical model to describe the phenomenon, we can simulate it.
Simulator
We now just have to compute the marginal likelihood:

Initial conditions
Large Scale Structure

Prediction
Inference
Why we need SBI?
Why we need SBI?
Simulator
Explicit inference
Implicit inference
Needs an explicit simulator to sample the joint posterior through MCMC:
We only need simulations .
Why we need SBI?
An intuition of how implicit inference works
Neural-based SBI
Compression
Generative Models
How to validate the inference?
Why we need SBI?
Neural-based SBI
Compression
Generative Models
An intuition of how implicit inference works
How to validate the inference?
Simulator
Approximate Bayesian computation (e.g. Sisson et al., 2018)
An intuition of how implicit inference works
An intuition of how implicit inference works
Simulator
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
Simulator
Limitations:
- How to choose the threshold?
- Not tractable in high-dimensional parameter space.
- Distance calculations becomes impractical in high-dimension.
An intuition of how implicit inference works
Approximate Bayesian computation (e.g. Sisson et al., 2018)
An intuition of how implicit inference works
Simulator
An intuition of how implicit inference works
Simulator
An intuition of how implicit inference works
Simulator
An intuition of how implicit inference works
Simulator
An intuition of how implicit inference works
Simulator
,
An intuition of how implicit inference works
Simulator
,
- likelihood ratio
- marginal likelihood
- posterior
We can learn:
Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Generative Models
Compression
How to validate the inference?
Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Generative Models
Compression
How to validate the inference?
Generative models
Since the goal of implicit inference is to approximate a distribution, it has greatly benefited from the advent of generative models.
Different kinds of generative models:
- Generative Adversarial Networks (GANs)
- Variational Autoencoders (VAEs)
- Flow Models (Normalizing Flows, Flow Matching, Diffusion Models, Stochastic Interpolants)
- etc.
Definition:
A generative model is a machine learning model designed to create new data that is similar to its training data .
Normalizing Flows (Dinh et al. 2015)
Generative models



Generative models



Normalizing Flows (Dinh et al. 2015)
Generative models



Normalizing Flows (Dinh et al. 2015)
Generative models



Normalizing Flows (Dinh et al. 2015)
Generative models



Normalizing Flows (Dinh et al. 2015)
Generative models



Normalizing Flows (Dinh et al. 2015)
Generative models



Normalizing Flows (Dinh et al. 2015)
Change of Variable Formula:
Generative models
We need to learn the mapping to approximate the complex distribution



Normalizing Flows (Dinh et al. 2015)
Change of Variable Formula:
Should be easy to compute
Generative models
Normalizing Flows (Dinh et al. 2015)
Generative models
Normalizing Flows (Dinh et al. 2015)
Generative models
Normalizing Flows (Dinh et al. 2015)
Generative models
Normalizing Flows (Dinh et al. 2015)
Generative models
Normalizing Flows (Dinh et al. 2015)
Generative models
Simulations only!
Change of variable formula
Normalizing Flows (Dinh et al. 2015)
Generative models
Normalizing Flows (Dinh et al. 2015)
Generative models
Normalizing Flows (Dinh et al. 2015)
Likelihood approximation (e.g. Papamakarios et al., 2019)
Generative models
Normalizing Flows (Dinh et al. 2015)
Likelihood approximation (e.g. Papamakarios et al., 2019)
Posterior approximation (e.g. Papamakarios et al., 2016)
Generative models
We need to learn a continuous transformation solution of the ODE
velocity field
Credit: Gagneux et al. 2025
Continous Normalizing Flows
Generative models
We need to learn a continuous transformation solution of the ODE
Flow Matching (Lipman et al. 2023)
Generative models
We need to learn a continuous transformation solution of the ODE
Credit: Gagneux et al. 2025
Flow Matching (Lipman et al. 2023)
Generative models
Flow Matching (Lipman et al. 2023)
We need to learn a continuous transformation solution of the ODE
Generative models
Flow Matching (Lipman et al. 2023)
We need to learn a continuous transformation solution of the ODE
Generative models
Flow Matching (Lipman et al. 2023)
We need to learn a continuous transformation solution of the ODE
with:

Tong et al. 2023
Generative models
Flow Matching (Lipman et al. 2023)
We need to learn a continuous transformation solution of the ODE
Dax et al. (2023)
To approximate the posterior through Flow Matching
Generative models
Diffusion Models (e.g. Song et al., 2021)
Sharrock et al. (2024)


Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Generative Models
Compression
How to validate the inference?
Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Generative Models
Compression
How to validate the inference?
Neural-based SBI
Prior
Simulator
Posterior Estimator
Observation
Evaluate
Posterior
Neural Posterior Estimation
Prior
MCMC
Posterior
Observation
Likelihood Estimator
Simulator
Neural Likelihood Estimation
Prior
Simulator
Ratio Estimator
Observation
MCMC
Posterior
Neural Ratio Estimation
✅
✅
❓
Neural-based SBI
Ratio Estimator
Neural-based SBI
Ratio Estimator
Class y = 1
Class y = 0
Neural-based SBI
Ratio Estimator
Simulator
Class y = 1
Class y = 0
Neural-based SBI
Ratio Estimator
Simulator
Class y = 1
Class y = 0
Neural-based SBI
Ratio Estimator
Class y = 1
Class y = 0
Simulator
Neural-based SBI
Ratio Estimator
Class y = 1
Class y = 0
Simulator
Neural-based SBI
Ratio Estimator
Class y = 1
Class y = 0
Simulator
Neural-based SBI
Ratio Estimator
Class y = 1
Class y = 0
Simulator
Neural-based SBI
Ratio Estimator
Class y = 1
Class y = 0
Simulator
Neural-based SBI
Ratio Estimator
,
,
Neural-based SBI
Ratio Estimator
,
,
BCE loss (Cranmer et al., 2016)
Neural-based SBI
Ratio Estimator
,
,
Neural-based SBI
Ratio Estimator
,
,
Neural-based SBI
Ratio Estimator
,
,
Hermans et al. (2020)
Neural-based SBI
Ratio Estimator
,
,
Hermans et al. (2020)
Neural-based SBI
How to deal with costly simulations?
Neural-based SBI
How to deal with costly simulations?
Sequential methods
We can sample simulations only where we need!
Neural-based SBI
How to deal with costly simulations?
Sequential methods
We can sample simulations only where we need!
Prior
Evaluate
Posterior
Observation
Posterior Estimator
Simulator
Neural Posterior Estimation
Neural-based SBI
How to deal with costly simulations?
Sequential methods
We can sample simulations only where we need!
Prior
Evaluate
Posterior
Observation
Posterior Estimator
Simulator
Neural Posterior Estimation
Sequential
Proposal
Neural-based SBI
How to deal with costly simulations?
Sequential methods
We can sample simulations only where we need!
Prior
Evaluate
Posterior
Observation
Posterior Estimator
Simulator
Neural Posterior Estimation
Sequential
Proposal
Neural-based SBI
How to deal with costly simulations?
Sequential methods
We can sample simulations only where we need!
Prior
Evaluate
Posterior
Observation
Posterior Estimator
Simulator
Neural Posterior Estimation
Sequential
Proposal
Neural-based SBI
How to deal with costly simulations?
Sequential methods
We can sample simulations only where we need!
Prior
Evaluate
Posterior
Observation
Posterior Estimator
Simulator
Neural Posterior Estimation
Sequential
Proposal
Need to re weight for SNPE! See Greenberg et al. (2019)
Neural-based SBI
How to deal with costly simulations?
Gradient-based methods
?
❌
✅





Brehmer et al. (2018), Zeghal et al. (2022)
For instance for NPE:

Without gradients
Zeghal et al. (2022)
With gradients
Neural-based SBI
How to deal with costly simulations?
Gradient-based methods
Brehmer et al. (2018), Zeghal et al. (2022)














Without gradients
With gradients
Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Generative Models
Compression
How to validate the inference?
Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Generative Models
Compression
How to validate the inference?
Compression
Compression

Compression
Sufficient Statistic:
Mutual information

Compression
Sufficient Statistic:
Mutual information

Compression
Sufficient Statistic:
Mutual information
Only a matter of the loss function we use!

Lanzieri, Zeghal et al. 2025

Compression
Regression Losses
Information-based Losses
Compression
Regression Losses
Information-based Losses
Mean Squared Error (MSE) loss:
→ Approximate the mean of the posterior.
Compression
Regression Losses
Information-based Losses
Mean Squared Error (MSE) loss:
→ Approximate the mean of the posterior.
Compression
Regression Losses
Information-based Losses
Mean Squared Error (MSE) loss:
→ Approximate the mean of the posterior.
Compression
Regression Losses
Information-based Losses
Mean Squared Error (MSE) loss:
→ Approximate the mean of the posterior.
Compression
Regression Losses
Information-based Losses
Mean Squared Error (MSE) loss:
→ Approximate the mean of the posterior.
Compression
Regression Losses
Information-based Losses
Mean Squared Error (MSE) loss:
→ Approximate the mean of the posterior.
Sufficient Statistic:
Compression
Regression Losses
Information-based Losses
Mean Squared Error (MSE) loss:
→ Approximate the mean of the posterior.
Sufficient Statistic:
Compression
Regression Losses
Information-based Losses
Mean Squared Error (MSE) loss:
→ Approximate the mean of the posterior.
Sufficient Statistic:
→ Build sufficient statistics by definition.
Compression
Lanzieri, Zeghal et al. 2025

Compression

Lanzieri, Zeghal et al. 2025


Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Generative Models
Compression
How to validate the inference?
Why we need SBI?
An intuition of how SBI works
Neural-based SBI
Generative Models
Compression
How to validate the inference?
How to validate the inference?
Sharief, Zeghal et al., 2026
Biased
Overconfident
Underconfident
How to validate the inference?
Sharief, Zeghal et al., 2026
.
Theorem:
Two distributions are equal if their probability measures are the same over all measurable sets.
6 pink samples
5 blue samples
✅
6 pink samples
5 blue samples
✅
How to validate the inference?
Sharief, Zeghal et al., 2026
.
Theorem:
Two distributions are equal if their probability measures are the same over all measurable sets.
6 pink samples
5 blue samples
✅
6 pink samples
5 blue samples
✅
6 pink samples
✅
6 pink samples
7 blue samples
✅
How to validate the inference?
Sharief, Zeghal et al., 2026
.
Theorem:
Two distributions are equal if their probability measures are the same over all measurable sets.
6 pink samples
5 blue samples
✅
6 pink samples
5 blue samples
✅
6 pink samples
✅
6 pink samples
7 blue samples
✅
✅
8 pink samples
7 blue samples
✅
How to validate the inference?
Sharief, Zeghal et al., 2026
Theorem:
Two distributions are equal if their probability measures are the same over all measurable sets.
6 pink samples
5 blue samples
✅
6 pink samples
5 blue samples
✅
6 pink samples
✅
6 pink samples
7 blue samples
✅
✅
8 pink samples
7 blue samples
✅
.
How to validate the inference?
Sharief, Zeghal et al., 2026
.
Bayesian approach: what is the probability that the true sample lies inside or outside the region given than n samples from the proposed one are inside?
Theorem:
Lemma:
How to validate the inference?
Sharief, Zeghal et al., 2026
Benefits
- Sample-based
- Can work with few samples
- Works in high dimension
- Does not rely on training a model
- Detect miscalibration even when other scores fail
- It is a scaler value


Which posterior is the best?
Ressources
https://simulation-based-inference.org/
by Kyle Cranmer and Jason Lo
Thank you for your attention!
SASTRO 2026
By Justine Zgh
SASTRO 2026
- 18