Fast and accurate differentiable code of the galaxy power spectrum based on Eulerian and Lagrangian one-loop perturbation theories
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.
Related
- Convergence of Roberts flow dynamos in Eulerian and Lagrangian codes
- Towards robust simulations of the galactic dynamo: a cross-code comparison between Eulerian and Lagrangian schemes
- An Arbitrary-Lagrangian-Eulerian solver for relativistic detonation waves
- pbhalo: computing primordial black hole and minihalo populations from a single primordial perturbation spectrum
- A differentiable and optimizable 3D model for interpretation of observed spectral data cubes
BibTeX
@misc{kobayashi2026fast,
title = {{Fast and accurate differentiable code of the galaxy power spectrum based on Eulerian and Lagrangian one-loop perturbation theories}},
author = {Yosuke Kobayashi and Kazuyuki Akitsu},
howpublished = {arXiv},
year = {2026},
month = oct,
doi = {10.48550/arxiv.2610.08023},
eprint = {2610.08023},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2610.08023},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - Fast and accurate differentiable code of the galaxy power spectrum based on Eulerian and Lagrangian one-loop perturbation theories
AU - Yosuke Kobayashi
AU - Kazuyuki Akitsu
PY - 2026
DA - 2026/10/06
PB - arXiv
DO - 10.48550/arxiv.2610.08023
UR - https://arxiv.org/abs/2610.08023
AB - 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.
ER -