Neural likelihood inference

Emulating likelihoods with neural networks

April 8, 2024 — April 8, 2024

feature construction
likelihood free
machine learning
time series
Figure 1

Incorporating various neural approximations to (functions of) the likelihood of an otherwise-intractable model.

Permutation-invariant neural estimators (Sainsbury-Dale, Zammit-Mangion, and Huser 2022, 2024) which leans on deep sets .

Connects closely to neural processes which target the posterior predictive, and simulation-based inferece which targets the case where we have a good but uncalibrated simulator.

A summary of some methods is in Cranmer, Brehmer, and Louppe (2020).

1 Implementations

1.1 sbi

See the Mackelab sbi page for several implementations:

Goal: Algorithmically identify mechanistic models which are consistent with data.

Each of the methods above needs three inputs: A candidate mechanistic model, prior knowledge or constraints on model parameters, and observational data (or summary statistics thereof).

The methods then proceed by

  1. sampling parameters from the prior followed by simulating synthetic data from these parameters,
  2. learning the (probabilistic) association between data (or data features) and underlying parameters, i.e. to learn statistical inference from simulated data. The way in which this association is learned differs between the above methods, but all use deep neural networks.
  3. This learned neural network is then applied to empirical data to derive the full space of parameters consistent with the data and the prior, i.e. the posterior distribution. High posterior probability is assigned to parameters which are consistent with both the data and the prior, low probability to inconsistent parameters. While SNPE directly learns the posterior distribution, SNLE and SNRE need an extra MCMC sampling step to construct a posterior.
  4. If needed, an initial estimate of the posterior can be used to adaptively generate additional informative simulations.

Code here: mackelab/sbi: Simulation-based inference in PyTorch

Compare to contrastive learning.

1.2 NeuralEstimators

2 References

Boelts, Lueckmann, Gao, et al. 2022. Flexible and Efficient Simulation-Based Inference for Models of Decision-Making.” Edited by Valentin Wyart, Timothy E Behrens, Luigi Acerbi, and Jean Daunizeau. eLife.
Cranmer, Brehmer, and Louppe. 2020. The Frontier of Simulation-Based Inference.” Proceedings of the National Academy of Sciences.
Deistler, Goncalves, and Macke. 2022. Truncated Proposals for Scalable and Hassle-Free Simulation-Based Inference.”
Delaunoy, Hermans, Rozet, et al. 2022. Towards Reliable Simulation-Based Inference with Balanced Neural Ratio Estimation.”
Durkan, Murray, and Papamakarios. 2020. On Contrastive Learning for Likelihood-Free Inference.” In Proceedings of the 37th International Conference on Machine Learning. ICML’20.
Durkan, Papamakarios, and Murray. 2018. Sequential Neural Methods for Likelihood-Free Inference.”
Glöckler, Deistler, and Macke. 2022. Variational Methods for Simulation-Based Inference.”
Greenberg, Nonnenmacher, and Macke. 2019. Automatic Posterior Transformation for Likelihood-Free Inference.” In Proceedings of the 36th International Conference on Machine Learning.
Hermans, Begy, and Louppe. 2020. Likelihood-Free MCMC with Amortized Approximate Ratio Estimators.” arXiv:1903.04057 [Cs, Stat].
Lueckmann, Bassetto, Karaletsos, et al. 2019. Likelihood-Free Inference with Emulator Networks.” In Symposium on Advances in Approximate Bayesian Inference.
Lueckmann, Boelts, Greenberg, et al. 2021. Benchmarking Simulation-Based Inference.” In AISTATS.
Lueckmann, Gonçalves, Bassetto, et al. 2017. Flexible Statistical Inference for Mechanistic Models of Neural Dynamics.” In Proceedings of the 31st International Conference on Neural Information Processing Systems. NIPS’17.
Miller, Cole, and Louppe. n.d. “Simulation-Efficient Marginal Posterior Estimation with SWYFT: Stop Wasting Your Precious Time.” In.
Miller, Weniger, and Forré. 2022. Contrastive Neural Ratio Estimation.” In.
Papamakarios. 2019. Neural Density Estimation and Likelihood-Free Inference.”
Papamakarios, and Murray. 2016. Fast ε-Free Inference of Simulation Models with Bayesian Conditional Density Estimation.” In Advances in Neural Information Processing Systems 29.
Papamakarios, Nalisnick, Rezende, et al. 2021. Normalizing Flows for Probabilistic Modeling and Inference.” Journal of Machine Learning Research.
Papamakarios, Sterratt, and Murray. 2019. Sequential Neural Likelihood: Fast Likelihood-Free Inference with Autoregressive Flows.” In Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics.
Sainsbury-Dale, Zammit-Mangion, and Huser. 2022. Fast Optimal Estimation with Intractable Models Using Permutation-Invariant Neural Networks.”
———. 2024. Likelihood-Free Parameter Estimation with Neural Bayes Estimators.” The American Statistician.
Stoye, Brehmer, Louppe, et al. 2018. Likelihood-Free Inference with an Improved Cross-Entropy Estimator.” arXiv:1808.00973 [Hep-Ph, Physics:physics, Stat].