Fast and accurate differentiable code of the galaxy power spectrum based on Eulerian and Lagrangian one-loop perturbation theories
Yosuke Kobayashi, Kazuyuki Akitsu
Key points
From the paper's conclusion- 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 \lesssim 1\, h\, \mathrm{Mpc}^{-1}$, compared with brute-force numerical integration.
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 \lesssim 1\, h\, \mathrm{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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Two-loop matter power spectrum from FFTLog and kite integralsarXiv · 2026
- SwiftCℓ : fast differentiable angular power spectra beyond LimberJournal of Cosmology and Astroparticle Physics · 2026
- Blast.jl: Differentiable Non-Limber Power Spectra for Joint Clustering, Shear, and CMB lensing AnalysesarXiv · 2026
- bihalofit-JAX: A Differentiable Code for the Nonlinear Matter Bispectrum and its Projected StatisticsarXiv · 2026
- The Redshift-Space Galaxy Power Spectrum at Two-Loop OrderarXiv · 2026
- PrimordialPy: A Python library for single-field inflation, primordial black holes, and scalar-induced gravitational wavesarXiv · 2026