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.
6 February 2020 in Proceedings of the Northern Lights Deep Learning Workshop
Adversarial Examples represent a serious problem affecting the security of machine learning systems. In this paper we focus on a defense mechanism based on reconstructing images before classification using an autoencoder. We experiment on several types of autoencoders and evaluate the impact of strategies such as injecting noise in the input during training and in the latent space at inference time.We tested the models on adversarial examples generated with the Carlini-Wagner attack, in a white-box scenario and on the stacked system composed by the autoencoder and the classifier.
Word embeddings based on a conditional model are commonly used in Natural Language Processing (NLP) tasks to embed the words of a dictionary in a low dimensional linear space. Their computation is based on the maximization of the likelihood of a conditional probability distribution for each word of the dictionary. These distributions form a Riemannian statistical manifold, where word embeddings can be interpreted as vectors in the tangent space of a specific reference measure on the manifold. A novel family of word embeddings, called -embeddings have been recently introduced as deriving from the geometrical deformation of the simplex of probabilities through a parameter , using notions from Information Geometry. After introducing the -embeddings, we show how the deformation of the simplex, controlled by , provides an extra handle to increase the performances of several intrinsic and extrinsic tasks in NLP. We test the -embeddings on different tasks with models of increasing complexity, showing that the advantages associated with the use of -embeddings are present also for models with a large number of parameters. Finally, we show that tuning allows for higher performances compared to the use of larger models in which additionally a transformation of the embeddings is learned during training, as experimentally verified in attention models.