# Fast and Credible Likelihood-Free Cosmology with Truncated Marginal Neural Ratio Estimation

arXiv: https://arxiv.org/abs/2111.08030 · HTML: https://mlsanity.com/paper/2111.08030/

## Key facts

- Cited by 13 papers in the map (data through 14 Oct 2026).
- Builds on 23 of its 118 references that are in the map.
- First posted on arXiv 15 Nov 2021.

## Builds on (most cited first, 23 of 23)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Normalizing Flows for Probabilistic Modeling and Inference](https://mlsanity.com/paper/1912.02762/) (2019)
- [Masked Autoregressive Flow for Density Estimation](https://mlsanity.com/paper/1705.07057/) (2017)
- [The frontier of simulation-based inference](https://mlsanity.com/paper/1911.01429/) (2019)
- [Sequential Neural Likelihood: Fast Likelihood-free Inference with Autoregressive Flows](https://mlsanity.com/paper/1805.07226/) (2018)
- [Automatic Posterior Transformation for Likelihood-Free Inference](https://mlsanity.com/paper/1905.07488/) (2019)
- [Flexible statistical inference for mechanistic models of neural dynamics](https://mlsanity.com/paper/1711.01861/) (2017)
- [Benchmarking Simulation-Based Inference](https://mlsanity.com/paper/2101.04653/) (2021)
- [On Contrastive Learning for Likelihood-free Inference](https://mlsanity.com/paper/2002.03712/) (2020)
- [Approximating Likelihood Ratios with Calibrated Discriminative Classifiers](https://mlsanity.com/paper/1506.02169/) (2015)
- [Real-time gravitational-wave science with neural posterior estimation](https://mlsanity.com/paper/2106.12594/) (2021)
- [Fast ε-free Inference of Simulation Models with Bayesian Conditional Density Estimation](https://mlsanity.com/paper/1605.06376/) (2016)
- [Learning to Predict the Cosmological Structure Formation](https://mlsanity.com/paper/1811.06533/) (2018)
- [Truncated Marginal Neural Ratio Estimation](https://mlsanity.com/paper/2107.01214/) (2021)
- [Solving high-dimensional parameter inference: marginal posterior densities & Moment Networks](https://mlsanity.com/paper/2011.05991/) (2020)
- [Lightning-Fast Gravitational Wave Parameter Inference through Neural Amortization](https://mlsanity.com/paper/2010.12931/) (2020)
- [Dynamic nested sampling: an improved algorithm for parameter estimation and evidence calculation](https://mlsanity.com/paper/1704.03459/) (2017)
- [Multifield Cosmology with Artificial Intelligence](https://mlsanity.com/paper/2109.09747/) (2021)
- [Simulation-efficient marginal posterior estimation with swyft: stop wasting your precious time](https://mlsanity.com/paper/2011.13951/) (2020)
- [Fast and Accurate Non-Linear Predictions of Universes with Deep Learning](https://mlsanity.com/paper/2012.00240/) (2020)
- [Robust marginalization of baryonic effects for cosmological inference at the field level](https://mlsanity.com/paper/2109.10360/) (2021)
- [Arbitrary Marginal Neural Ratio Estimation for Simulation-based Inference](https://mlsanity.com/paper/2110.00449/) (2021)
- [The Convergence of Markov chain Monte Carlo Methods: From the Metropolis method to Hamiltonian Monte Carlo](https://mlsanity.com/paper/1706.01520/) (2017)

## Built on by (most cited first, 13 of 13)

- [Neural Methods for Amortized Inference](https://mlsanity.com/paper/2404.12484/) (2024)
- [GATSBI: Generative Adversarial Training for Simulation-Based Inference](https://mlsanity.com/paper/2203.06481/) (2022)
- [Robust Simulation-Based Inference in Cosmology with Bayesian Neural Networks](https://mlsanity.com/paper/2207.08435/) (2022)
- [Robust Field-level Likelihood-free Inference with Galaxies](https://mlsanity.com/paper/2302.14101/) (2023)
- [Contrastive Neural Ratio Estimation for Simulation-based Inference](https://mlsanity.com/paper/2210.06170/) (2022)
- [The CAMELS project: public data release](https://mlsanity.com/paper/2201.01300/) (2022)
- [Simulation-based Inference with the Generalized Kullback-Leibler Divergence](https://mlsanity.com/paper/2310.01808/) (2023)
- [SIDDA: SInkhorn Dynamic Domain Adaptation for Image Classification with Equivariant Neural Networks](https://mlsanity.com/paper/2501.14048/) (2025)
- [How many simulations do we need for simulation-based inference in cosmology?](https://mlsanity.com/paper/2503.13755/) (2025)
- [Simulation-based inference with scattering representations: scattering is all you need](https://mlsanity.com/paper/2410.11883/) (2024)
- [Simulation-Efficient Cosmological Inference with Multi-Fidelity SBI](https://mlsanity.com/paper/2507.00514/) (2025)
- [Simulating, Fast and Slow: Learning Policies for Black-Box Optimization](https://mlsanity.com/paper/2406.04261/) (2024)
- [A comparison of Bayesian sampling algorithms for high-dimensional particle physics and cosmology applications](https://mlsanity.com/paper/2409.18464/) (2024)

## Abstract (arXiv)

Sampling-based inference techniques are central to modern cosmological data analysis; these methods, however, scale poorly with dimensionality and typically require approximate or intractable likelihoods. In this paper we describe how Truncated Marginal Neural Ratio Estimation (TMNRE) (a new approach in so-called simulation-based inference) naturally evades these issues, improving the (i) efficiency, (ii) scalability, and (iii) trustworthiness of the inferred posteriors. Using measurements of the Cosmic Microwave Background (CMB), we show that TMNRE can achieve converged posteriors using orders of magnitude fewer simulator calls than conventional Markov Chain Monte Carlo (MCMC) methods. Remarkably, the required number of samples is effectively independent of the number of nuisance parameters. In addition, a property called local amortization allows the performance of rigorous statistical consistency checks that are not accessible to sampling-based methods. TMNRE promises to become a powerful tool for cosmological data analysis, particularly in the context of extended cosmologies, where the timescale required for conventional sampling-based inference methods to converge can greatly exceed that of simple cosmological models such as LambdaCDM. To perform these computations, we use an implementation of TMNRE via the open-source code textttswyft.
