GRAVITAX: testing gravity with a differentiable Boltzmann code

arXiv:2612.06208 · astro-ph.CO, astro-ph.IM · Submitted 2026-12-03 · Read on arXiv

astro-ph.CO, astro-ph.IM

Submitted: 2026-12-03

Updated: 2026-12-03

Comments: 27 pages, 10 figures. GRAVITAX available at https://github.com/ECLIPSE-AI4Science/gravitax

License: http://creativecommons.org/licenses/by/4.0/

The gist: Departures from general relativity on cosmological scales can be described by two functions of time and scale, μ and Σ, which modify the Poisson and lensing equations.

Abstract

Departures from general relativity on cosmological scales can be described by two functions of time and scale, μ and Σ, which modify the Poisson and lensing equations. The most general tests let both vary in bins of redshift and scale, but every bin adds a parameter to the Einstein-Boltzmann equations, and sampling costs have limited such analyses to a few bins. We show that Hamiltonian Monte Carlo (HMC) keeps this cost affordable when a differentiable code solves the equations at every step on GPUs. We therefore developed GRAVITAX, a new Einstein-Boltzmann code in JAX that computes the lensed cosmic microwave background (CMB) and lensing-potential spectra, and linear and nonlinear matter power spectra, with their exact derivatives. To our knowledge, these are the first such HMC analyses of Stage IV likelihoods. In Λ CDM, with 158 parameters for a simulated Simons Observatory-like CMB experiment and three Stage IV surveys, GRAVITAX reproduces the posterior of CAMB and Cobaya, with means within 0.07 standard deviations and widths within 5 per cent, and one GPU-hour does the work of about 270 CPU core-hours per effective sample. With μ and Σ free in four bins of redshift and four of scale, it reproduces the 90-parameter posterior of MGCAMB, with one GPU-hour doing the work of about 2100 CPU core-hours, and recovers an injected departure from general relativity. Emulators of binned models must be retrained for every choice of bins; GRAVITAX needs none, and it can also help to develop emulators for such models. GRAVITAX is publicly available at https://github.com/ECLIPSE-AI4Science/gravitax

Related papers