#
`SuperNest`: Accelerated Nested Sampling Applied to Astrophysics and Cosmology^{ †}

^{1}

^{2}

^{3}

^{4}

^{*}

^{†}

## Abstract

**:**

`supernest`.

## 1. Introduction

## 2. Background

#### 2.1. Notation

#### 2.2. Nested Sampling

`MultiNest`[7]) this factor is exponential in the number of tunable parameters d (with a turnover constant in tens of dimensions), and linear in d for chain-based approaches (e.g.,

`PolyChord`[8]). The Kullback–Leibler divergence ${\mathcal{D}}_{\pi}\left\{\mathcal{P}\right\}$ is linear in the d for parameters that are well constrained, as can be seen from Equation (3) by noticing that volumes in parameter space scale with a power of d.

`PolyChord`needs ${n}_{\mathrm{live}}\sim \mathcal{O}\left(d\right)$ to generate enough dead point phantoms for an accurate covariance computation.

`MultiNest`needs at least ${n}_{\mathrm{live}}\sim \mathcal{O}\left(100\right)$ to compute ellipsoidal decompositions.

#### 2.3. Historical Overview of Acceleration Attempts

## 3. Posterior Repartitioning

`cobaya`[10],

`cosmomc`[11,12],

`MontePython`[13] or

`cosmosis`[14] in the manner in which they consider Gaussian priors. Codes can either make the choice to incorporate this as part of the prior (typically as an inverse-error-function-based unit hypercube transformation), or as a density term added to the rest of the log-likelihood calculations.

#### 3.1. Example 1: Power Posterior Repartitioning

#### 3.2. Example 0: Replacement Repartitioning

#### 3.3. Example 2: Additive Superpositional Repartitioning

## 4. `Supernest`: Stochastic Superpositional Repartitioning

## 5. Cosmological Example

`PolyChord`wrapped with supernest, both with their default settings.

`PolyChord`, in addition, is set with a precision criterion of $10\%$, i.e., stopping when the live points contain 10% of the remaining evidence. As a representative example, we first choose a Gaussian proposal with the same covariance as the parameters, inflated by a factor of ${3}^{d}$ in volume, and offset by a random vector drawn from the posterior. This gives a proposal which is conservative (much wider than the posterior), and approximately correctly centered.

`supernest`achieved an order-of-magnitude $12\times $ improvement over the traditional nested sampling run. Further improvements to this speed are achievable if a more compact (and possibly larger number of) proposal distributions are used.

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Skilling, J. Nested sampling for general Bayesian computation. Bayesian Anal.
**2006**, 1, 833–859. [Google Scholar] [CrossRef] - MacKay, D.J.C. Monte-Carlo methods. In Information Theory, Inference, and Learning Algorithms; Cambridge University Press: Cambridge, UK, 2003; Chapter 29; pp. 379–380. [Google Scholar]
- Ashton, G.; Bernstein, N.; Buchner, J.; Chen, X.; Csányi, G.; Fowlie, A.; Feroz, F.; Griffiths, M.; Handley, W.; Habeck, M.; et al. Author Correction: Nested sampling for physical scientists. Nat. Rev. Methods Prim.
**2022**, 2, 44. [Google Scholar] [CrossRef] - Arminger, G.; Muthén, B.O. A Bayesian approach to nonlinear latent variable models using the Gibbs sampler and the metropolis-hastings algorithm. Psychometrika
**1998**, 63, 271–300. [Google Scholar] [CrossRef] [Green Version] - Chen, X.; Feroz, F.; Hobson, M. Bayesian automated posterior repartitioning for nested sampling. arXiv
**2019**, arXiv:1908.04655. [Google Scholar] - Kullback, S.; Leibler, R.A. On Information and Sufficiency. Ann. Math. Stat.
**1951**, 22, 79–86. [Google Scholar] [CrossRef] - Feroz, F.; Hobson, M.P.; Bridges, M. MultiNest: An efficient and robust Bayesian inference tool for cosmology and particle physics. Mon. Not. R. Astron. Soc.
**2009**, 398, 1601–1614. [Google Scholar] [CrossRef] [Green Version] - Handley, W.J.; Hobson, M.P.; Lasenby, A.N. polychord: Next-generation nested sampling. Mon. Not. R. Astron. Soc.
**2015**, 453, 4384–4398. [Google Scholar] [CrossRef] [Green Version] - Anstey, D.; de Lera Acedo, E.; Handley, W. A general Bayesian framework for foreground modelling and chromaticity correction for global 21 cm experiments. Mon. Not. R. Astron. Soc.
**2021**, 506, 2041–2058. [Google Scholar] [CrossRef] - Torrado, J.; Lewis, A. Cobaya: Code for Bayesian analysis of hierarchical physical models. J. Cosmol. Astropart. Phys.
**2021**, 2021, 57. [Google Scholar] [CrossRef] - Lewis, A.; Bridle, S. Cosmological parameters from CMB and other data: A Monte Carlo approach. Phys. Rev. D
**2002**, 66, 103511. [Google Scholar] [CrossRef] [Green Version] - Lewis, A. Efficient sampling of fast and slow cosmological parameters. Phys. Rev. D
**2013**, 87, 103529. [Google Scholar] [CrossRef] [Green Version] - Brinckmann, T.; Lesgourgues, J. MontePython 3: Boosted MCMC sampler and other features. Phys. Dark Universe
**2019**, 24, 100260. [Google Scholar] [CrossRef] [Green Version] - Zuntz, J.; Paterno, M.; Jennings, E.; Rudd, D.; Manzotti, A.; Dodelson, S.; Bridle, S.; Sehrish, S.; Kowalkowski, J. CosmoSIS: Modular cosmological parameter estimation. Astron. Comput.
**2015**, 12, 45–59. [Google Scholar] [CrossRef] [Green Version] - Planck Collaboration. Planck 2018 results. VI. Cosmological parameters. Astron. Astrophys.
**2020**, 641, A6. [Google Scholar] [CrossRef] [Green Version] - Higson, E.; Handley, W.; Hobson, M.; Lasenby, A.N. Dynamic nested sampling: An improved algorithm for parameter estimation and evidence calculation. Stat. Comput.
**2018**, 29, 891–913. [Google Scholar] [CrossRef] [Green Version]

**Figure 1.**

`supernest`in action. The top panels show the parameter spaces of the Hubble constant and optical depth to reionisation $({H}_{0},\tau )$ [15] with all other ${\Lambda}$CDM and nuisance parameters marginalised out. Contours show the 66% and 95% credibility regions of the prior (green) and nested sampling posterior (blue), alongside the proposal distribution (black) provided to

`supernest`which recovers the same posterior (orange) as the original NS run. The left hand plot visualised the prior, whilst the right hand plot zooms in on the posterior for clarity. The lower panel shows the Higson plot [16] of the two runs. Here, the evidences recovered are consistent, and the

`supernest`run in orange has a more accurate evidence inference, associated with the fact that the compression in prior volume $lnX$ is substantially lower, meaning the nested sampling run terminates in approximately a third the time. An alternative proposal distribution with dashed lines is also plotted, which recovers an evidence of $ln\mathcal{Z}=-110.36\pm 0.18$, consistent to within sampling error.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Petrosyan, A.; Handley, W.
`SuperNest`: Accelerated Nested Sampling Applied to Astrophysics and Cosmology. *Phys. Sci. Forum* **2022**, *5*, 51.
https://doi.org/10.3390/psf2022005051

**AMA Style**

Petrosyan A, Handley W.
`SuperNest`: Accelerated Nested Sampling Applied to Astrophysics and Cosmology. *Physical Sciences Forum*. 2022; 5(1):51.
https://doi.org/10.3390/psf2022005051

**Chicago/Turabian Style**

Petrosyan, Aleksandr, and Will Handley.
2022. "`SuperNest`: Accelerated Nested Sampling Applied to Astrophysics and Cosmology" *Physical Sciences Forum* 5, no. 1: 51.
https://doi.org/10.3390/psf2022005051