In this paper, we present the first study that compares different models of Bayesian neural networks (BNNs) to predict the posterior distribution of the cosmological parameters directly from the cosmic microwave background (CMB) temperature and polarization maps. We focus our analysis on four different methods to sample the weights of the network during training: Dropout, DropConnect, Reparameterization Trick (RT), and Flipout. We find that Flipout outperforms all other methods regardless of the architecture used, and provides tighter constraints for the cosmological parameters. Moreover, we compare our results with a Markov chain Monte Carlo (MCMC) posterior analysis and obtain comparable error correlations among parameters, with BNNs that are orders of magnitude faster in inference, albeit less accurate. Thanks to the speed of the inference process with BNNs, the posterior distribution—the outcome of the neural network—can be used as the initial proposal for the Markov chain. We show that this combined approach increases the acceptance rate in the Metropolis-Hasting algorithm and accelerates the convergence of the MCMC, while reaching the same final accuracy. In the second part of the paper, we present a guide to the training and calibration of a successful multichannel BNN for the CMB temperature and polarization map. We show how tuning the regularization parameter for the standard deviation of the approximate posterior on the weights in Flipout and RT can produce unbiased and reliable uncertainty estimates, i.e., the regularizer acts like a hyperparameter analogous to the dropout rate in Dropout. The best performances are nevertheless achieved with a more convenient method, in which the network parameters are kept free during training to achieve the best uncalibrated performances, and the confidence intervals are calibrated in a subsequent phase. Additionally, we describe existing strategies for calibrating the networks and propose new ones. Finally, we show how polarization, when combined with the temperature in a unique multichannel tensor fed to a single BNN, helps to break degeneracies among parameters and provides stringent constraints. The results reported in this paper can be extended to other cosmological data sets in order to capture features that can be extracted directly from the raw data, such as non-Gaussianity or foreground emissions.
17 July 2020 in Machine Learning: Science and Technology
The next generation 21 cm surveys open a new window onto the early stages of cosmic structure formation and provide new insights about the Epoch of Reionization (EoR). However, the non-Gaussian nature of the 21 cm signal along with the huge amount of data generated from these surveys will require more advanced techniques capable to efficiently extract the necessary information to constrain the Reionization History of the Universe. In this paper we present the use of Bayesian Neural Networks (BNNs) to predict the posterior distribution for four astrophysical and cosmological parameters. Besides obtaining prediction performances comparable to state-of-the art, the proposed methods provide accurate estimation of parameters uncertainties and infer correlations among them. Additionally, we demonstrate the advantages of Normalizing Flows (NF) combined with BNNs, being able to model more complex output distributions and thus capture key information as non-Gaussianities in the parameter conditional density distribution for astrophysical and cosmological datasets. Finally, we propose novel calibration methods employing Normalizing Flows after training, to produce reliable predictions, and we demonstrate the advantages of this approach both in terms of computational cost and prediction performances.
1 June 2017 in Journal of Cosmology and Astroparticle Physics
In this paper, we investigate the effects of helical primordial magnetic fields (PMFs) on the cosmic microwave background (CMB) reduced bispectrum. We derive the full three-point statistics of helical magnetic fields and numerically calculate the even contribution in the collinear configuration. We then numerically compute the CMB reduced bispectrum induced by passive and compensated PMF modes on large angular scales. There is a negative signal on the bispectrum due to the helical terms of the fields and we also observe that the biggest contribution to the bispectrum comes from the non-zero IR cut-off for causal fields, unlike the two-point correlation case. For negative spectral indices, the reduced bispectrum is enhanced by the passive modes. This gives a lower value of the upper limit for the mean amplitude of the magnetic field on a given characteristic scale. However, high values of IR cut-off in the bispectrum, and the helical terms of the magnetic field relaxes this bound. This demonstrates the importance of the IR cut-off and helicity in the study of the nature of PMFs from CMB observations.
The origin of large scale magnetic fields is one of the most puzzling topics in cosmology and astrophysics. It is assumed that the observed magnetic fields result from the amplification of an initial field produced in the early universe. In this paper we compute the exact power spectrum of magnetic fields created after inflation best known as post-inflationary magnetic fields, using the first order cosmological perturbation theory. Our treatment differs from others' works because we include an infrared cutoff which encodes only causal modes in the spectrum. The cross-correlation between magnetic energy density with Lorentz force and the anisotropic part of the electromagnetic field are exactly computed. We compare our results with previous works finding agreement in cases where the ratio between lower and upper cutoff is very small. However, we found that spectrum is strongly affected when this ratio is greater than 0.2. Moreover, the effect of a post-inflationary magnetic field with a lower cutoff on the angular power spectrum in the temperature distribution of cosmic microwave background was also exactly calculated. The main feature is a shift of the spectrum's peak as a function of the infrared cutoff, therefore analyzing this effect we could infer the value of this cutoff and thus constraining the primordial magnetic fields generation models.
Context. The new generation of galaxy surveys will provide unprecedented data that will allow us to test gravity deviations at cosmological scales at a much higher precision than could be achieved previously. A robust cosmological analysis of the large-scale structure demands exploiting the nonlinear information encoded in the cosmic web. Machine-learning techniques provide these tools, but no a priori assessment of the uncertainties. Aims. We extract cosmological parameters from modified gravity (MG) simulations through deep neural networks that include uncertainty estimations. Methods. We implemented Bayesian neural networks (BNNs) with an enriched approximate posterior distribution considering two cases: the first case with a single Bayesian last layer (BLL), and the other case with Bayesian layers at all levels (FullB). We trained both BNNs with real-space density fields and power spectra from a suite of 2000 dark matter-only particle-mesh N-body simulations including MG models relying on MG-PICOLA, covering 256 h−1 Mpc side cubical volumes with 1283 particles. Results. BNNs excel in accurately predicting parameters for Ωm and σ8 and their respective correlation with the MG parameter. Furthermore, we find that BNNs yield well-calibrated uncertainty estimates that overcome the over- and under-estimation issues in traditional neural networks. The MG parameter leads to a significant degeneracy, and σ8 might be one possible explanation of the poor MG predictions. Ignoring MG, we obtain a deviation of the relative errors in Ωm and σ8 by 30% at least. Moreover, we report consistent results from the density field and power spectrum analysis and comparable results between BLL and FullB experiments. This halved the computing time. This work contributes to preparing the path for extracting cosmological parameters from complete small cosmic volumes towards the highly nonlinear regime.
14 June 2024 in International Journal of Data Science and Analytics
Recently, deep learning techniques are gradually replacing traditional statistical and machine learning models as the first choice for price forecasting tasks. In this paper, we leverage probabilistic deep learning for inferring the volatility index VIX. We employ the probabilistic counterpart of WaveNet, Temporal Convolutional Network (TCN), and Transformers. We show that TCN outperforms all models with an RMSE around 0.189. In addition, it has been well known that modern neural networks provide inaccurate uncertainty estimates. For solving this problem, we use the standard deviation scaling to calibrate the networks. Furthermore, we found out that MNF with Gaussian prior outperforms Reparameterization Trick and Flipout models in terms of precision and uncertainty predictions. Finally, we claim that MNF with Cauchy and LogUniform prior distributions yield well-calibrated TCN, and Transformer and WaveNet networks being the former that best infer the VIX values for one and five-step-ahead forecasting, and the probabilistic Transformer model yields an adequate forecasting for the COVID-19 pandemic period.