Draft:Simulation-based Inference
| Review waiting, please be patient.
This may take 4 weeks or more, since drafts are reviewed in no specific order. There are 1,688 pending submissions waiting for review.
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Reviewer tools
|
| Part of a series on |
| Bayesian statistics |
|---|
| Posterior = Likelihood × Prior ÷ Evidence |
| Background |
| Model building |
| Posterior approximation |
| Estimators |
| Evidence approximation |
| Model evaluation |
Simulation-based inference (SBI), also known as likelihood-free inference, is a family of statistical methods for performing Bayesian inference when a model of a system can be simulated but its likelihood function is unavailable, intractable, or too computationally expensive to evaluate directly.[1] SBI addresses a central question in computational science: given a simulation model of a target system, what can be learned about unknown parameters from observed data? The same question arises in multiple disciplines, including Bayesian statistics, inverse problems, uncertainty quantification, and machine learning.[2][3][4][5]
SBI methods use simulations to approximate posterior distributions over unknown parameters conditioned on observations. SBI encompasses methods such as approximate Bayesian computation (ABC), and more recent approaches based on neural density estimation and modern generative modeling.[6]
Overview
[edit]In Bayesian inference, the objective is to infer unknown parameters from an observation using Bayes' theorem: where is a prior distribution and is the likelihood.
In many scientific models, the likelihood cannot be evaluated even though it is possible to generate synthetic observations from parameters : SBI procedures perform inference by using simulated pairs as a computational surrogate for likelihood evaluations.[1]
Problem formulation
[edit]A standard SBI setup assumes an observation , which may be high-dimensional and of arbitrary structure (e.g., vectors, sets, graphs, sequences, or mixed discrete–continuous data). The model defines a joint distribution where specifies plausible parameters and describes how data are generated.
In likelihood-based models, the likelihood can be evaluated for any pair . In simulation-based models, the data model is available only implicitly through a simulator that can generate synthetic observations but cannot compute likelihood values. SBI methods aim to infer parameters while providing calibrated uncertainty quantification, typically through an approximation of the posterior distribution .[1]
Many SBI methods can be described in terms of three essential components:[7]
- A simulator that generates synthetic observations given latent parameters .
- A prior distribution that defines the domain of plausible parameters.
- An approximator that uses simulations to infer from observations , or to approximate posterior or likelihood-related quantities.
In modern SBI, the approximator is often a machine learning model (e.g., a neural network) trained on simulated parameter–observation pairs.
Methods
[edit]Simulation-based inference includes both classical likelihood-free algorithms and machine learning-based approaches.
Approximate Bayesian computation
[edit]Approximate Bayesian computation (ABC) is a classical family of likelihood-free methods that approximates the posterior by comparing observed and simulated data, often through summary statistics.[6] In its rejection-sampling form, ABC samples from the prior, simulates from the model, and accepts if the simulated data are sufficiently close to the observed data under a discrepancy threshold: where denotes summary statistics, is a distance function, and is a tolerance parameter. Variants include ABC-MCMC and ABC-SMC.[6]
Neural simulation-based inference
[edit]Many modern SBI approaches learn flexible approximations using neural networks trained on simulated pairs . A widely used perspective treats simulations as training data for conditional generative modeling, enabling inference in high-dimensional settings.[1][7][8][9]
Common categories include:
- Neural posterior estimation (NPE), which trains a conditional density estimator to approximate the posterior directly. The trained model can be sampled immediately to obtain posterior samples without additional simulation or sampling algorithms. The approximation quality depends on coverage of the observation space during training, which can be challenging when observations are high-dimensional.
- Neural likelihood estimation (NLE), which trains a model to approximate the likelihood , enabling the use of standard Bayesian sampling algorithms such as Markov chain Monte Carlo to draw posterior samples.[8] NLE provides flexibility to change the prior distribution after training without retraining the network, since the learned likelihood approximation remains valid. However, NLE requires running MCMC at inference time.
- Neural ratio estimation (NRE), which estimates the likelihood-to-evidence ratio to support posterior inference without explicit likelihood evaluation.[1] NRE methods train classifiers to distinguish between samples from the joint distribution and samples from marginal distributions. The estimated ratio satisfies , enabling posterior sampling via MCMC or rejection sampling. NRE avoids the need to normalize density estimators and can be more robust to high-dimensional observations, but requires sampling algorithms at inference time.
First neural density estimators used in SBI included autoregressive models and normalizing flow-based architectures.[10][8] Recent advances use the flexibility of diffusion models which enables post-hoc adaptation of the approximator to a specific inference scenario such as changing priors.[7]
Amortized Bayesian inference
[edit]A common feature of neural SBI is amortized Bayesian inference (ABI), in which an inference model is trained once on a set of simulations and then reused to perform inference for many future observations from the same simulator.[1][11] ABI shifts computation from repeated per-dataset inference to an up-front training cost. In contrast, sequential inference methods adapt the simulation strategy iteratively based on intermediate posterior estimates. Sequential approaches generate simulations from progressively refined proposal distributions centered on regions of high posterior probability, which can improve sample efficiency when inference is needed for a single observation.[8][9] Sequential methods trade the reusability of amortized methods for reduced simulation budgets and tighter posterior approximations in focused inference tasks.
Diagnostics
[edit]Common diagnostics for simulation-based inference include posterior predictive checks and simulation-based calibration (SBC), which assess whether inferred posteriors are consistent with the assumed data-generating process.[1][12] The core idea of SBC is to repeatedly simulate parameters and data from the generative model, run the inference procedure, and compute the rank of the ground-truth parameter within samples from the inferred posterior. If the inference procedure is well calibrated, these ranks follow a uniform distribution.[12] SBC is therefore a necessary condition for calibration, but it does not by itself guarantee that posterior approximations are accurate for all observations or all aspects of the distribution. Posterior predictive checks instead focus on whether data generated from the fitted model resemble the observed data under relevant test statistics or summary features, and can reveal model misspecification even when posterior calibration appears satisfactory.
Classifier two-sample tests (C2ST) are discriminative goodness-of-fit procedures which compare two distributions by training a classifier to distinguish samples drawn from each of them.[13] In simulation-based inference, classifier-based diagnostics can be used to assess the quality of posterior approximations, by testing whether samples from the inferred posterior are statistically indistinguishable from samples generated by the reference procedure under the assumed model.[14] Local classifier two-sample tests (L-C2ST) specialize this idea to provide observation-specific diagnostics for posterior approximations for a fixed observation.[15] Unlike global calibration tests such as SBC, L-C2ST can reveal localized posterior failures, for example overly narrow uncertainty, shifted modes, or systematic mismatches concentrated in particular regions of the observation space.[15]
Applications
[edit]Simulation-based inference is used in scientific domains where mechanistic simulators exist but analytic likelihoods are difficult to obtain, including:
- computational biology and population genetics[16]
- neuroscience and cognitive science[1]
- astronomy and cosmology[1]
- particle physics[1]
- epidemiology[6]
The computational cost of SBI methods is dominated by simulator evaluations rather than inference algorithm overhead. Different approaches require vastly different simulation budgets depending on their strategy.[9]
Advantages
[edit]Common advantages of SBI include:
- Bayesian uncertainty quantification via posterior distributions
- applicability to complex mechanistic simulators without tractable likelihoods[9]
- flexibility for high-dimensional and structured observations[7]
- fast inference after training in amortized settings[11]
Limitations
[edit]Limitations of SBI methods include:
- potentially high computational cost due to simulation requirements
- sensitivity to simulator mismatch (model misspecification)[17]
- extrapolation risks when simulations do not cover the regimes relevant to real observations[18]
Software
[edit]Several software packages implement simulation-based inference (SBI), particularly neural and amortized methods. General-purpose toolkits typically provide implementations of neural posterior estimation, neural likelihood estimation, and neural ratio estimation, and are designed to integrate with simulators to generate training data for inference networks.
- BayesFlow is a Python library, supporting PyTorch, TensorFlow and Jax, for state-of-the-art amortized Bayesian inference with neural networks, focusing on simulation-based workflows in which an inference network is trained on simulated parameter–observation pairs and then reused for fast posterior inference.[19][20]
- sbi is a Python (PyTorch) toolbox for simulation-based Bayesian inference, providing state-of-the-art neural SBI algorithms and workflows for posterior inference using simulation-trained estimators.[21][22]
- sbijax implements simulation-based inference methods in the JAX ecosystem.[23]
For classical approximate Bayesian computation tools, see Approximate Bayesian computation#Software.
See also
[edit]- Approximate Bayesian computation
- Bayesian inference
- Inverse problem
- Uncertainty quantification
- Markov chain Monte Carlo
References
[edit]- ^ a b c d e f g h i j Cranmer, Kyle; Brehmer, Johann; Louppe, Gilles (2020). "The frontier of simulation-based inference". Proceedings of the National Academy of Sciences. 117 (48): 30055–30062. arXiv:1911.01429. Bibcode:2020PNAS..11730055C. doi:10.1073/pnas.1912789117. PMC 7720103. PMID 32471948.
- ^ Diggle, Peter J.; Gratton, Richard J. (1984). "Monte Carlo methods of inference for implicit statistical models". Journal of the Royal Statistical Society Series B: Statistical Methodology. 46 (2): 193–212. doi:10.1111/j.2517-6161.1984.tb01290.x.
- ^ Tarantola, Albert; Valette, Bernard (1982). "Inverse problems= quest for information". Journal of Geophysics. 50 (1): 159–170.
- ^ Klir, George J. (2006). "Uncertainty and information: foundations of generalized information theory". Kybernetes. 35 (7/8): 1297–1299. doi:10.1108/03684920610675283.
- ^ Kingma, Diederik P.; Rezende, Danilo J.; Mohamed, Shakir; Welling, Max (2014). "Semi-supervised learning with deep generative models". Proceedings of the 28th International Conference on Neural Information Processing Systems. NIPS'14. Montreal, Canada: MIT Press. pp. 3581–3589.
- ^ a b c d Sisson, Scott A.; Fan, Yanan (2011). "Likelihood-free MCMC". Handbook of Markov Chain Monte Carlo. Chapman & Hall/CRC. pp. 313–335. doi:10.1201/b10905-13. ISBN 978-0-429-13850-8.
- ^ a b c d Arruda, Jonas; Bracher, Niels; Köthe, Ullrich; Hasenauer, Jan; Radev, Stefan T. (2025). "Diffusion Models in Simulation-Based Inference: A Tutorial Review". arXiv:2512.20685 [stat.ML].
- ^ a b c d Papamakarios, George; Sterratt, David; Murray, Iain (2019). "Sequential neural likelihood: Fast likelihood-free inference with autoregressive flows". The 22nd International Conference on Artificial Intelligence and Statistics. PMLR. pp. 837–848.
- ^ a b c d Lueckmann, Jan-Matthis; Boelts, Jan; Greenberg, David S.; Gonçalves, Pedro J.; Macke, Jakob H. (2021). "Benchmarking Simulation-Based Inference". Proceedings of Machine Learning Research. arXiv:2101.04653.
- ^ Rezende, Danilo Jimenez; Mohamed, Shakir (2015). "Variational Inference with Normalizing Flows". Proceedings of the 32nd International Conference on Machine Learning. arXiv:1505.05770.
- ^ a b Radev, Stefan T.; Mertens, Ulf K.; Voss, Andreas; Ardizzone, Lynton; Köthe, Ullrich (2020). "BayesFlow: Learning complex stochastic models with invertible neural networks". IEEE Transactions on Neural Networks and Learning Systems. 33 (4). IEEE: 1452–1466. doi:10.1109/TNNLS.2020.3042395. PMID 33338021.
- ^ a b Talts, Sean; Betancourt, Michael; Simpson, Daniel; Vehtari, Aki; Gelman, Andrew (2018). "Validating Bayesian Inference Algorithms with Simulation-Based Calibration". arXiv:1804.06788 [stat.ME].
- ^ Lopez-Paz, David; Oquab, Maxime (2017). "Revisiting classifier two-sample tests". International Conference on Learning Representations.
- ^ Yao, Yuling; Domke, Justin (2023). "Discriminative calibration: Check Bayesian computation from simulations and flexible classifier". Advances in Neural Information Processing Systems. 36: 36106–36131.
- ^ a b Linhart, Julia; Gramfort, Alexandre; Rodrigues, Pedro (2023). "L-C2ST: Local diagnostics for posterior approximations in simulation-based inference". Advances in Neural Information Processing Systems. 36: 56384–56410.
- ^ Beaumont, Mark A.; Zhang, Wenqing; Balding, David J. (2002). "Approximate Bayesian computation in population genetics". Genetics. 162 (4): 2025–2035. doi:10.1093/genetics/162.4.2025. PMC 1462356. PMID 12524368.
- ^ Schmitt, Marvin; Bürkner, Paul-Christian; Köthe, Ullrich; Radev, Stefan T. (2024). "Detecting Model Misspecification in Amortized Bayesian Inference with Neural Networks". Pattern Recognition. Cham: Springer Nature Switzerland. pp. 541–557. ISBN 978-3-031-54605-1.
- ^ Elsemüller, Lasse; Pratz, Valentin; von Krause, Mischa; Voss, Andreas; Bürkner, Paul-Christian; Radev, Stefan T. (2025). "Does Unsupervised Domain Adaptation Improve the Robustness of Amortized Bayesian Inference? A Systematic Evaluation". Transactions on Machine Learning Research. ISSN 2835-8856.
- ^ "BayesFlow". GitHub. Retrieved 2026-01-20.
- ^ Radev, Stefan T.; Schmitt, Marvin; Schumacher, Lukas; Elsemüller, Lasse; Pratz, Valentin; Schälte, Yannik; Köthe, Ullrich; Bürkner, Paul-Christian (2023). "BayesFlow: Amortized Bayesian workflows with neural networks". Journal of Open Source Software. 8 (89): 5702. arXiv:2306.16015. Bibcode:2023JOSS....8.5702R. doi:10.21105/joss.05702.
- ^ "sbi: Simulation-based inference toolbox". GitHub. Retrieved 2026-01-20.
- ^ Boelts, Jan; Deistler, Michael; Gloeckler, Manuel; Tejero-Cantero, Álvaro; Lueckmann, Jan-Matthis; Moss, Guy; Steinbach, Peter; Moreau, Thomas; Muratore, Fabio; Linhart, Julia; Durkan, Conor; Vetter, Julius; Miller, Benjamin Kurt; Herold, Maternus; Ziaeemehr, Abolfazl; Pals, Matthijs; Gruner, Theo; Bischoff, Sebastian; Krouglova, Nastya; Gao, Richard; Lappalainen, Janne K.; Mucsányi, Bálint; Pei, Felix; Schulz, Auguste; Stefanidi, Zinovia; Rodrigues, Pedro; Schröder, Cornelius; Zaid, Faried Abu; Beck, Jonas; Kapoor, Jaivardhan; Greenberg, David S.; Gonçalves, Pedro J.; Macke, Jakob H. (2025). "sbi reloaded: a toolkit for simulation-based inference workflows". Journal of Open Source Software. 10 (108). The Open Journal: 7754. arXiv:2411.17337. Bibcode:2025JOSS...10.7754B. doi:10.21105/joss.07754.
- ^ Dirmeier, Simon; Ulzega, Simone; Mira, Antonietta; Albert, Carlo (2024). "Simulation-based inference with the Python Package sbijax". arXiv:2409.19435 [cs.LG].
