Fast and accurate differentiable code of the galaxy power spectrum based on Eulerian and Lagrangian one-loop perturbation theories
astro-ph.CO
Submitted: 2026-10-06
Updated: 2026-10-06
Comments: 42 pages, 11 figures. To be submitted to Physical Review D. Code available at https://github.com/archaeo-pteryx/elf
Code: https://github.com/archaeo-pteryx/elf
License: http://creativecommons.org/licenses/by/4.0/
The gist: This paper presents a JAX-Python implementation of the galaxy power spectrum up to one-loop order in the effective field theory of large-scale structure, based on both the Eulerian and Lagrangian
Abstract
This paper presents a JAX-Python implementation of the galaxy power spectrum up to one-loop order in the effective field theory of large-scale structure, based on both the Eulerian and Lagrangian perturbation theories. The code uses JAX to enable automatic differentiation with respect to parameters such as cosmology, galaxy bias, or counterterm coefficients. This facilitates applications such as parameter inference using the gradient of the posterior, e.g., Hamiltonian Monte Carlo sampling. The code can compute both the EPT and LPT power spectra in a few milliseconds on a GPU, after just-in-time compilation. We also identify the various sources of numerical errors associated with discretization, and design the numerical implementation to minimize them, achieving relative errors of order 0.01% at scales k 1, h, Mpc-1, compared with brute-force numerical integration. Notably, this is the first auto-differentiable implementation of the one-loop galaxy power spectrum based on LPT. The natural resummation of the long-wavelength displacements in LPT further makes the code well suited for applications involving features in the power spectrum beyond the standard BAO feature, including primordial features. Our code, elf, is publicly available.
Sources
- A Conceptual Introduction to Hamiltonian Monte Carlo
- Composable Effects for Flexible and Accelerated Probabilistic Programming in NumPyro
- Variational Inference: A Review for Statisticians
Related papers
- Angular clustering and bias of photometric quasars in the Kilo-Degree Survey Data Release 4
- A Novel kinetic Sunyaev-Zel'dovich Estimator for Electron-Electron Correlations
- Magnetic fields at the dawn of structure formation I. The CARLA J1510+5958 proto-cluster
- Dark Energy Survey Year 6 Results: Weak Lensing and Galaxy Clustering Cosmological Analysis Framework
- Exploring the Impact of Systematic Bias in Type Ia Supernova Cosmology Across Diverse Dark Energy Parametrizations
- Non-Gaussian Galaxy Stochasticity and the Noise-Field Formulation