SearcharxivSearch

arXiv subjects

Thomas Tram

Publications and source records attributed to Thomas Tram.

At least 19 recordsLinked to original sources

Posterior sampling in the Age of Emulators

We investigate posterior sampling strategies for cosmological parameter inference using fully differentiable neural-network likelihood emulators, which provide both rapid likelihood evaluations and automatic differentiation. We compare Metropolis--Hastings (MH), the Metropolis-Adjusted Langevin Algorithm (MALA), Hamiltonian Monte Carlo (HMC), the No U-Turn Sampler (NUTS), and Affine Invariant Ensemble Sampling (AIES) using likelihood emulators constructed with the CLiENT framework. The methods are tested on emulators of both the $\Lambda$CDM model and a sterile-neutrino extension. While NUTS generally converges in the fewest samples, its higher computational cost reduces this advantage when performance is measured by wall time. As a result, MALA and even standard MH remain highly competitive. We further find that whitening and covariance adaptation substantially improve sampling efficiency. The TensorFlow implementations developed for this work are released as the BEST (Batched Emulator Sampling with TensorFlow) package, providing a general framework for sampling arbitrary TensorFlow likelihood functions. The package is available through PyPI as 'best-inference' and on GitHub (at https://github.com/AndreasNygaard/best-inference.git).

astro-ph.IM

Self-interacting neutrinos in cosmological perturbation theory -- integrating the collision kernel

Cosmological constraints on self-interacting neutrinos require a Boltzmann hierarchy in which the collision term is projected onto momentum-averaged multipoles. We revisit the collision kernel for neutrino-neutrino scattering mediated by a light scalar and derive an exact analytic expression for the multipole integral that determines the coefficients $\alpha_\ell$. The key idea is to express the integration kernel as angular derivatives of the Yukawa-potential $\frac{\mathrm{e}^{-P/2}}{P}$, move the derivatives onto Legendre polynomials, and reduce the remaining momentum integrals to a single base family obeying a first-order recurrence. This gives an exact rational-plus-$\pi^2$ representation for every multipole, together with a compact implementation based on exact rational arithmetic. We provide the recurrence relations, a closed form for the base integral, and an asymptotically constrained approximation suitable for Boltzmann codes such as CLASS. Our numerical implementation is publicly available in the Jupyter notebook IntegralComputation.ipynb.

astro-ph.CO

CosmoSlider: An educational tool for cosmology

Understanding how cosmological parameters influence the cosmic microwave background (CMB) power spectra is a central component of modern cosmology education, but interactive exploration is often limited by computational cost or technical complexity. We present CosmoSlider, a lightweight visualization tool that enables real-time exploration of CMB power spectra as multiple cosmological parameters are varied simultaneously. The tool employs a neural-network emulator implemented using TensorFlow Lite, allowing rapid evaluation of spectra without relying on large grids of precomputed models or on-demand execution of Einstein--Boltzmann solvers. CosmoSlider is available both as an iOS application and as a web-based tool, making it accessible across platforms and suitable for use in classrooms, lectures, and self-guided study. By providing immediate visual feedback, CosmoSlider supports the development of intuition for the physical processes underlying CMB anisotropies and serves as a complementary resource to traditional theoretical instruction.

astro-ph.IM

CLiENT: A new tool for emulating cosmological likelihoods using deep neural networks

Cosmological emulation of observables such as the Cosmic Microwave Background (CMB) spectra and matter power spectra have become increasingly common in recent years because of the potential for saving computation time in connection with cosmological parameter inference or model comparison. In this paper we present CLiENT (Cosmological Likelihood Emulator using Neural networks with TensorFlow), a new method which circumvents the computation of observables in favour of directly emulating the likelihood function for a data set given a model parameter vector. We find that the method is competitive with observable emulators in terms of the required number of function evaluations, but has the distinct advantage of producing a surrogate likelihood which is completely auto-differentiable. Using less than $2 \times 10^4$ function evaluations CLiENT typically achieves credible intervals within better than $0.1 \sigma$ of those obtained using the true likelihood and single-point emulator precision better than $\Delta \chi^2 \sim 0.5$ across relevant regions in parameter space.

astro-ph.CO

Cosmic curl -- Features and convergence of the vorticity power spectrum in $N$-body simulations

Observations of the cosmic velocity field could become an important cosmological probe in the near future. To take advantage of future velocity-flow surveys we must however have the theoretical predictions under control. In many respects, the velocity field is easier to simulate than the density field because it is less severely affected by small-scale clustering. Therefore, as we also show in this paper, a particle-mesh (PM) based simulation approach is usually sufficient, yielding results within a few percent of a corresponding P$^3$M simulation in which short-range forces are properly accounted for, but which also carry a much larger computational cost. However, in other respects the velocity field is much more challenging to deal with than the density field: Interpolating the velocity field onto a grid is significantly more complicated, and the vorticity field (the curl-part of the velocity field) is severely affected by both sample variance and discretisation effects. While the former can be dealt with using fixed amplitude initial conditions, the former makes it infeasible to run fully converged simulations in a cosmological volume. However, using the $N$-body code CONCEPT we show that one can robustly extrapolate the cosmic vorticity power spectrum from just 4 simulations with different number of particles. We expect our extrapolated vorticity power spectra to be correct within 5\% of the fully converged result across three orders of magnitude in $k$. Finally, we have also investigated the time dependence of the vorticity as well as the ratio of vorticity to divergence.

astro-ph.CO

Calculating Bayesian evidence for inflationary models using CONNECT

Bayesian evidence is a standard tool used for comparing the ability of different models to fit available data and is used extensively in cosmology. However, since the evidence calculation involves performing an integral of the likelihood function over the entire space of model parameters this can be prohibitively expensive in terms of both CPU and time consumption. For example, in the simplest $\Lambda$CDM model and using CMB data from the Planck satellite, the dimensionality of the model space is over 30 (typically 6 cosmological parameters and 28 nuisance parameters). Even the simplest possible model requires $\mathcal{O}(10^6)$ calls to an Einstein--Boltzmann solver such as CLASS or CAMB and takes several days. Here we present calculations of Bayesian evidence using the CONNECT framework to calculate cosmological observables. We demonstrate that we can achieve results comparable to those obtained using Einstein--Boltzmann solvers, but at a minute fraction of the computational cost. As a test case, we then go on to compute Bayesian evidence ratios for a selection of slow-roll inflationary models. In the setup presented here, the total computation time is completely dominated by the likelihood function calculation which now becomes the main bottleneck for increasing computation speed.

astro-ph.CO

Cutting corners: Hypersphere sampling as a new standard for cosmological emulators

Cosmological emulators of observables such as the Cosmic Microwave Background (CMB) spectra and matter power spectra commonly use training data sampled from a Latin hypercube. This method often incurs high computational costs by covering less relevant parts of the parameter space, especially in high dimensions where only a small fraction of the parameter space yields a significant likelihood. In this paper, we introduce hypersphere sampling, which instead concentrates sample points in regions with higher likelihoods, significantly enhancing the efficiency and accuracy of emulators. A novel algorithm for sampling within a high-dimensional hyperellipsoid aligned with axes of correlation in the cosmological parameters is presented. This method focuses the distribution of training data points on areas of the parameter space that are most relevant to the models being tested, thereby avoiding the computational redundancies common in Latin hypercube approaches. Comparative analysis using the \textsc{connect} emulation tool demonstrates that hypersphere sampling can achieve similar or improved emulation precision with more than an order of magnitude fewer data points and thus less computational effort than traditional methods. This was tested for both the $\Lambda$CDM model and a 5-parameter extension including Early Dark Energy, massive neutrinos, and additional ultra-relativistic degrees of freedom. Our results suggest that hypersphere sampling holds potential as a more efficient approach for cosmological emulation, particularly suitable for complex, high-dimensional models.

astro-ph.CO

PROSPECT: A profile likelihood code for frequentist cosmological parameter inference

Cosmological parameter inference has been dominated by the Bayesian approach for the past two decades, primarily due to its computational efficiency. However, the Bayesian approach involves integration of the posterior probability and therefore depends on both the choice of model parametrisation and the choice of prior on the model parameter space. In some cases, this can lead to conclusions which are driven by choice of parametrisation and priors rather than by data. The profile likelihood method provides a complementary frequentist tool which can be used to investigate this effect. In this paper, we present the code PROSPECT for computing profile likelihoods in cosmology. We showcase the code using a phenomenological model for converting dark matter into dark radiation that suffers from large volume effects and prior dependence. PROSPECT is compatible with both cobaya and MontePython, and is publicly available at https://github.com/AarhusCosmology/prospect_public.

astro-ph.CO

Bayesian and frequentist investigation of prior effects in EFTofLSS analyses of full-shape BOSS and eBOSS data

Previous studies based on Bayesian methods have shown that the constraints on cosmological parameters from the Baryonic Oscillation Spectroscopic Survey (BOSS) full-shape data using the Effective Field Theory of Large Scale Structure (EFTofLSS) depend on the choice of prior on the EFT nuisance parameters. In this work, we explore this prior dependence by adopting a frequentist approach based on the profile likelihood method, which is inherently independent of priors, considering data from BOSS, eBOSS and Planck. We find that the priors on the EFT parameters in the Bayesian inference are informative and that prior volume effects are important. This is reflected in shifts of the posterior mean compared to the maximum likelihood estimate by up to 1.0 {\sigma} (1.6 {\sigma}) and in a widening of intervals informed from frequentist compared to Bayesian intervals by factors of up to 1.9 (1.6) for BOSS (eBOSS) in the baseline configuration, while the constraints from Planck are unchanged. Our frequentist confidence intervals give no indication of a tension between BOSS/eBOSS and Planck. However, we find that the profile likelihood prefers extreme values of the EFT parameters, highlighting the importance of combining Bayesian and frequentist approaches for a fully nuanced cosmological inference. We show that the improved statistical power of future data will reconcile the constraints from frequentist and Bayesian inference using the EFTofLSS.

astro-ph.CO

Fast and effortless computation of profile likelihoods using CONNECT

The frequentist method of profile likelihoods has recently received renewed attention in the field of cosmology. This is because the results of inferences based on the latter may differ from those of Bayesian inferences, either because of prior choices or because of non-Gaussianity in the likelihood function. Consequently, both methods are required for a fully nuanced analysis. However, in the last decades, cosmological parameter estimation has largely been dominated by Bayesian statistics due to the numerical complexity of constructing profile likelihoods, arising mainly from the need for a large number of gradient-free optimisations of the likelihood function. In this paper, we show how to accommodate the computational requirements of profile likelihoods using the publicly available neural network framework CONNECT together with a novel modification of the gradient-based $basin$-$hopping$ optimisation algorithm. Apart from the reduced evaluation time of the likelihood due to the neural network, we also achieve an additional speed-up of 1$-$2 orders of magnitude compared to profile likelihoods computed with the gradient-free method of $simulated$ $annealing$, with excellent agreement between the two. This allows for the production of typical triangle plots normally associated with Bayesian marginalisation within cosmology (and previously unachievable using likelihood maximisation because of the prohibitive computational cost). We have tested the setup on three cosmological models: the $\Lambda$CDM model, an extension with varying neutrino mass, and finally a decaying cold dark matter model. Given the default precision settings in CONNECT, we achieve a high precision in $\chi^2$ with a difference to the results obtained by CLASS of $\Delta\chi^2\approx0.2$ (and, importantly, without any bias in inferred parameter values) $-$ easily good enough for profile likelihood analyses.

astro-ph.CO

Decaying Dark Matter and the Hubble Tension

Decaying dark matter models generically modify the equation of state around the time of dark matter decay, and this in turn modifies the expansion rate of the Universe through the Friedmann equation. Thus, a priori, these models could solve or alleviate the Hubble tension, and depending on the lifetime of the dark matter, they can be classified as belonging to either the early- or late-time solutions. Moreover, decaying dark matter models can often be realized in particle physics models relatively easily. However, the implementations of these models in Einstein--Boltzmann solver codes are non-trivial, so not all incarnations have been tested. It is well known that models with very late decay of dark matter do not alleviate the Hubble tension, and in fact, cosmological data puts severe constraints on the lifetime of such dark matter scenarios. However, models in which a fraction of the dark matter decays to dark radiation at early times hold the possibility of modifying the effective equation of state around matter-radiation equality without affecting late-time cosmology. This scenario is therefore a simple realization of a possible early-time solution to the Hubble tension, and cosmological parameter estimation with current data in these models yields a value of $H_0 = 68.73^{+0.81}_{-1.3}$ at $68\%$ C.I.. This still leads to a $2.7\sigma$ Gaussian tension with the representative local value of $H_0 = 73.2 \pm 1.3$ km s$^{-1}$ Mpc$^{-1}$. Additional work is, however, required to test more complex decay scenarios, which could potentially prefer higher values of $H_0$ and provide a better solution to the Hubble tension.

astro-ph.CO

Profiling Cold New Early Dark Energy

Recent interest in New Early Dark Energy (NEDE), a cosmological model with a vacuum energy component decaying in a triggered phase transition around recombination, has been sparked by its impact on the Hubble tension. Previous constraints on the model parameters were derived in a Bayesian framework with Markov-chain Monte Carlo (MCMC) methods. In this work, we instead perform a frequentist analysis using the profile likelihood in order to assess the impact of prior volume effects on the constraints. We constrain the maximal fraction of NEDE $f_\mathrm{NEDE}$, finding $f_\mathrm{NEDE}=0.076^{+0.040}_{-0.035}$ at $68 \%$ CL with our baseline dataset and similar constraints using either data from SPT-3G, ACT or full-shape large-scale structure, showing a preference over $\Lambda$CDM even in the absence of a SH0ES prior on $H_0$. While this is stronger evidence for NEDE than obtained with the corresponding Bayesian analysis, our constraints broadly match those obtained by fixing the NEDE trigger mass. Including the SH0ES prior on $H_0$, we obtain $f_\mathrm{NEDE}=0.136^{+0.024}_{-0.026}$ at $68 \%$ CL. Furthermore, we compare NEDE with the Early Dark Energy (EDE) model, finding similar constraints on the maximal energy density fractions and $H_0$ in the two models. At $68 \%$ CL in the NEDE model, we find $H_0 = 69.56^{+1.16}_{-1.29} \text{ km s}^{-1}\text{ Mpc}^{-1}$ with our baseline and $H_0 = 71.62^{+0.78}_{-0.76} \text{ km s}^{-1}\text{ Mpc}^{-1}$ when including the SH0ES measurement of $H_0$, thus corroborating previous conclusions that the NEDE model provides a considerable alleviation of the $H_0$ tension.

astro-ph.CO

Discovering a new well: Decaying dark matter with profile likelihoods

A large number of studies, all using Bayesian parameter inference from Markov Chain Monte Carlo methods, have constrained the presence of a decaying dark matter component. All such studies find a strong preference for either very long-lived or very short-lived dark matter. However, in this letter, we demonstrate that this preference is due to parameter volume effects that drive the model towards the standard $\Lambda$CDM model, which is known to provide a good fit to most observational data. Using profile likelihoods, which are free from volume effects, we instead find that the best-fitting parameters are associated with an intermediate regime where around $3 \%$ of cold dark matter decays just prior to recombination. With two additional parameters, the model yields an overall preference over the $\Lambda$CDM model of $\Delta \chi^2 \approx -2.8$ with \textit{Planck} and BAO and $\Delta \chi^2 \approx -7.8$ with the SH0ES $H_0$ measurement, while only slightly alleviating the $H_0$ tension. Ultimately, our results reveal that decaying dark matter is more viable than previously assumed, and illustrate the dangers of relying exclusively on Bayesian parameter inference when analysing extensions to the $\Lambda$CDM model.

astro-ph.CO

Massive neutrino self-interactions and inflation

Certain inflationary models like Natural inflation (NI) and Coleman-Weinberg inflation (CWI) are disfavoured by cosmological data in the standard $\Lambda\textrm{CDM}+r$ model (where $r$ is the scalar-to-tensor ratio), as these inflationary models predict the regions in the $n_s-r$ parameter space that are excluded by the cosmological data at more than 2$\sigma$ (here $n_s$ is the scalar spectral index). The same is true for single field inflationary models with an inflection point that can account for all or majority of dark matter in the form of PBHs (primordial black holes). Cosmological models incorporating strongly self-interacting neutrinos (with a heavy mediator) are, however, known to prefer lower $n_s$ values compared to the $\Lambda\rm CDM$ model. Considering such neutrino self-interactions can, thus, open up the parameter space to accommodate the above inflationary models. In this work, we implement the massive neutrino self-interactions with a heavy mediator in two different ways: flavour-universal (among all three neutrinos), and flavour-specific (involving only one neutrino species). We implement the new interaction in both scalar and tensor perturbation equations of neutrinos. Interestingly, we find that the current cosmological data can support the aforementioned inflationary models at 2$\sigma$ in the presence of such neutrino self-interactions.

astro-ph.CO

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

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. 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}.

astro-ph.IM

Decaying warm dark matter revisited

Decaying dark matter models provide a physically motivated way of channeling energy between the matter and radiation sectors. In principle, this could affect the predicted value of the Hubble constant in such a way as to accommodate the discrepancies between CMB inferences and local measurements of the same. Here, we revisit the model of warm dark matter decaying non-relativistically to invisible radiation. In particular, we rederive the background and perturbation equations starting from a decaying neutrino model and describe a new, computationally efficient method of computing the decay product perturbations up to large multipoles. We conduct MCMC analyses to constrain all three model parameters, for the first time including the mass of the decaying species, and assess the ability of the model to alleviate the Hubble and $\sigma_8$ tensions, the latter being the discrepancy between the CMB and weak gravitational lensing constraints on the amplitude of matter fluctuations on an $8 h^{-1}$ Mpc$^{-1}$ scale. We find that the model reduces the $H_0$ tension from $\sim 4 \sigma$ to $\sim 3 \sigma$ and neither alleviates nor worsens the $S_8 \equiv \sigma_8 (\Omega_m/0.3)^{0.5}$ tension, ultimately showing only mild improvements with respect to $\Lambda$CDM. However, the values of the model-specific parameters favoured by data is found to be well within the regime of relativistic decays where inverse processes are important, rendering a conclusive evaluation of the decaying warm dark matter model open to future work.

astro-ph.CO

The cosmological simulation code $\scriptstyle{\rm CO}N{\rm CEPT}\, 1.0$

We present version 1.0 of the cosmological simulation code $\scriptstyle{\rm CO}N{\rm CEPT}$, designed for simulations of large-scale structure formation. $\scriptstyle{\rm CO}N{\rm CEPT}\, 1.0$ contains a P$^3$M gravity solver, with the short-range part implemented using a novel (sub)tiling strategy, coupled with individual and adaptive particle time-stepping. A primary objective of $\scriptstyle{\rm CO}N{\rm CEPT}$ is ease of use. To this end, it has built-in initial condition generation and can produce output in the form of snapshots, power spectra and direct visualisations. $\scriptstyle{\rm CO}N{\rm CEPT}$ is the first massively parallel cosmological simulation code written in Python. Despite of this, excellent performance is obtained, even comparing favourably to other codes such as $\scriptstyle{\rm GADGET}$ at similar precision, in the case of low to moderate clustering. By means of power spectrum comparisons we find extraordinary good agreement between $\scriptstyle{\rm CO}N{\rm CEPT}\, 1.0$ and $\scriptstyle{\rm GADGET}$. At large and intermediate scales the codes agree to well below the per mille level, while the agreement at the smallest scales probed ($k \sim 13\, h/{\rm Mpc}$) is of the order of $1\, \%$. The $\scriptstyle{\rm CO}N{\rm CEPT}$ code is openly released and comes with a robust installation script as well as thorough documentation.

astro-ph.CO

Updated constraints on massive neutrino self-interactions from cosmology in light of the $H_0$ tension

We have updated the constraints on flavour universal neutrino self-interactions mediated by a heavy scalar, in the effective 4-fermion interaction limit. We use the relaxation time approximation to modify the collisional neutrino Boltzmann equations, which is known to be very accurate for this particular scenario. Based on the latest CMB data from the Planck 2018 data release as well as auxiliary data we confirm the presence of a region in parameter space with relatively strong self-interactions which provides a better than naively expected fit. However, we also find that the most recent data, in particular high-$\ell$ polarisation data from the Planck 2018 release, disfavours this solution even though it cannot yet be excluded. Our analysis takes into account finite neutrino masses (parameterised in terms of $\sum m_{\nu}$) and allows for a varying neutrino energy density (parameterised in terms of $N_{\rm eff}$), and we find that in all cases the neutrino mass bound inferred from cosmological data is robust against the presence of neutrino self-interactions. Finally, we also find that the strong neutrino self-interactions do not lead to a high value of $H_0$ being preferred, i.e.\ this model is not a viable solution to the current $H_0$ discrepancy.

astro-ph.CO