Assessment of Gradient-Based Samplers in Standard Cosmological Likelihoods

Arrykrishna Mootoovaloo,Jaime Ruiz-Zapatero,Carlos García-García,David Alonso
2024-06-07
Abstract:We assess the usefulness of gradient-based samplers, such as the No-U-Turn Sampler (NUTS), by comparison with traditional Metropolis-Hastings algorithms, in tomographic $3 \times 2$ point analyses. Specifically, we use the DES Year 1 data and a simulated future LSST-like survey as representative examples of these studies, containing a significant number of nuisance parameters (20 and 32, respectively) that affect the performance of rejection-based samplers. To do so, we implement a differentiable forward model using JAX-COSMO (Campagne et al. 2023), and we use it to derive parameter constraints from both datasets using the NUTS algorithm as implemented in §4, and the Metropolis-Hastings algorithm as implemented in Cobaya (Lewis 2013). When quantified in terms of the number of effective number of samples taken per likelihood evaluation, we find a relative efficiency gain of $\mathcal{O}(10)$ in favour of NUTS. However, this efficiency is reduced to a factor $\sim 2$ when quantified in terms of computational time, since we find the cost of the gradient computation (needed by NUTS) relative to the likelihood to be $\sim 4.5$ times larger for both experiments. We validate these results making use of analytical multi-variate distributions (a multivariate Gaussian and a Rosenbrock distribution) with increasing dimensionality. Based on these results, we conclude that gradient-based samplers such as NUTS can be leveraged to sample high dimensional parameter spaces in Cosmology, although the efficiency improvement is relatively mild for moderate $(\mathcal{O}(50))$ dimension numbers, typical of tomographic large-scale structure analyses.
Instrumentation and Methods for Astrophysics,Cosmology and Nongalactic Astrophysics
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to evaluate the effectiveness of gradient - based samplers (such as No - U - Turn Sampler, NUTS) in standard cosmological likelihood analysis and compare them with the traditional Metropolis - Hastings algorithm. Specifically, the research aims to answer the following questions: 1. **Can gradient - based samplers explore the parameter space more efficiently?** - By using DES Year 1 data and simulated future LSST - like survey data as representative examples, these data contain a large number of nuisance parameters (20 and 32 respectively), which will affect the performance of rejection - type samplers. 2. **What are the computational efficiency advantages of gradient - based samplers?** - The research quantifies the relative efficiency gain of NUTS over the Metropolis - Hastings algorithm by comparing the number of effective samples per unit likelihood evaluation. The results show that in terms of the number of effective samples, the efficiency of NUTS is improved by about an order of magnitude (O(10)). However, when measured in terms of computing time, the efficiency improvement is only about twice, because the cost of gradient calculation is about 4.5 times the cost of likelihood calculation. 3. **How do gradient - based samplers perform in high - dimensional parameter spaces?** - To verify these results, the research uses analytical multivariate distributions with different dimensions (such as multivariate Gaussian distribution and Rosenbrock distribution). The results show that gradient - based samplers such as NUTS can be used for sampling high - dimensional parameter spaces in cosmology, but for the case of medium - dimensional (about 50 - dimensional), the efficiency improvement is relatively modest. ### Key contributions - **Integrating emulator of linear matter power spectrum**: Integrate the emulator of linear matter power spectrum into JAX - COSMO and use its existing functions to calculate the power spectra of galaxy clustering and cosmic shear. - **Posterior inference using real and simulated data**: Use DES Year 1 data and future LSST - like survey data to perform posterior inference on cosmological and nuisance parameters through NUTS. - **Evaluating the impact of differentiability**: Thoroughly evaluate how much differentiability helps in parameter inference tasks, especially in high - dimensional parameter spaces. Through these studies, the author hopes to provide guidance for choosing the most appropriate sampling method, especially when dealing with complex and high - dimensional cosmological data analysis.