Title: MIXTURE DISTRIBUTIONS FOR SCALABLE BAYESIAN INFERENCE

Abstract: Bayesian Neural Networks (BNNs) provides a mathematically grounded framework to quantify uncertainty. However BNNs are computationally inefficient, thus are generally not employed on complicated machine learning tasks. Deep Ensembles were introduced as a Bootstrap inspired frequentist approach to the community, as an alternative to BNN's. Ensembles of deterministic and stochastic networks are a good uncertainty estimator in various applications (Although, they are criticized for not being Bayesian). We show Ensembles of deterministic and stochastic Neural Networks can indeed be cast as an approximate Bayesian inference. Deep Ensembles have another weakness of having high space complexity, we provide an alternative to it by modifying the original Bayes by Backprop (BBB) algorithm to learn more general concrete mixture distributions over weights. We show our methods and its variants can give better uncertainty estimates at a significantly lower parametric overhead than Deep Ensembles. We validate our hypothesis through experiments like non-linear regression, predictive uncertainty estimation, detecting adversarial images and exploration-exploitation trade-off in reinforcement learning.

1. INTRODUCTION:

Neural Networks models have been applied in diverse fields from weather forecasting, to autonomous vehicle driving, to online advertisement and many more (Goodfellow et al. (2016) ). However, vanilla feed-forward NNs are susceptible to the problem of over-fitting. In addition to this, NNs trained using Maximum Likelihood Estimation (MLE), or Maximum A Posteriori (MAP) cannot provide an estimate of the uncertainty in predicted value and tend to produce overconfident results on out-of-distribution test data. Thus we aim to build deep learning frameworks which are more robust, secure and reliable -specifically, in the face of uncertainty we would like the model to be able to say "I Don't Know!" A principled approach to build such models is through Bayesian inference, where instead of a point estimate for the network parameters, we infer the posterior distribution of the weights given the data. The predictive distribution of unseen data (x * , y * ) is given by q(y * |x * ) = p(y * |x * , W )p(W |D)dW , where p(W |D) is the true posterior computed from Bayes rule. Unfortunately, since modern NNs have an exponentially large number of parameters and do not lend themselves to being integrated into mathematical equations, exact inference remains intractable.

Several methods for approximate Bayesian inference have been investigated. Until now, Hamiltonian Monte Carlo (HMC) (Neal ( 2012)) has been considered the gold standard for approximate Bayesian inference. However, HMC requires explicit storage of samples from the posterior and is typically not scalable to larger networks and datasets. Thus methods based on Variational Inference (VI) have gained popularity recently for the task of approximate inference. VI relies on using a surrogate posterior (q θ (W )) as an approximation for the true posterior. One of the first application of VI in NNs was by Hinton & Van Camp (1993) but the optimization remained intractable for most Bayesian Neural Networks (BNNs). Graves (2011) revisited similar ideas and proposed a simple but biased estimator for performing VI with a fully factorized posterior (mean field assumption).

Recently, Bayes-by-Backprop algorithm (BBB) also employed VI using an unbiased estimator for Variational loss, a fully factorized Gaussian posterior and a non-Gaussian prior Blundell et al. (2015) . Interestingly, Gal & Ghahramani (2016) showed links between Bernoulli Dropout (Srivastava et al. (2014) , Hinton et al. (2012) ) and approximate inference in Deep Gaussian Process (Damianou & Lawrence (2013) ), thus allowing for the extraction of uncertainty estimates of a NN in a principled way. Louizos & Welling (2016) arrived at the same conclusion through structured posterior approximations via matrix variate Gaussian Posterior (Gupta & Nagar (2018) ) and local reparameterization trick (Kingma et al. (2015) ).

Bayesian methods are far more computationally expensive, as compared to standard NNs, making Deep Ensembles a very attractive alternative as they scale well to large datasets and models. The intuition behind Deep Ensembles is straightforward, NNs initialized and trained independently can be expected to output similar predictions on training data, while disagreeing on points away from training set. Despite their empirical success in uncertainty estimation and adversarial robustness (Lakshminarayanan et al. (2017) , Strauss et al. (2018) ), Deep Ensembles have lacked theoretic support from the Bayesian perspective. Thus, it is interesting to see how ensembles of deterministic and stochastic NNs can be placed into the VI framework. Another drawback of Deep Ensembles is their heavy parametric overhead. We modify the BBB algorithm to learn mixture distributions rather than the unimodal Gaussian distribution, which reduces this burden. We further show that this way, Deep Ensembles can be linked with the Bayesian framework. In essence, using our methods, we are able to achieve accuracy and uncertainty estimates (with lower parametric cost) which are never worse than Deep Ensembles, BBB, Concrete Dropout Contributions: We design an efficient and simple way of sampling from mixture distributions which incorporates the "local reparameterization trick" (Kingma et al. (2015) ) to obtain low variance gradients for tuning of parameters in mixture distributions. This is also of independent interest for designing more complex posteriors using any mixture distributions besides the ones used in this paper. We also fit ensembles of deterministic and Bayesian NNs into VI framework with no changes made to the original algorithm. We improve upon the uncertainty estimates of Deep Ensembles by using mixture distribution with relatively less number of parameters.

Distribution of the paper -In section 2, we show how the original BBB algorithm can be modified for generalized mixture distributions while remaining back-prop compatible. For simplicity, we stick to a mixture of Gaussian's. In section 3, we provide links between Ensembles and VI with mixture distributions. Section 4 contains experiments that demonstrate that our methods generate superior uncertainty estimates as compared to unimodal distributions or Deep Ensembles.

2. CONCRETE MIXTURE OF GAUSSIAN:

A feed-forward network trained with gradient descent will arrive at point estimates. However, in the case of BNNs, the weights are not point estimates but a probability distribution. Let us revisit the problem of finding a functional relationship y = f W (x) between input x and output y, given a labelled training dataset D = {(x 1 , y 1 ), (x 2 , y 2 ), . . . } from a Bayesian standpoint. Our task is to find a distribution over the parameters p(W |D), given the input data. Given this posterior, we can predict test output y * given a new test input x * by marginalizing the likelihood over the space of parameters W . However, even for modest sized NNs, the number of uncertain parameters prohibit this calculation analytically. We require approximate inference methods in such cases. We define an approximating variational distribution q θ (W ) with parameters θ. We would minimize the Kullback-Leibler (KL) Divergence with respect to the parameters θ to maximize the similarity between proposed posterior and the true posterior. Note that the problem of minimizing KL Divergence can be reformulated to minimizing of another term usually called the Variational free energy in literature Friston et al. (2007) , Blundell et al. (2015) . Evaluating the objective of maximizing this is computationally expensive for large datasets therefore. Thus we split the entire data into M mini batches D 1 , D 2 , . . . , D M . The unbiased Monte Carlo (MC) approximation to the minibatch cost it given as:

EQUATION

In order to use stochastic backpropogation, we need the MC sample W j to be reparameterized as g(θ, ). We shall see how this is possible for Mixture of Gaussians (MoG) next.

2.1 SAMPLING FROM CONCRETE MIXTURE OF GAUSSIAN Blundell et al. (2015) proposed the Bayes-by-Backprop algorithm for tuning of weight posterior's parameters. For simplicity, the posterior was assumed to be fully factorized Gaussian. The assumption of fully factorized posterior is also known as the Mean Field assumption in the literature. We show method to sample from for mixture of Gaussian (MoG) for independent weights and mixture of matrix variate Gaussian (MoMG) for correlated weights, while still being able to use the local reparameterization trick. This method can be extended for any mixture of distributions in general.

q θ (W ) = N i=1 N(w i ; µ i , σ 2 i ) θ = (µ i , σ 2 i ) (i=1

To sample weight w from a mixture of K Gaussians i.e. w ∼ q θ (w) = K j=1 p j N(w; µ j , σ 2 j ), K j=1 p j = 1, we assume a latent random variable which governs the component of the mixture that generates the value of w. We assume the latent random variable to be uniform random variable u i.e. u ∼ Uniform[0,1] . The latent random variable u has a p j probability of being in the range [p j-1 , p j + p j-1 ), similarly it has p j+1 probability of being in between [p j + p j-1 , p j + p j-1 + p j+1 ) and so on, thus if u falls in the range [p j-1 , p j + p j-1 ) we sample from the j'th distribution N(w; µ j , σ 2 j ). For example when sampling from mixture of three Gaussian, we will have to first sample two random variables z p1 and z p1+p2 , which can be seen as correlated Bernoulli random variables.

u ∼ Uniform[0, 1], z p1 = 1 u<p1 , z p1+p2 = 1 u<p1+p2 and ∼ N(0, 1) w = z p1 (µ 1 + σ 1 ) + (1 -z p1 )(z p1+p2 )(µ 2 + σ 2 ) + (1 -z p1+p2 )(µ 3 + σ 3 ) (3)

Unfortunately, in the above case where we sample w from a multimodal distribution, local reparametrization trick cannot be applied. This is because the Bernoulli random variables z p1 and z p1+p2 can't be parameterized in the form of g(θ, ). So, we replace them with their continuous relaxation, the Concrete distribution Gal et al. (2017 ),Maddison et al. (2016) . This distribution can be viewed as softmax relaxation of the max function used in Gumbel-max trick Gal et al. (2017) . This allows us to represent the discrete random variable z p1 as ẑp1 = g(θ, ). Thus we replace z p1 and z p1+p2 in equation 4 with:

z p1 ≈ ẑp1 = sigmoid( 1 t .(log(p 1 ) -log(1 -p 1 ) + log(u) -log(1 -u)) z p1+p2 ≈ ẑp1+p2 = sigmoid( 1 t .(log(p 1 + p 2 ) -log(1 -p 1 -p 2 ) + log(u) -log(1 -u)) (4)

where, t is the temperature term and is usually kept as 0.1 or 0.01 (<<1 to guarantee most of the mass of the pdf is around 0 and 1). So, we have now successfully reparameterized w as g(θ, ) where θ = (µ 1 ,σ 1 ,µ 2 ,σ 2 ,µ 3 ,σ 3 ,p 1 ,p 2 ). To prevent parametric explosion, we assume p 1 , p 2 are same for the entire layer. This is similar to assuming that Dropout parameter p is the same for entire layer. Thus now, with mean field assumption we can now define the posterior of the weight matrix W from mixture of K Gaussians as:

EQUATION

To model the correlations among the weights it is possible for us the treat the entire weight matrix W of a layer, as a MoMG Gupta & Nagar (2018) i.e. p(W

) = i p i MN(M i , U i , V i ), where p(W ) = MN(M i , U i , V i ) = exp(-1 2 tr[V -1 i (W -M i ) T U -1 i (W -M i )]) (2π) rc/2 |V i | c/2 |U i | r/2 (6)

M i is a r × c matrix and is the mean of the distribution, U i is a r × r matrix that provides covariance of the rows and V i is a c × c matrix that governs the covariance of the columns of the matrix. It has been shown by Gupta et al. in Gupta & Nagar (2018) that matrix variate distributions are essentially multivariate Gaussian.

p(vec(W )) = N(vec(M i ), V i ⊗ U i ), ⊗ is the Kronecker product (7)

Thus, now instead of treating each weight independently we are now able to sample directly from its joint distribution which is assumed to be a MoMG. For sampling from a mixture of 2 matrix variate

Gaussian, W = z p (M 1 + U 1 2 1 EV 1 2 1 ) + (1 -z p )(M 2 + U 1 2 2 EV 1 2

2 ))where E i,j ∼ N(0, 1). We replace z p with its continuous relaxed version ẑp , thus making it possible to use the local reparameterization trick. We assume U i = diag(σ 2 ri ) and V i = diag(σ 2 ci ) i.e. independent rows and columns in this paper. This allows us to reduce the number of parameters as compared to MoG, while still modelling correlations between weights. Now that we are able to sample from MoG and MoMG we need to be able to approximate D KL (q θ (W )||p(W )), where we assume a Gaussian prior i.e. p(W ) = N(0, l -2 I). We use Monte Carlo approximations similar to the one used in Blundell et al. (2015) for optimising the D KL (q θ (W )||p(W )).

For all following sections, we interchangeably use the name Concrete MoG (CMoG) and Concrete MoMG (CMoMG) for MoG and MoMG respectively.

3. DEEP ENSEMBLE AS BAYESIAN INFERENCE:

Deep Ensemble is a simple non-Bayesian framework which is able to predict uncertainty on out-ofdistribution samples. Deep Ensemble algorithm involves training M randomly initialized networks on independently sampled batches. Owing to its simplicity and scalability, Deep Ensemble is widely used for uncertainty estimation. This departure from Bayesian methodology to capture uncertainty is of concern since the Bayesian framework is a principled and widely accepted approach to capture uncertainty. Thus, it is indeed surprising to see that with no simplification made to the original Deep Ensemble algorithm described in Lakshminarayanan et al. ( 2017), we can show equivalence with the VI framework. In order to show the equivalence with VI, we assume the approximate posterior is a mixture of points or Gaussian (with σ → 0) in a high dimensional probability space. For example in case the network has only two layers with parameters W 1 and W 2 respectively, the joint distribution is

q(W 1 , W 2 |θ) = pN(M 1 , σ 2 I) + (1 -p)N(M 2 , σ 2 I)(σ → 0)

, where θ is the set of all variational parameters which in this case are M 1 and M 2 . We fix probability p = 1 2 . Note, M 1 = [M 11 , M 12 ] is the concatenation of the variational parameters of layer 1 and layer 2, and similarly, M 2 = [M 21 , M 22 ] is the concatenation of the variational parameters of layer 1 and layer 2 (Assuming we have a NN of only two layers for simplicity). For example if the first point is selected while sampling, we will have W 1 = M 11 and W 2 = M 12 , we will see that minimizing the KL divergence of this posterior with the true posterior is mathematically equivalent to the Deep Ensemble algorithm described above. For sampling, the W 1 and W 2 from the above posterior, we use the same sampling technique as described for MoG, except that here same random variable z p is tied to all variational parameters.

EQUATION

In MoG for every weight we had to sample a separate z p independently for each weight. This random variable tying is the only difference in sampling between the two, and this observation is a critical tool linking Deep Ensemble to VI Framework. Next we try to minimize the unbiased Monte Carlo (MC) estimate of the mini-batch variational free energy. Minimizing the mini-batch cost for mini-batch i = 1, 2 . . . M

w (i) ∼ q θ (w), L i V I-M C = -log(p(D (i) |w (i) )) + 1 M log(q(w (i) |θ)) - 1 M log(p(w (i) )) (9)

Note we have taken a MC estimate of the KL divergence too, but following Hoffman et al.

(2013),Kingma & Welling (2014) convergence to the same limit as the expectation of variational free energy is still guaranteed. Now assume a Gaussian prior i.e. P (w (i) ) = N(0, l -2 I). Note for p = 1 2 there are equal chance of having w (i) = M 1 or w (i) = M 2 , suppose for this batch i,

w (i) = M 1 L i V I-M C = -log(p(D (i) |M 1 )) + 1 M log( 1 2 ) + 1 M 1 2 l 2 ||M 1 || 2 2 (10)

We further simplify loss function for regression case, and fit a Gaussian with variance τ -1 (also called model precision), to the negative log-likelihood of the data i.e. p(y j |x j , M 1 ) = N(y j ; ŷj , τ -1 I). So, after dividing the whole equation by τ we have

L i V I-M C ∝ 1 2 j∈D i ||y j -ŷj || 2 2 + 1 M τ log( 1 2 ) + 1 M 1 2τ l 2 ||M 1 || 2 2 (11)

Minimizing the above equation can be seen as training a single NN with parameters M 1 on mini batch i with L2 regularization λ = 1 2M τ l 2 . Equivalently, there will be another mini-batch j where w (j) = M 2 , and minimizing the MC estimate of the variational free energy, in this case, will be equivalent to training a NN with parameters M 2 with the same regularization as before. This is equivalent to a Deep Ensemble of 2 NNs with parameters M 1 and M 2 which were randomly initialized and trained on independently sampled mini-batches as was in the original algorithm. The predictive distribution of unknown label y * is given as q(y * |x * ) = p(y * |x * , w)q(W |θ)dW = 1 2 p(y * |x * , M 1 ) + 1 2 p(y * |x * , M 2 ), which is a mixture of Gaussian and matches the predictive distribution of Deep Ensemble. Thus independently training an Ensemble of NN's can be seen as training a "hypothetical" Bayesian NN's with a specific mixture distribution.

Although we have shown equivalence for a specific case of 2 NNs, it can be easily generalized to N NNs, by considering an approximate posterior a mixture of N points and taking p = 1 N . Note that we can tune p's too by using the same concrete relaxation that we took in CMoG. We called this modified algorithm Concrete Ensemble.

Stein Variational Gradient Descent (SVGD) (Liu & Wang (2016) ) is particle based Bayesian approach and is close to Deep Ensembles. Both SVGD and Deep Ensembles can be viewed as particle filters trying to approximate an underlying distribution. The mini-batch SVGD update is given as

θ t+1 i = θ t i + 1 N N j=1 [k(θ t j , θ t i )∇ θ t j log(p(θ t j |D i )) + ∇ θ t j k(θ t j , θ t i )].

Ensembles have a mode seeking nature, whereas SVGD seek to maintain some level of diversity. SVGD is far less popular despite their similarity with Deep Ensembles because in practice, different initializations for large scale NNs suffice for capturing different modes, and thus, the additional time complexity overhead of O(N 2 ) for computing the kernel is not justified by empirical results.

More specifically, if f θ (w) = 1 N N i=1 f i (w; θ i ), where θ i are independent variational parameters, and f i (w) could be any arbitrary distribution. Let us define L(θ) as the Variational Free Energy of the mixture distribution f θ (w), and L(θ i ) as the Variational Free Energy of the individual mixture component f i (w; θ i ). We can approximately bound L(θ) as;

1 N N i=1 L(θ i ) -H( 1 N ) ≤ L(θ) ≤ 1 N N i=1 L(θ i )

, where H(p ) is the entropy. So, individually optimizing θ i 's (since they are independent of each other) is also minimizing the variational free energy of the mixture distribution, and interestingly increasing the ensemble size increases the tightness of the bound.The upper bound is arrived at using the convexity of KL divergence and the lower bound is obtained by further lower bounding the variational approximation to KL divergence between mixture distributions (Durrieu et al. (2012) ). See Appendix A.2 for more details Simple arguments that will allow us to extend this proof to ensemble of arbitrary architecture of Neural Networks have been added to Appendix 3.

4. EXPERIMENTS:

The following networks are used in experiments: Normal feed forward Multi Layer Perceptron (MLP), Deep Ensemble of 3 NN (Ensemble)(Lakshminarayanan et al. ( 2017)), Concrete Deep Ensemble of 3 NN (CEnsemble), Concrete Mixture of 3 Gaussain (CMoG) with p's tied for each layer (3 p's per layer), Concrete Mixture of 2 Matrix Variate Gaussian (CMoMG), Bayes by Backprop (BBB) (Blundell et al. (2015) ) and Concrete Dropout (CDropout) (Gal et al. (2017) ).

4.1. REGRESSION TASK:

We use Concrete mixture of Gaussian, and Concrete Ensemble described above to fit y = x 3 for -4 < x < 4, and observe the estimation for -6 < x < 6. We observe our algorithms (CMoG and CMoMG) can predict uncertainty in out of training data points much better compared to the uncertainty estimation with vanilla NN or previous uncertainty estimation frameworks like MC-Dropouts Gal (2016) , Ensemble, BBB, and Concrete dropouts. For both CMoG (we consider a mixture of 2 and 3 Gaussian) and Concrete Ensemble, we use fully connected feed forward NN with two hidden layers of size 100 each and ReLU activation, and performed a forward pass ten times, with result averaging for training, and for testing, performing a forward pass on trained NN forty times. We perform this experiment thrice and average the results. Figure 1 compares uncertainty estimation using CMoG and Concrete Ensemble with previous frameworks for the same architecture as described above. In this subsection, we show advantage of using multimodal posterior for fully connected feed forward networks. We first describe results for our methods on the classification task of MNIST digit dataset (LeCun et al. (2010) ). We use a fully connected network with two hidden layers having 1000 and 600 units respectively and ReLU activation. The last layer is a softmax layer with ten units. Refer appendix section for accuracy obtained and no. of parameters used. Now, we assess how our methods behave when test data does not lie on the training manifold. Overconfident predictions on such data are one of the most important challenges for reliable deployment of deep learning methods in the real world. The expectation is that if the input image does not lie on the training manifold, then the predictive uncertainty should be high. We use the same architecture as described above for the remaining subsection.

The first experiment we do is evaluate the predictive uncertainty of model trained on MNIST dataset on Fashion MNIST dataset (Xiao et al. (2017) ). This is similar to MNIST-NotMNIST experiment done by Lakshminarayanan et al. (2017) . As the images in Fashion MNIST dataset are completely different than in MNIST, ideally a trained model should be very uncertain about its prediction. Figure 3 shows the histogram of entropy of the output of trained models using different methods on test MNIST, and test Fashion MNIST data. MLP and Concrete Dropout are overconfident on predictions for Fashion MNIST data. Deep Ensemble and CEnsemble show an increase in no. of data points showing high entropy. BBB shows significant improvement over previously described methods. CMoMG shows comparable results with BBB even after having more modes indicating that the assumption of independent rows and columns may not be best for capturing uncertainty. CMoG gives the best results by far, which are also near ideal expectations. For second and third experiment we use more sophisticated methods for analyzing behavior of predictive uncertainty of model as done in Li & Gal (2017) . We don't include MLP and Concrete Dropout for these experiments for better clarity (they perform significantly worse). The second experiment considers single gradient step Fast Gradient Sign (FGS) method (Goodfellow et al. (2014) ). The method generates an adversarial input by adding small perturbations to an input image by moving in the direction which reduces predicted class probability. 

EQUATION

We fix η to 0.01 and iteratively update for 100 iterations. The results obtained are shown in Figure 5 . CMoMG has the slowest decaying and slowest rising true class and target class accuracy respectively making it more robust against targeted attack. CMoG has highest rise in predictive entropy, making it more suited for identifying adversarial attack. We note that for iteration 30-100, CMoMG has better ability to identify an adversarial input. Both these methods having multi-modal posterior perform better than BBB and Ensemble based methods.

More detailed analysis is required for examining the performance of our methods on adversarial attacks, but we conclude from the experiments that multi-modal posterior based methods are well suited for capturing uncertainty.

4.3. UNCERTAINTY ESTIMATION ON ALEXNET AND RESNET:

We implement multimodal posterior for AlexNet (Krizhevsky et al. (2012) ) and ResNet (He et al. (2016) )for getting better uncertainty estimates. The posterior used is only for fully connected layers before final layer thus, with less no. of parameters than Deep Ensemble. All the other layers except fully connected layer have been used with spatial concrete dropout. Refer appendix section for accuracy obtained and no. of parameters used.

We repeat the MNIST-FashionMNIST experiment done in subsection 4.2 for AlexNet. Figure 6 (L) shows the result obtained. We have shown CDF for better comparison. Note that, even with slightly less no. of parameters CMoG provides considerable improvement over Deep Ensembles while BBB This further proves that we can indeed get better uncertainty estimates for deep networks by using multimodal posterior on few layers with only a small increase in parameters over normal network.

4.4. CONTEXTUAL BANDIT:

We consider an online learning task (Mushroom Bandit Task Collier & Llorens (2018) , Blundell et al. (2015) ) to get a clear handle on the usefulness of uncertainty estimates. In an online setup, the agent plays her action based on a policy π. Based on this action, the environment reveals a stochastic reward. The objective of online learning is to Update the policy π as more and more data is revealed to maximize the cumulative reward received. Since the reward revealed is a noisy reward, online learning algorithms face a fundamental dilemma: exploration v/s exploitation. Typically, online learning algorithms explore in high uncertainty environments and exploit in low uncertainty setups.

We train a contextual neural bandit to learn the dependency between the context and optimal action as per the pseudo-algorithm given in Collier & Llorens (2018) . We train the NN based on BBB, CMoG, Ensemble, CEnsemble, and CMoMG. The regret variation is shown in figure 7 with the results have been averaged over three trials.

The MoG agent achieves a balance between eating and ignoring mushrooms more quickly than an ensemble network and incurs the least regret. Similarly, Matrix Variate based CMoMG can estimate uncertainty better than BBB and learns the context much faster. Thus, we can see that the ability to capture multiple modes provides us superior estimates of uncertainty, allowing us to balance exploration-exploitation in a better way. Variational free energy has two components the Expected loss and the KL divergence between the assumed posterior and the prior. Now because the Expectation over a mixture distribution is equal to the sum over expectation of individual components all we need to do is bound the KL divergence between mixture distribution and true posterior in terms of KL divergence between individual mixture components and the true posterior.

Thus we want to bound the KL divergence between f(x) and g(x) where

f θ (x) = N i=1 p i f i (x; θ i )

p i is the weight of the component individual i in the mixture distribution.

A simple upper bound can be achieved using convexity of KL distance as

EQUATION

Keeping p i fixed as 1 N will give us the desired upper bound We can also find the lower bound using the Variational Approximation (Hershey & Olsen (2007) ) by first splitting the KL divergence into two components-

EQUATION

We can use Jensen's inequality to get the appropriate lower bound for the first term as- 

:



Figures and Tables:

Figure 1: Uncertainty estimates (±1 std ) for out of distribution samples on toy regression data

Figure 3: MNIST-FashionMNIST : Histogram (200 bins) of entropy obtained on MNIST and Fashion MNIST test data

Figure 5: Targeted Attack: Classification accuracy for target class '0' and true class and predictive entropy vs. iterations. The adversarial images are shown(top to bottom) for BBB, CEnsemble, Ensemble, CMoG, and CMoMG

Figure 6: Predictive Entropy CDF: AlexNet on FashionMNIST (L), ResNet on SVHN (R) We repeat the same experiment but now for CIFAR-10 (Krizhevsky et al.) -SVHN (Netzer et al. (2011)), using ResNet-20. Figure 6(R) shows the uncertainty obtained on SVHN dataset after training the model on CIFAR-10 dataset. A clear improvement on uncertainty estimation can be observed for CMoG over Deep Ensembles with significantly less no. of parameters. This further proves that we can indeed get better uncertainty estimates for deep networks by using multimodal posterior on few layers with only a small increase in parameters over normal network.

Figure 7: Cumulative Regret Variation for Mushroom Bandit Task

x) log(p j f j (x)/φ ji )Maximizing the lower bound wrt φ ji under the constraint φ ji ≥ 0 and j φ ji = 1, ∀ i,j we getE f (log(f (x))Subtracting the two gives us the Variational Approximation(Hershey & Olsen (2007)) to KL divergenceD var (f ||g) = N i=1 p i D KL (f i ||g) + N i=1 p i log( N j=1p j e -D KL (fi||fj ) )Durrieu et al. (2012) empirically showed this approximation to be closer to D KL (f ||g) than most other approximations, thus D var (f ||g) ≈ D KL (f ||g)

reports the test accuracy obtained on MNIST with Fully connected network and results were averaged over three trials. The accuracy of CMoG , CEnsemble and CMoMG are better or comparable to benchmark MLP, BBB, Deep Ensemble and Concrete Dropout with the same architecture.Table3reports the test accuracy obtained on CIFAR-10 with Resnet-20 and results were averaged over three trials.

Table content: <table><tr><td/><td colspan="2">Table 1: Test Accuracy on MNIST</td></tr><tr><td>Method</td><td colspan="2">Test Accuracy No. of parameters (in Millions)</td></tr><tr><td>MLP</td><td>98.28</td><td>1.39</td></tr><tr><td>Concrete Dropout</td><td>98.8</td><td>1.39</td></tr><tr><td>Deep Ensemble</td><td>98.51</td><td>4.17</td></tr><tr><td>BBB</td><td>98.44</td><td>2.78</td></tr><tr><td colspan="2">Concrete Ensemble 98.57</td><td>4.17</td></tr><tr><td>CMoG</td><td>98.6</td><td>8.34</td></tr><tr><td>CMoMG</td><td>98.66</td><td>2.79</td></tr><tr><td colspan="3">Table 2 reports the test accuracy obtained on MNIST with AlexNet and results were averaged over</td></tr><tr><td>three trials.</td><td/><td/></tr><tr><td/><td colspan="2">Table 2: Test Accuracy on MNIST</td></tr><tr><td colspan="3">Method (Dataset) Test Accuracy No. of parameters (in Thousands)</td></tr><tr><td>CMoG</td><td>99.36</td><td>44.94</td></tr><tr><td>BBB</td><td>99.26</td><td>21.58</td></tr><tr><td>Deep Ensemble</td><td>99.29</td><td>48.25</td></tr><tr><td>CMoMG</td><td>99.18</td><td>29.38</td></tr></table>

Test Accuracy on CIFAR-10 Table 4 reports the Expected Calibration Error (ECE) on CIFAR-10 with Resnet-20 and results were averaged over three trials.

Table content: <table><tr><td colspan="3">Method (Dataset) Test Accuracy No. of parameters (in Millions)</td></tr><tr><td>CMoG</td><td>91.9</td><td>0.273</td></tr><tr><td>BBB</td><td>91.01</td><td>0.271</td></tr><tr><td>Deep Ensemble</td><td>92.1</td><td>0.81</td></tr><tr><td/><td colspan="2">Table 4: ECE on CIFAR-10</td></tr><tr><td/><td>Method</td><td>ECE</td></tr><tr><td/><td>CMoG</td><td>0.019</td></tr><tr><td/><td colspan="2">MoG (categorical p) 0.023</td></tr><tr><td/><td>Deep Ensemble</td><td>0.018</td></tr></table>

Peer review (iclr2020):
The authors interpret Deep Ensemble as a special type of variational inference. Based on Bayes by Backprop which uses a Gaussian approximation to the posterior, the authors propose to use a mixture of Gaussians. The proposed methods have been tested on a regression task and Bayesian neural networks. The authors argue that Deep ensemble is equivalent to variational inference with a mixture of Gaussians approximation with variance going to 0. It is not surprising that Deep ensemble is equivalent to variational inference with learning the mean only. I’m not sure how useful this argument is since learning the distribution, not only the mean, is the key factor of being Bayesian. Using a mixture of Gaussians rather than a Gaussian in Bayes by Backprop is a natural extension and therefore the novelty seems low. In the experiments, I’m surprised to see that Bayes by Backprop fails to give any uncertainty estimate on the simple regression experiment. From the figure, BBB seems to be very confident about its prediction. However, it has been demonstrated in the literature that BBB is able to perform fairly well on this kind of regression. Can the authors give explanations on why it performs badly here? Also, I do not see why it is important to model multiple modes on this task. I believe a Gaussian approximation is able to work well. The multimodality here is likely induced by the symmetric parameterization of neural networks and trying to capture this kind of multimodality will be meaningless and even problematic. By looking at Figure 2, it seems like the posterior of the proposed method is close to being unimodal. Why is it beneficial to use a mixture of Gaussians under this situation? The axis and labels in the figures are very small and hard to read. Eq. (2) is overlapped with the above text.