bihalofit-JAX: A Differentiable Code for the Nonlinear Matter Bispectrum and its Projected Statistics
astro-ph.IM, astro-ph.CO
Submitted: 2026-11-13
Updated: 2026-11-13
Comments: 20 pages, 12 figures, submitted to the Open Journal of Astrophysics. bihalofit-JAX is available at https://github.com/AlexRoskill/bihalofit-jax
License: http://creativecommons.org/licenses/by/4.0/
The gist: Theoretical predictions for the nonlinear matter bispectrum and related projected statistics have been historically very expensive to evaluate…
Terminology
Abstract
Theoretical predictions for the nonlinear matter bispectrum and related projected statistics have been historically very expensive to evaluate, leading many analyses to rely on emulators to speed up slow numerical codes. We show in this paper that this need not be the case: improved numerical techniques can be leveraged to directly evaluate predictions for the nonlinear matter bispectrum and projected statistics at speeds preferable for inference. We present bihalofit-JAX, an open-source, fully differentiable code for the nonlinear matter bispectrum based on the BiHalofit fitting formula, which includes numerous related projected statistics such as angular bispectra, skew spectra and aperture statistics. It computes 10000 triangles of the matter bispectrum in about1 -- 2 per cosmology, one to three orders of magnitude faster than other implementations. It agrees numerically with the original BiHalofit code to better than 0.02% on average over the cosmologies the formula was calibrated on, where the formula itself is accurate to about20% against simulations. It is also efficiently vectorised such that one can compute e.g. 500 cosmologies in about 2. This speed-up grows even more in the case of the third-order aperture statistics, which we compute in about 6 for one cosmology, between 3 times10 cubed and 2.4 times10 4 times faster than other publicly available codes. The pipeline is fully differentiable, and we demonstrate its performance in a simple inference problem, comparing the No-U-Turn Sampler (NUTS) to gradient-free inference with the affine-invariant ensemble sampler (emcee).
Related papers
- On-sky demonstration of a vector Zernike wavefront sensor in a cascaded adaptive optics system
- Euclid Data Release 1 (DR1): Calibration strategy and observations
- The General Antiparticle Spectrometer (GAPS) Antarctic Balloon Payload
- Detection and excision of radio-frequency interference in radio arrays
- Unified matched-filter and excess-power pipeline for gravitational-wave detector characterization
- Ushering in sub-arcsecond angular resolution observatories in the far-infrared: The case for a double-Fourier interferometer