New code speeds up calculations of matter distribution
The bihalofit-JAX code provides fast and differentiable predictions for the nonlinear matter bispectrum.
A new open-source code named bihalofit-JAX has been developed. It provides predictions for the nonlinear matter bispectrum and related projected statistics. This code is based on the BiHalofit fitting formula.
The matter bispectrum is the three-point correlation function of the density field in Fourier space. It contains information that the power spectrum alone cannot provide. It is sensitive to non-Gaussian structures created by gravitational collapse.
Historically, evaluating these theoretical predictions was very expensive. Many researchers used emulators to speed up slow numerical codes. Emulators are fast surrogates trained on evaluations of the original codes. However, emulators can introduce new errors and are limited to specific training areas.
The bihalofit-JAX code uses improved numerical techniques to evaluate predictions directly. It uses a fixed-iteration Newton solve for the nonlinear scale. It also uses fixed quadrature grids instead of adaptive integration. These changes allow the code to be efficiently vectorized.
The code is built using JAX. This allows for just-in-time (JIT) compilation and GPU portability. It also provides automatic differentiation. This means the entire pipeline is fully differentiable.
The code computes triangles of the matter bispectrum in -- per cosmology. This is one to three orders of magnitude faster than other implementations. It can compute cosmologies in because it is efficiently vectorized.
For third-order aperture statistics, it computes one cosmology in . This is between and times faster than other public codes. The code agrees with the original BiHalofit code to better than on average.
The matter bispectrum depends on the magnitudes of three wavevectors forming a closed triangle in Fourier space. The BiHalofit formula includes a 1-halo term and a 3-halo term. The 1-halo term describes contributions from within a single halo. The 3-halo term describes correlations between three different halos.
Key facts
- bihalofit-JAX computes triangles of the matter bispectrum in -- per cosmology.
- The code is fully differentiable and uses JAX for JIT compilation.
- It is one to three orders of magnitude faster than previous implementations.
- The code agrees with the original BiHalofit code to better than on average.