LtU-ILI: An All-in-One Framework for Implicit Inference in Astrophysics and Cosmology
Matthew Ho, Deaglan J. Bartlett, Nicolas Chartier, Carolina Cuesta-Lazaro, Simon Ding, Axel Lapel, Pablo Lemos, Christopher C. Lovell, T. Lucas Makinen, Chirag Modi, Viraj Pandya, Shivam Pandey, Lucia A. Perez, Benjamin Wandelt, Greg L. Bryan
TL;DR
LtU-ILI addresses the challenge of performing robust implicit likelihood inference in astronomy and cosmology by delivering a unified, extensible pipeline that supports multiple neural density estimators (NPE, NLE, NRE), diverse embedding architectures, and three-stage workflows (Data, Inference, Validation). The framework unifies existing SBI/ILI codes under a common interface, adds comprehensive validation metrics (including PIT and TARP), and demonstrates broad applicability through synthetic benchmarks and real science problems such as X-ray mass estimation, halo power spectra, and GW parameter inference. Its design enables rapid hyperparameter exploration, multi-round (sequential) inference, and the integration of graph- and image-based embeddings, making it a practical tool for both exploratory analysis and production-level inference. By providing public code and benchmarks, LtU-ILI aims to standardize and accelerate trustworthy ML-based inference across astronomical datasets and survey-era science.
Abstract
This paper presents the Learning the Universe Implicit Likelihood Inference (LtU-ILI) pipeline, a codebase for rapid, user-friendly, and cutting-edge machine learning (ML) inference in astrophysics and cosmology. The pipeline includes software for implementing various neural architectures, training schemata, priors, and density estimators in a manner easily adaptable to any research workflow. It includes comprehensive validation metrics to assess posterior estimate coverage, enhancing the reliability of inferred results. Additionally, the pipeline is easily parallelizable and is designed for efficient exploration of modeling hyperparameters. To demonstrate its capabilities, we present real applications across a range of astrophysics and cosmology problems, such as: estimating galaxy cluster masses from X-ray photometry; inferring cosmology from matter power spectra and halo point clouds; characterizing progenitors in gravitational wave signals; capturing physical dust parameters from galaxy colors and luminosities; and establishing properties of semi-analytic models of galaxy formation. We also include exhaustive benchmarking and comparisons of all implemented methods as well as discussions about the challenges and pitfalls of ML inference in astronomical sciences. All code and examples are made publicly available at https://github.com/maho3/ltu-ili.
