A differentiable cosmology library built with JAX for automatic differentiation of cosmological calculations.
jax-cosmo is a differentiable cosmology library built with JAX that provides implementations of cosmological functions like angular power spectra and likelihoods. It solves the problem of efficiently computing gradients and Hessians for cosmological parameter inference, enabling advanced statistical analyses without finite differences.
Cosmologists, astrophysicists, and researchers working on parameter estimation, Fisher matrix calculations, and likelihood analysis in large-scale structure or CMB studies.
Developers choose jax-cosmo because it offers exact automatic differentiation of cosmological calculations, GPU acceleration through JAX, and a clean, NumPy-compatible API that simplifies integration into existing workflows.
A differentiable cosmology library in JAX
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides automatic differentiation for gradients and Hessians of cosmological likelihoods without finite differences, enabling precise Fisher matrix computations as shown in the TL;DR example.
Leverages JAX's XLA backend for seamless GPU/TPU support, speeding up large-scale cosmological simulations and analyses with a NumPy-like API.
Emphasizes clarity with documentation living next to implementation, making it easier to debug and extend, as stated in the philosophy section.
Pure Python with few dependencies, avoiding compilation hurdles, which simplifies setup compared to libraries requiring complex builds.
Focuses on key cosmological functions rather than a full-featured suite, so users may need to implement additional probes or models themselves.
Tightly coupled to JAX, which can introduce instability from JAX's rapid changes and may not integrate smoothly with non-JAX tools like TensorFlow or PyTorch.
As a community effort, feature development and support might be slower or less consistent compared to institutional projects, relying on contributor availability.