Table of Contents
Fetching ...

MontePython 3: boosted MCMC sampler and other features

Thejs Brinckmann, Julien Lesgourgues

TL;DR

MontePython 3 introduces two key enhancements for cosmological parameter inference: an adaptive jumping-factor mechanism (superupdate) and an inverse Fisher-mmatrix-based proposal. Together, these substantially accelerate Metropolis-Hastings convergence, especially in high-dimensional or poorly constrained problems, while maintaining robustness across a wide range of datasets and likelihoods. The work demonstrates significant runtime savings in forecast scenarios and offers practical guidance on when to use Fisher-based initializations versus covariance updates, along with extensive documentation of new parametrisations, plotting options, and likelihoods to broaden applicability. Overall, these features streamline efficient, reliable cosmological parameter estimation and forecasting, with practical implications for large, complex likelihoods.

Abstract

MontePython is a parameter inference package for cosmology. We present the latest development of the code over the past couple of years. We explain, in particular, two new ingredients both contributing to improve the performance of Metropolis-Hastings sampling: an adaptation algorithm for the jumping factor, and a calculation of the inverse Fisher matrix, which can be used as a proposal density. We present several examples to show that these features speed up convergence and can save many hundreds of CPU-hours in the case of difficult runs, with a poor prior knowledge of the covariance matrix. We also summarise all the functionalities of MontePython in the current release, including new likelihoods and plotting options.

MontePython 3: boosted MCMC sampler and other features

TL;DR

MontePython 3 introduces two key enhancements for cosmological parameter inference: an adaptive jumping-factor mechanism (superupdate) and an inverse Fisher-mmatrix-based proposal. Together, these substantially accelerate Metropolis-Hastings convergence, especially in high-dimensional or poorly constrained problems, while maintaining robustness across a wide range of datasets and likelihoods. The work demonstrates significant runtime savings in forecast scenarios and offers practical guidance on when to use Fisher-based initializations versus covariance updates, along with extensive documentation of new parametrisations, plotting options, and likelihoods to broaden applicability. Overall, these features streamline efficient, reliable cosmological parameter estimation and forecasting, with practical implications for large, complex likelihoods.

Abstract

MontePython is a parameter inference package for cosmology. We present the latest development of the code over the past couple of years. We explain, in particular, two new ingredients both contributing to improve the performance of Metropolis-Hastings sampling: an adaptation algorithm for the jumping factor, and a calculation of the inverse Fisher matrix, which can be used as a proposal density. We present several examples to show that these features speed up convergence and can save many hundreds of CPU-hours in the case of difficult runs, with a poor prior knowledge of the covariance matrix. We also summarise all the functionalities of MontePython in the current release, including new likelihoods and plotting options.

Paper Structure

This paper contains 27 sections, 18 equations, 2 figures, 5 tables.

Figures (2)

  • Figure 1: Confidence ellipses inferred from the inverse Fisher matrix (black lines) plotted on top of the 2d marginalized posterior distribution of a Metropolis-Hastings forecast. We fitted mock BAO data from the DESI survey combined with mock Planck data, assuming an 8 parameter cosmological model ($\nu$wCDM).
  • Figure 2: Evolution of the acceptance rate, jumping factor and convergence estimators for the last run from Table 1 (10 parameter model, mock Planck+DESI, 48h) using $U=50$, $S\!U=20$, FPM$\,=10$, and thus $N_\mathrm{update}=500$. The jumping factor information is updated at each step, and the information on $(R-1)$ every $N_\mathrm{update}$ step (computed over the last 50% of the chain). This information can always be extracted from the code output. Instead, the local acceptance rate of the upper pannel was computed by post-processing the chains for the purpose of this plot, and was defined by averaging over about 500 steps (so this is slightly different from the quantity $\mkern 1.5mu\overline{\mkern-1.5mua.r.\mkern-1.5mu}\mkern 1.5mu$ used by the superupdate algorithms, which is only averaged over $S\!U\times\,$FPM=200 steps). The "Fisher" run essentially catches the right covariance matrix, jumping factor and acceptance rate from the beginning. The "superupdate" run reduces its jumping factor in order to quickly accumulate many points and get a good covariance matrix estimate; once this is done, it increases the jumping factor to avoid a too big acceptance rate. Finally, the "update" run needs about 3500 more steps before entering into an efficient sampling regime with a good covariance matrix and acceptance rate, which corresponds to about 12 hours on our 48 cores: thus we can say that in this particular example, "superupdate" saved about 600 core-hours for a single run.