Abstract
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 inference. 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, in these examples 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 ΛCDM. To perform these computations, we use an implementation of tmnre via the open-source code swyft.[swyft is available at https://github.com/undark-lab/swyft. Demonstration on cosmological simulators used in this paper is available at https://github.com/a-e-cole/swyft-CMB.]