JAXNS: a high-performance nested sampling package based on JAX

Joshua G. Albert
12/30/2020
astro-ph.IM
bayesian

Official code: Joshuaalbert/jaxns (263 stars, Python, Apache-2.0, JAX, last commit 2026-10-30).

Abstract

Since its debut by John Skilling in 2004, nested sampling has proven a valuable tool to the scientist, providing hypothesis evidence calculations and parameter inference for complicated posterior distributions, particularly in the field of astronomy. Due to its computational complexity and long-running nature, in the past, nested sampling has been reserved for offline-type Bayesian inference, leaving tools such as variational inference and MCMC for online-type, time-constrained, Bayesian computations.

Show full abstract

These tools do not easily handle complicated multi-modal posteriors, discrete random variables, and posteriors lacking gradients, nor do they enable practical calculations of the Bayesian evidence. An opening thus remains for a high-performance out-of-the-box nested sampling package that can close the gap in computational time, and let nested sampling become common place in the data science toolbox. We present JAX-based nested sampling (JAXNS), a high-performance nested sampling package written in XLA-primitives using JAX, and show that it is several orders of magnitude faster than the currently available nested sampling implementations of PolyChord, MultiNEST, and dynesty, while maintaining the same accuracy of evidence calculation. The JAXNS package is publically available at \url{https://github.com/joshuaalbert/jaxns}.

View on arXivView PDF

Code Implementations(1)

Joshuaalbert/jaxnsOfficial100%
JAXApache-2.0

Probabilistic Programming and Nested sampling in JAX

26320Python, ShellJul 31, 20201 months agoApache-2.0
bayesian-computingbayesian-methodsjaxmodel-comparisonnested-sampling+3 more

Similar Papers

Cite this paper

@article{albert2020jaxns,
  title  = {JAXNS: a high-performance nested sampling package based on JAX},
  author = {Joshua G. Albert},
  year   = {2020},
  eprint = {2012.15286},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2012.15286}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2012.15286.svg)](https://codeofpaper.com/paper/2012.15286)

Discussion