NeuralEstimators

Neural Bayes estimators are neural networks that transform data into point summaries of the posterior distribution. They are likelihood free and, once constructed, substantially faster than classical methods. Uncertainty quantification with neural Bayes estimators is also straightforward through the bootstrap distribution, which is essentially available "for free" with a neural estimator, or by training a neural Bayes estimator to approximate a set of marginal posterior quantiles. A related class of methods uses neural networks to approximate the likelihood function, the likelihood-to-evidence ratio, and the full posterior distribution.

The package NeuralEstimators facilitates the development of neural Bayes estimators and related neural inferential methods in a user-friendly manner. It caters for arbitrary models by having the user implicitly define their model via simulated data. This makes development particularly straightforward for models with existing implementations (possibly in other programming languages, e.g., R or python). A convenient interface for R users is available here.

Getting started

Install NeuralEstimators using the following command inside Julia:

using Pkg; Pkg.add(url = "https://github.com/msainsburydale/NeuralEstimators.jl")

Once familiar with the details of the Framework, see the Examples.

Supporting and citing

This software was developed as part of academic research. If you would like to support it, please star the repository. If you use it in your research or other activities, please also use the following citation.

@article{,
	author = {Sainsbury-Dale, Matthew and Zammit-Mangion, Andrew and Huser, Raphaël},
	title = {Likelihood-Free Parameter Estimation with Neural {B}ayes Estimators},
	journal = {The American Statistician},
	year = {2024},
	volume = {78},
	pages = {1--14},
	doi = {10.1080/00031305.2023.2249522},
	url = {https://doi.org/10.1080/00031305.2023.2249522}
}

Papers using NeuralEstimators

  • Likelihood-free parameter estimation with neural Bayes estimators [paper] [code]

  • Neural Bayes estimators for censored inference with peaks-over-threshold models [paper]

  • Neural Bayes estimators for irregular spatial data using graph neural networks [paper][code]

  • Modern extreme value statistics for Utopian extremes [paper]

  • Neural Methods for Amortised Inference [paper][code]

Several other software packages have been developed to facilitate neural likelihood-free inference. These include:

  1. BayesFlow (TensorFlow)
  2. LAMPE (PyTorch)
  3. sbi (PyTorch)
  4. swyft (PyTorch)

A summary of the functionality in these packages is given in Zammit-Mangion et al. (2024, Section 6.1). Note that this list of related packages was created in July 2024; if you have software to add to this list, please contact the package maintainer.