CosmoPower-JAX: high-dimensional Bayesian inference with differentiable cosmological emulators

D. Piras, A. Spurio Mancini
5/10/2023
astro-ph.COastro-ph.IMcs.LG

No official code found. Best implementation: dpiras/cosmopower-jax (50 stars, GPL-3.0, JAX, last commit 2025-11-27).

Abstract

We present CosmoPower-JAX, a JAX-based implementation of the CosmoPower framework, which accelerates cosmological inference by building neural emulators of cosmological power spectra. We show how, using the automatic differentiation, batch evaluation and just-in-time compilation features of JAX, and running the inference pipeline on graphics processing units (GPUs), parameter estimation can be accelerated by orders of magnitude with advanced gradient-based sampling techniques. These can be used to efficiently explore high-dimensional parameter spaces, such as those needed for the analysis of next-generation cosmological surveys. We showcase the accuracy and computational efficiency of CosmoPower-JAX on two simulated Stage IV configurations. We first consider a single survey performing a cosmic shear analysis totalling 37 model parameters. We validate the contours derived with CosmoPower-JAX and a Hamiltonian Monte Carlo sampler against those derived with a nested sampler and without emulators, obtaining a speed-up factor of $\mathcal{O}(10^3)$. We then consider a combination of three Stage IV surveys, each performing a joint cosmic shear and galaxy clustering (3x2pt) analysis, for a total of 157 model parameters. Even with such a high-dimensional parameter space, CosmoPower-JAX provides converged posterior contours in 3 days, as opposed to the estimated 6 years required by standard methods. CosmoPower-JAX is fully written in Python, and we make it publicly available to help the cosmological community meet the accuracy requirements set by next-generation surveys.

View on arXivView PDF

Code Implementations(1)

JAXGPL-3.0

Differentiable cosmological emulators: the JAX version of CosmoPower

505Python, Jupyter NotebookApr 22, 202310 months agoGPL-3.0
bayesian-inferencecosmologydeep-learningemulatorsjax+1 more

Similar Papers

Cite this paper

@article{piras2023cosmopowerjax,
  title  = {CosmoPower-JAX: high-dimensional Bayesian inference with differentiable cosmological emulators},
  author = {D. Piras and A. Spurio Mancini},
  year   = {2023},
  eprint = {2305.06347},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.06347v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.06347.svg)](https://codeofpaper.com/paper/2305.06347)

Discussion