CONNECT: A neural network based framework for emulating cosmological observables and cosmological parameter inference

Andreas Nygaard, Emil Brinch Holm, Steen Hannestad, Thomas Tram
5/30/2022
astro-ph.IMastro-ph.COhep-th

Official code: AarhusCosmology/connect_public (14 stars, Python, last commit 2026-11-05).

Abstract

Bayesian parameter inference is an essential tool in modern cosmology, and typically requires the calculation of $10^5$--$10^6$ theoretical models for each inference of model parameters for a given dataset combination. Computing these models by solving the linearised Einstein-Boltzmann system usually takes tens of CPU core-seconds per model, making the entire process very computationally expensive.

Show full abstract

In this paper we present \textsc{connect}, a neural network framework emulating \textsc{class} computations as an easy-to-use plug-in for the popular sampler \textsc{MontePython}. \textsc{connect} uses an iteratively trained neural network which emulates the observables usually computed by \textsc{class}. The training data is generated using \textsc{class}, but using a novel algorithm for generating favourable points in parameter space for training data, the required number of \textsc{class}-evaluations can be reduced by two orders of magnitude compared to a traditional inference run. Once \textsc{connect} has been trained for a given model, no additional training is required for different dataset combinations, making \textsc{connect} many orders of magnitude faster than \textsc{class} (and making the inference process entirely dominated by the speed of the likelihood calculation). For the models investigated in this paper we find that cosmological parameter inference run with \textsc{connect} produces posteriors which differ from the posteriors derived using \textsc{class} by typically less than $0.01$--$0.1$ standard deviations for all parameters. We also stress that the training data can be produced in parallel, making efficient use of all available compute resources. The \textsc{connect} code is publicly available for download at \url{https://github.com/AarhusCosmology}.

View on arXivView PDF

Code Implementations(1)

Public branch of CONNECT

147Python, ShellMay 31, 20223 weeks ago

Similar Papers

Cite this paper

@article{nygaard2022connect,
  title  = {CONNECT: A neural network based framework for emulating cosmological observables and cosmological parameter inference},
  author = {Andreas Nygaard and Emil Brinch Holm and Steen Hannestad and Thomas Tram},
  year   = {2022},
  eprint = {2205.15726},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.15726}
}

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/2205.15726.svg)](https://codeofpaper.com/paper/2205.15726)

Discussion