Cobaya: code for Bayesian analysis of hierarchical physical models
Open accessThe DOI matches its Crossref record; 25 of the 25 references it cites were found in a registry or an index.
Abstract
We present , a general-purpose Bayesian analysis code aimed at models with complex internal interdependencies. Without the need for specific code by the user, interdependencies between different stages of a model pipeline are exploited for sampling efficiency: intermediate results are automatically cached, and parameters are grouped in blocks according to their dependencies and optimally sorted, taking into account their individual computational costs, so as to minimize the cost of their variation during sampling, thanks to a novel algorithm. Cobaya allows exploration of posteriors using a range of Monte Carlo samplers, and also has functions for maximization and importance-reweighting of Monte Carlo samples with new priors and likelihoods. Cobaya is written in Python in a modular way that allows for extendability, use of calculations provided by external packages, and dynamical reparameterization without modifying its source. It can exploit hybrid OpenMP/MPI parallelization, and has sub-millisecond overhead per posterior evaluation. Though Cobaya is a general purpose statistical framework, it includes interfaces to a set of cosmological Boltzmann codes and likelihoods (the latter being agnostic with respect to the choice of the former), and automatic installers for external dependencies.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Equation of State Calculations by Fast Computing Machines
Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N., Teller, A. H., & Teller, E. (1953) · The Journal of Chemical Physics · doi:10.1063/1.1699114 · Cited by 37,192
Inference from iterative simulation using multiple sequences
Gelman, A., & Rubin, D. B. (1992) · Statistical Science · doi:10.1214/ss/1177011136 · Cited by 16,627
Monte Carlo sampling methods using Markov chains and their applications.
Hastings, W. K. (1970) · Biometrika · doi:10.1093/biomet/57.1.97 · Cited by 15,195
Planck 2018 results: VI. Cosmological parameters
Planck Collaboration, Aghanim, N., Akrami, Y., Ashdown, M., Aumont, J., Baccigalupi, C., Ballardini, M., Banday, A. J., Barreiro, R. B., Bartolo, N., et al. (2020) · Astronomy & Astrophysics · doi:10.1051/0004-6361/201833910 · Cited by 14,258
Self-citationThe NumPy Array: A Structure for Efficient Numerical Computation
van der Walt, S., Colbert, S. C., & Varoquaux, G. (2011) · Computing in Science & Engineering · doi:10.1109/mcse.2011.37 · Cited by 9,381
Lewis, A., Challinor, A., & Lasenby, A. (2000) · The Astrophysical Journal · doi:10.1086/309179 · Cited by 4,920
Self-citationCosmological parameters from CMB and other data: A Monte Carlo approach
Lewis, A., & Bridle, S. (2002) · Physical Review D · doi:10.1103/physrevd.66.103511 · Cited by 3,495 · cited 4×
“In that regard, it compares to CosmoMC [2, 12], and later MontePython [13, 14] and CosmoSIS [15], amongst others.”
InfluentialSelf-citationThe Cosmic Linear Anisotropy Solving System (CLASS). Part II: Approximation schemes
Blas, D., Lesgourgues, J., & Tram, T. (2011) · Journal of Cosmology and Astroparticle Physics · doi:10.1088/1475-7516/2011/07/034 · Cited by 2,305
Stable clustering, the halo model and non-linear cosmological power spectra
Smith, R. E., Peacock, J. A., Jenkins, A., White, S. D. M., Frenk, C. S., Pearce, F. R., Thomas, P. A., Efstathiou, G., & Couchman, H. M. P. (2003) · Monthly Notices of the Royal Astronomical Society · doi:10.1046/j.1365-8711.2003.06503.x · Cited by 2,054 · cited 1×
“Cobaya ’s CAMB wrapper explicitly supports this with non-linear modelling based on variations of halofit [26– 28], generalizing the approach used in CosmoMC .”
Nested sampling for general Bayesian computation
Skilling, J. (2006) · Bayesian Analysis · doi:10.1214/06-ba127 · Cited by 1,670
Cited by
DESI 2024 VI: cosmological constraints from the measurements of baryon acoustic oscillations
Adame, A. G., Aguilar, J., Ahlen, S., Alam, S., Alexander, D. M., Alvarez, M., Alves, O., Anand, A., Andrade, U., Armengaud, E., et al. (2025) · Journal of Cosmology and Astroparticle Physics · doi:10.1088/1475-7516/2025/02/021 · Cited by 1,136
DESI DR2 results. II. Measurements of baryon acoustic oscillations and cosmological constraints
Abdul Karim, M., Aguilar, J., Ahlen, S., Alam, S., Allen, L., Prieto, C. A., Alves, O., Anand, A., Andrade, U., Armengaud, E., et al. (2025) · Physical Review D · doi:10.1103/tr6y-kpc6 · Cited by 856
The Atacama Cosmology Telescope: DR4 maps and cosmological parameters
Aiola, S., Calabrese, E., Maurin, L., Naess, S., Schmitt, B. L., Abitbol, M. H., Addison, G. E., Ade, P. A. R., Alonso, D., Amiri, M., et al. (2020) · Journal of Cosmology and Astroparticle Physics · doi:10.1088/1475-7516/2020/12/047 · Cited by 636
Euclid: I. Overview of the Euclid mission
Euclid Collaboration, Mellier, Y., Abdurro’uf, Acevedo Barroso, J. A., Achúcarro, A., Adamek, J., Adam, R., Addison, G. E., Aghanim, N., Aguena, M., et al. (2025) · Astronomy & Astrophysics · doi:10.1051/0004-6361/202450810 · Cited by 616
The Atacama Cosmology Telescope: DR6 Gravitational Lensing Map and Cosmological Parameters
Madhavacheril, M. S., Qu, F. J., Sherwin, B. D., MacCrann, N., Li, Y., Abril-Cabezas, I., Ade, P. A. R., Aiola, S., Alford, T., Amiri, M., et al. (2024) · The Astrophysical Journal · doi:10.3847/1538-4357/acff5f · Cited by 354
Cosmology with the Laser Interferometer Space Antenna
Auclair, P., Bacon, D., Baker, T., Barreiro, T., Bartolo, N., Belgacem, E., Bellomo, N., Ben-Dayan, I., Bertacca, D., Besancon, M., et al. (2023) · Living Reviews in Relativity · doi:10.1007/s41114-023-00045-2 · Cited by 333
Self-citationDi Valentino, E., Said, J. L., Riess, A., Pollo, A., Poulin, V., Gómez-Valent, A., Weltman, A., Palmese, A., Huang, C. D., Bruck, C. V. D., et al. (2025) · Physics of the Dark Universe · doi:10.1016/j.dark.2025.101965 · Cited by 319
Self-citationCMB lensing from Planck PR4 maps
Carron, J., Mirmelstein, M., & Lewis, A. (2022) · Journal of Cosmology and Astroparticle Physics · doi:10.1088/1475-7516/2022/09/039 · Cited by 288
Self-citationQu, F. J., Sherwin, B. D., Madhavacheril, M. S., Han, D., Crowley, K. T., Abril-Cabezas, I., Ade, P. A. R., Aiola, S., Alford, T., Amiri, M., et al. (2024) · The Astrophysical Journal · doi:10.3847/1538-4357/acfe06 · Cited by 282
GetDist: a Python package for analysing Monte Carlo samples
Lewis, A. (2025) · Journal of Cosmology and Astroparticle Physics · doi:10.1088/1475-7516/2025/08/025 · Cited by 280
Self-citationImproved limits on the tensor-to-scalar ratio using BICEP and Planck data
Tristram, M., Banday, A. J., Górski, K. M., Keskitalo, R., Lawrence, C. R., Andersen, K. J., Barreiro, R. B., Borrill, J., Colombo, L. P. L., Eriksen, H. K., et al. (2022) · Physical Review D · doi:10.1103/physrevd.105.083524 · Cited by 259
Validation of the Scientific Program for the Dark Energy Spectroscopic Instrument
DESI Collaboration, Adame, A. G., Aguilar, J., Ahlen, S., Alam, S., Aldering, G., Alexander, D. M., Alfarsy, R., Allende Prieto, C., Alvarez, M., et al. (2024) · The Astronomical Journal · doi:10.3847/1538-3881/ad0b08 · Cited by 231
CMB power spectra and cosmological parameters from Planck PR4 with CamSpec
Rosenberg, E., Gratton, S., & Efstathiou, G. (2022) · Monthly Notices of the Royal Astronomical Society · doi:10.1093/mnras/stac2744 · Cited by 225
Atacama Cosmology Telescope: Constraints on prerecombination early dark energy
Hill, J. C., Calabrese, E., Aiola, S., Battaglia, N., Bolliet, B., Choi, S. K., Devlin, M. J., Duivenvoorden, A. J., Dunkley, J., Ferraro, S., et al. (2022) · Physical Review D · doi:10.1103/physrevd.105.123536 · Cited by 122
“8 https://github.com/CobayaSampler/cobaya 7 We assess convergence of the MCMC chains using the Gelman-Rubin [78] criterion, requiring R − 1 0.03.”
InfluentialReview of Hubble tension solutions with new SH0ES and SPT-3G data
Khalife, A. R., Zanjani, M. B., Galli, S., Günther, S., Lesgourgues, J., & Benabed, K. (2024) · Journal of Cosmology and Astroparticle Physics · doi:10.1088/1475-7516/2024/04/059 · Cited by 80
Expansion-history preferences of DESI DR2 and external data
Bansal, P., & Huterer, D. (2025) · Physical Review D · doi:10.1103/zypq-s6nl · Cited by 22
Hubble Tension as a Window on the Gravitation of the Dark Matter Sector
Pitrou, C., & Uzan, J.-P. (2024) · Physical Review Letters · doi:10.1103/physrevlett.132.191001 · Cited by 15
“The model is implemented both at the background and perturbations levels as a modification of the CLASS code [15] (see our companion article [14] for details) in order to test its power on the H 0 tension through a MCMC analysis with Cobaya [16].”
MethodUzan, J.-P., & Pitrou, C. (2024) · Physical Review D · doi:10.1103/physrevd.109.103505 · Cited by 9
Metadata
- Authors
- Torrado, J., & Lewis, A.
- Venue
- Journal of Cosmology and Astroparticle Physics
- Publisher
- IOP Publishing
- Published
- 2021-05-01
- Volume
- 2021
- Issue
- 05
- Pages
- 057
- ISSN
- 1475-7508 (ISSN-L)
- 1475-7516
- OpenAlex
- W3021130000
- Cited by
- 692
- References
- 25
- FWCI
- 54.33
- Type
- journal article
- Language
- en
- Open access
- bronze
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.