text stringlengths 128 2.05k |
|---|
4.3 Robustness of connectome-initialized networks Although networks initialized with random weights were also able to track objects (Section 4.1 ), the circuitry recovered to achieve this does not correspond to physiology, unlike networks initialized with synapse counts. The high disparity between connectome-based and ... |
. We found that random weights trained networks also recovered DS responses for some neurons (Figure ) at sufficiently dissimilar angles (T3: [MATH] and L4: [MATH] ). Solutions initialized at random are also very unstable, and adding [MATH] multiplicative noise to the initialization leads to different neurons becoming ... |
Our Takemura 2017 model with connectome-based weights, on the other hand, is robust against up to [MATH] multiplicative noise, at which point it still recovers identical, although less sharply tuned, responses for T4a-T4d. Additionally, it enabled T5a to become direction selective, although at the wrong angle ( [MATH] ... |
Discussion Our model predicted accurate responses for all T4 cells and demonstrates that functional information can be gained by means of fine-tuning a model initialized with weights derived from electron microscopic reconstructions with only minimal additional assumptions about synaptic delays. Remarkably, the model c... |
, but instead through a visual proxy-task with 4 predicted variables. We acknowledge that not all neurons took on their expected ON/OFF responses suggested in the literature. While for example Mi1, Tm3 and Mi4 (ON) and Tm1, Tm2, Tm4, Tm9 (OFF) are responding as expected, Mi9 shows ON characteristics instead of OFF (as ... |
. The incomplete reconstructions from were not sufficient. Note also that neurons with large tangential branches such as Mt8, Mi11 or Tm28 within the medulla were also not included in our model |
We also anticipate that our model could be useful to also test later stages of fly vision, such as vertical and horizontal system cells |
, object-detecting neurons such as LC11 and visual projection neurons . These steps await further dense EM reconstructions of the lobula and lobula plate. With more complete models, we expect to be able to extract further characteristics such as object detection, color vision and rotational movement sensitivity from st... |
# Source: arxiv 1806.04854 # Title: Fast and Scalable Bayesian Deep Learning by Weight-Perturbation in Adam # Sections: all # Downloaded: 2026-03-03T02:19:49.694400+00:00 |
Fast and Scalable Bayesian Deep Learning by Weight-Perturbation in Adam Abstract Uncertainty computation in deep learning is essential to design robust and reliable systems. Variational inference (VI) is a promising approach for such computation, but requires more effort to implement and execute compared to maximum-lik... |
Bayesian deep learning, uncertainty estimation, Bayesian neural networks, variational inference, variational optimization, Adam, Vadam, Vprop, natural momentum |
Introduction Deep learning methods have had enormous recent success in fields where prediction accuracy is important, e.g., computer vision and speech recognition. However, for these methods to be useful in fields such as robotics and medical diagnostics, we need to know the uncertainty of our predictions. For example,... |
One of the goals of Bayesian inference is to provide uncertainty estimates by using the posterior distribution obtained using Bayes’ rule. Unfortunately, this is infeasible in large models such as Bayesian neural networks. Traditional methods such as Markov Chain Monte Carlo (MCMC) methods converge slowly and might req... |
Despite their simplicity, these VI methods require more computation, memory, and implementation effort compared to maximum-likelihood estimation (MLE). One reason for this is that the number of parameters in VI is usually much larger than in MLE, which increases the memory and computation costs. Another reason is that ... |
In this paper, we propose to use natural-gradient methods to address these issues for Gaussian mean-field VI. By proposing a natural-momentum method along with a series of approximations, we obtain algorithms that can be implemented with minimal changes to the existing codebases of adaptive learning-rate methods. The m... |
1.1 Related Work Bayesian inference in models such as neural networks has a long history in machine learning MacKay 2003 Bishop 2006 . Earlier work proposed a variety of algorithms such as MCMC methods Neal 1995 , Laplace’s method Denker & Lecun 1991 , and variational inference Hinton & Van Camp 1993 Barber & Bishop 19... |
Recent approaches Graves 2011 Blundell et al. 2015 enable the application of Gaussian mean-field VI methods to large deep-learning problems. They do so by using gradient-based methods. In contrast, we propose to use natural -gradient methods which, as we show, lead to algorithms that are simpler to implement and requir... |
A recent independent work on noisy-Adam by Zhang et al. 2018 is algorithmically very similar to our Vadam method, however their derivation lacks a strong motivation for the use of momentum. In our derivation, we incorporate a natural-momentum term based on Polyak’s heavy-ball method, which provides a theoretical justif... |
Zhang et al. 2018 also propose an interesting extension by using K-FAC, which could find better approximations than the mean-field method. The goal of this approach is similar to other approaches that employ structured approximations Ritter et al. 2018 Louizos & Welling 2016 Sun et al. 2017 Many other works have explor... |
Another related work by Mandt et al. 2017 views SG descent as VI but requires additional effort to obtain posterior approximations, while in our approach the approximation is automatically obtained within an adaptive method. |
Our weight-perturbed algorithms are also related to global-optimization methods, e.g., Gaussian-homotopy continuation methods Mobahi & Fisher III 2015 , smoothed-optimization method Leordeanu & Hebert 2008 , graduated optimization method Hazan et al. 2016 , and stochastic search methods Zhou & Hu 2014 In particular, ou... |
Gaussian Mean-Field Variational Inference We consider modeling of a dataset [MATH] by using a deep neural network (DNN). We assume a probabilistic framework where each data example [MATH] is sampled independently from a probability distribution [MATH] parameterized by a DNN with weights [MATH] , e.g., the distribution ... |
Bishop 2006 One of the most popular approaches to estimate [MATH] given [MATH] is maximum-likelihood estimation (MLE), where we maximize the log-likelihood: [MATH] This optimization problem can be efficiently solved by applying SG methods such as RMSProp, AdaGrad and Adam. For large problems, these methods are extremel... |
One of the goals of Bayesian deep learning is to go beyond MLE and estimate the posterior distribution of [MATH] to obtain an uncertainty estimate of the weights. Unfortunately, the computation of the posterior is challenging in deep models. The posterior is obtained by specifying a prior distribution |
[MATH] and then using Bayes’ rule: [MATH] This requires computation of the normalization constant [MATH] which is a very difficult task for DNNs. One source of the difficulty is the size of [MATH] and [MATH] which are usually very large in deep learning. Another source is the nonconjugacy of the likelihood [MATH] and t... |
Bishop 2006 As a result, the product [MATH] does not take a form with which [MATH] can be easily computed. Due to these issues, Bayesian inference in deep learning is computationally challenging. |
Variational inference (VI) simplifies the problem by approximating [MATH] with a distribution [MATH] whose normalizing constant is relatively easier to compute. Following previous work Ranganath et al. 2014 Blundell et al. 2015 Graves 2011 , we choose both [MATH] and [MATH] to be Gaussian distributions with diagonal co... |
[EQUATION] where [MATH] is a known precision parameter with [MATH] , and [MATH] are mean and standard deviation of [MATH] . The distribution [MATH] is known as the Gaussian mean-field variational distribution and its parameters [MATH] and [MATH] can be obtained by maximizing the following variational objective |
[EQUATION] A straightforward approach used in the previous work Ranganath et al. 2014 Blundell et al. 2015 Graves 2011 is to maximize [MATH] by using an SG method, e.g., we can use the following update: |
[EQUATION] where [MATH] is the iteration number, [MATH] denotes an unbiased SG estimate of [MATH] at [MATH] with respect to [MATH] , and [MATH] are learning rates which can be adapted using methods such as RMSprop or AdaGrad. These approaches make use of existing codebases for adaptive learning-rate methods to perform ... |
Despite this, a direct application of adaptive learning-rate methods for VI may result in algorithms that use more computation and memory than necessary, and also require more implementation effort. Compared to MLE, the memory and computation costs increase because the number of parameters to be optimized is doubled an... |
The algorithms developed in this paper solve some of these issues and can be implemented within Adam with minimal changes to the code. We derive our algorithm by approximating a natural-gradient method and then using a natural-momentum method. We now describe our method in detail. |
Approximate Natural-Gradient VI In this section, we introduce a natural-gradient method to perform VI and then propose several approximations that enable implementation within Adam. |
Natural-gradient VI methods exploit the Riemannian geometry of [MATH] by scaling the gradient with the inverse of its Fisher information matrix (FIM). We build upon the natural-gradient method of Khan & Lin 2017 , which simplifies the update by avoiding a direct computation of the FIM. The main idea is to use the expec... |
For Gaussian mean-field VI, the method of Khan & Lin 2017 gives the following update: [EQUATION] where [MATH] is a scalar learning rate and [MATH] denotes the element-wise product between vectors [MATH] and [MATH] . We refer to this update as natural-gradient variational inference (NGVI). A detailed derivation is given... |
The NGVI update differs from ( ) in one major aspect: the learning rate [MATH] in ( ) is adapted by the variance [MATH] This plays a crucial role in reducing the NGVI update to an Adam-like update, as we show the next section. The update requires a constraint [MATH] but, as we show in Section 3.2 , we can eliminate thi... |
3.1 Variational Online-Newton (VON) We start by expressing the NGVI update in terms of the MLE objective, so that we can directly compute gradients on the MLE objective using backpropagation. We start by defining the MLE objective (denoted by [MATH] ) and minibatch stochastic-gradient estimates (denoted by [MATH] ): |
[EQUATION] where [MATH] is the negative log-likelihood of [MATH] ’th data example, and the minibatch [MATH] contains [MATH] examples chosen uniformly at random. Similarly, we can obtain a minibatch stochastic-approximation of the Hessian which we denote by [MATH] |
As we show in Appendix , the NGVI update can be written in terms of the stochastic gradients and Hessian of [MATH] [EQUATION] where [MATH] is an element-wise division operation between vectors [MATH] and [MATH] , and we have approximated the expectation with respect to [MATH] using one Monte-Carlo (MC) sample [MATH] wi... |
The Hessian can be computed by using methods such as automatic-differentiation or the reparameterization trick. However, since [MATH] is a non-convex function, the Hessian can be negative which might make [MATH] negative, in which case the method will break down. One could use a constrained optimization method to solve... |
3.2 Variational Online Gauss-Newton (VOGN) To avoid negative variances in the VON update, we propose to use the Generalized Gauss-Newton (GGN) approximation Schraudolph 2002 Martens 2014 Graves 2011 |
[EQUATION] where [MATH] is the [MATH] ’th element of [MATH] . This approximation will always be nonnegative, therefore if the initial [MATH] at [MATH] is positive, it will remain positive in the subsequent iterations. Using this approximation to update [MATH] in ( ) and denoting the vector of [MATH] by [MATH] , we get, |
[EQUATION] Using this update in VON, we get the “variational online Gauss-Newton” (VOGN) algorithm. The GGN approximation is proposed by Graves 2011 for mean-field Gaussian VI to derive a fast gradient-based method (see Eq. (17) in his paper ). This approximation is very useful for our natural-gradient method since it ... |
How good is this approximation? For an MLE problem, the approximation error of the GGN in ( ) decreases as the model-fit improves during training Martens 2014 For VI, we expect the same however, since [MATH] are sampled from [MATH] , the expectation of the error is unlikely to be zero. Therefore, the solutions found by... |
An issue with VOGN is that its implementation is not easy within existing deep-learning codebases. This is because these codebases are optimized to directly compute the sum of the gradients over minibatches, and do not support computation of individual gradients as required in ( ). A solution for such computations is d... |
3.3 Variational RMSprop (Vprop) To simplify the implementation of VOGN, we propose to approximate the Hessian by the gradient magnitude (GM) Bottou et al. 2016 |
[EQUATION] Compared to the GGN which computes the sum of squared-gradients, this approximation instead computes the square of the sum. This approximation is also used in RMSprop which uses the following update given weights [MATH] |
[EQUATION] where [MATH] is the vector that adapts the learning rate and [MATH] is a small positive scalar added to avoid dividing by zero. The update of [MATH] uses the GM approximation to the Hessian Bottou et al. 2016 . Adam and AdaGrad also use this approximation. |
Using the GM approximation and an additional modification in the VON update, we can make the VON update very similar to RMSprop. Our modification involves taking the square-root over [MATH] in ( ) and then using the GM approximation for the Hessian. We also use different learning rates [MATH] and [MATH] to update [MATH... |
[EQUATION] where [MATH] with [MATH] . We call this update “Variational RMSprop” or simply “Vprop”. The Vprop update resembles RMSprop but with three differences (highlighted in red). First, the gradient in Vprop is evaluated at the weights [MATH] sampled from [MATH] . This is a weight-perturbation where the variance [M... |
3.4 Analysis of the GM approximation It is clear that the GM approximation might not be the best approximation of the Hessian. Taking square of a sum leads to a sum with [MATH] terms which, depending on the correlations between the individual gradients, would either shrink or expand the estimate. The following theorem ... |
Theorem 1 Denote the full-batch gradient with respect to [MATH] by [MATH] and the corresponding full-batch GGN approximation by [MATH] . Suppose minibatches [MATH] are sampled from the uniform distribution [MATH] over all [MATH] minibatches, and denote a minibatch gradient by [MATH] , then the expected value of the GM ... |
[EQUATION] where [MATH] A proof is given in Appendix . This result clearly shows the bias introduced in the GM approximation and also that the bias increases with the minibatch size. For a minibatch of size [MATH] , we have [MATH] and the GM is an unbiased estimator of the GGN, but when [MATH] it is purely the magnitud... |
Therefore, if our focus is to obtain uncertainty estimates with good accuracy, VOGN with [MATH] might be a good choice since it is as easy as Vprop to implement. However, this might require a small learning-rate and converge slowly. Vprop with [MATH] will converge fast and is much easier to implement than VOGN with [MA... |
Variational Adam (Vadam) We now propose a natural-momentum method which will enable an Adam-like update. Momentum methods generally take the following form that uses Polyak’s heavy-ball method: |
[EQUATION] where [MATH] is the function we want to maximize and the last term is the momentum term. We propose a natural-momentum version of this algorithm which employs natural-gradients instead of the gradients. We assume [MATH] to be an exponential-family distribution with natural-parameter [MATH] . We propose the f... |
[EQUATION] where [MATH] denotes the natural-gradients in the natural-parameter space, i.e., the gradient scaled by the Fisher information matrix of [MATH] |
We show in Appendix that, for Gaussian [MATH] , we can express the above update as a VON update with momentum [EQUATION] where [MATH] with [MATH] This update is similar to ( 17 ), but here the learning rates are adapted. An attractive feature of this update is that it is very similar to Adam. Specifically the Adam upda... |
[EQUATION] where [MATH] are appropriately defined in terms of the Adam’s learning rate [MATH] and [MATH] [MATH] and [MATH] Using a similar procedure as the derivation of Vprop, we can express the update as an Adam-like update, which we call “variational Adam” or simply “Vadam”. A pseudocode is given in Fig. , where we ... |
Variational AdaGrad (VadaGrad) Vprop and Vadam perform variational inference, but they can be modified to perform optimization instead of inference. We now derive such an algorithm which turns out to be a variational version of AdaGrad. |
We follow Staines & Barber 2013 who consider minimization of black-box functions [MATH] via the variational optimization (VO) framework. In this framework, instead of directly minimizing [MATH] , we minimize its expectation [MATH] under a distribution [MATH] with respect to [MATH] and [MATH] The main idea behind VO is ... |
Similarly to Vprop, we can derive an algorithm for VO by noting that VO can be seen as a special case of the VI problem ( ) where the KL term is absent and [MATH] is the negative log-likelihood. With this in mind, we define the following variational objective with an additional parameter [MATH] |
[EQUATION] The parameter [MATH] allows us to interpolate between inference and optimization. When [MATH] , the objective corresponds to VI with a negative log-likelihood [MATH] , and when [MATH] , it corresponds to VO. Similar objectives have been proposed in existing works Blundell et al. 2015 Higgins et al. 2016 wher... |
For twice-differentiable [MATH] , we can follow a similar derivation as Section , and obtain the following algorithm, [EQUATION] |
where [MATH] with [MATH] . This algorithm is identical to the VON algorithm when [MATH] , but when [MATH] , we perform VO with an algorithm which is a diagonal version of the Variational Adaptive-Newton (VAN) algorithm proposed in Khan et al. 2017 . By setting the value of [MATH] between 0 and 1, we can interpolate bet... |
When Hessian is difficult to compute, we can employ a GM approximation and take the square-root as we did in Vprop. For [MATH] , the updates turn out to be similar to AdaGrad, which we call “variational AdaGrad” or simply “VadaGrad”. The exact updates are given in Appendix . Unlike Vprop and Vadam, the scaling vector [... |
[MATH] will converge to a Dirac delta and therefore arrive at a minimum of [MATH] Results In this section, our goal is to show that the quality of the uncertainty approximations obtained using our algorithms are comparable to existing methods, and computation of uncertainty is scalable. We present results on Bayesian l... |
6.1 Uncertainty Estimation in Logistic Regression In this experiment, we compare the posterior approximations found with our algorithms to the optimal variational approximation that minimizes the variational objective. For Bayesian logistic regression we can compute the optimal mean-field Gaussian approximations using ... |
Fig. visualizes the approximations on a two-dimensional toy example from Murphy 2012 . The true posterior distribution is shown with the contour in the background. Both, Vadam and VOGN-1 find approximations that are different from MF-Exact, which is clearly due to differences in the type of Hessian approximations they ... |
For real datasets, we compare performances using three metrics. First, the negative of the variational objective on the training data (the evidence lower-bound or ELBO), log-loss on the test data, and the symmetric KL distance between MF-Exact and the approximation found by a method. Fig. shows the results averaged ove... |
Fig. further shows the effect of [MATH] where, for each [MATH] , we plot results for 20 random initializations on one split of the Breast-Cancer dataset. As we decrease [MATH] , Vadam’s performance gets better, as expected. For [MATH] , it closely matches VOGN-1. The results are still different because Vadam does not r... |
6.2 Uncertainty Estimation in Neural Network We show results on the standard UCI benchmark. We repeat the experimental setup used in Gal & Ghahramani 2016 . Following their work, we use a neural network with one hidden layer, 50 hidden units, and ReLU activation functions. We use the 20 splits of the data provided by G... |
We compare Vadam to MC-Dropout Gal & Ghahramani 2016 using the results reported in Gal & Ghahramani 2016 . We also compare to an SG method using the reparameterization trick and the Adam optimizer (referred to as ‘BBVI’). For a fair comparison, the Adam optimizer is run with the same learning rates as Vadam, although t... |
Table shows the performance in terms of the test RMSE and the test log-likelihood. The better method out of BBVI and Vadam is shown in boldface found using a paired t-test with [MATH] . Both methods perform comparably, which supports our conclusion, however, MC-Dropout outperforms both the methods. We also find that VO... |
For many tasks, we find that VOGN and Vadam converge much faster than BBVI. An example is shown in Figure (see the first 3 figures in the left; details are in Appendix ). We have observed similar trends on other datasets. |
6.3 Exploration in Deep Reinforcement Learning A good exploration strategy is crucial in reinforcement learning (RL) since the data is sequentially collected. We show that weight-perturbation in Vadam improves exploration in RL. Due to space constraints, we only provide a brief summary of our results, and give details ... |
We consider the deep deterministic policy gradient (DDPG) method for the Half-Cheetah task using a two-layer neural networks with [MATH] and [MATH] ReLU hidden units Lillicrap et al. 2015 We compare Vadam and VadaGrad to two SGD methods, one of which does exploration (referred to as ‘SGD-Explore’), and the other does n... |
Discussion In this paper, we present new VI algorithms which are as simple to implement and execute as algorithms for MLE. We obtain them by using a series of approximations and a natural momentum method for a natural-gradient VI method. The resulting algorithms can be implemented within Adam with minimal changes. Our ... |
An interesting direction we hope to pursue in the future is to generalize our natural-gradient approach to other types of approximation, e.g., exponetial-family distributions and their mixtures. We would also like to further explore the application to areas such as RL and stochastic optimization. |
Acknowledgements We thank the anonymous reviewers for their feedback. We greatly appreciate many insightful discussions with Aaron Mishkin (UBC) and Frederik Kunstner (EPFL), and also thank them for their help on carrying out experiments and reviewing the manuscript. We would also like to thank Roger Grosse and David D... |
Appendix A Changes in the Camera-Ready Version Compared to the Submitted Version Taking reviewer’s suggestions into account, we changed the title of our paper. The title of our submitted version was “Vadam: Fast and Scalable Variational Inference by Perturbing Adam”. |
In the submitted version, we motivated our approach based on its ease of implementation. In the new version, we changed the motivation to make VI as easy to implement and execute as MLE. |
In the new version, we have added a separate section on related work. We improved the discussion of our approximation methods, and added an error analysis. |
Overall conclusions of our paper have also slightly changed in the new version. The new conclusions suggest that there is a trade-off between the ease-of-implementation and quality of uncertainty approximation. |
As per reviewers suggestions, we also made major improvements in our experiment results. We added test log-likelihood in the BNN results. We changed the hyperparameter selection from grid search to Bayesian optimization. We removed two methods from the table, namely PBP and VIG, since they use different splits compared... |
We added a logistic regression experiment where we evaluate the quality of uncertainty estimates. We added the details of the RL experiments which we forgot to add in the submitted version. We also added a comparison to Adam-based methods in the appendix for the RL experiment. |
We removed an unclear result about reducing overfitting. We added an additional result comparing VOGN with Vadam and BBVI on Bayesian neural network. |
Appendix B Review of Natural-Gradient Variational Inference Khan & Lin 2017 propose a natural-gradient method for variational inference. In this section, we briefly discuss this method. |
Denote the variational objective by [MATH] for the variational distribution [MATH] which takes an exponential-family form with natural-parameter [MATH] . The objective is given as follows: |
[EQUATION] We assume that the exponential-family is in minimal representation, which ensures that there is a one-to-one mapping between the natural parameter [MATH] and the expectation parameter, denoted by [MATH] . Therefore, it is possible to express [MATH] in terms of [MATH] . We denote this new objective by [MATH] ... |
Natural-gradient methods exploit the Riemannian geometry of [MATH] by scaling the gradient by the inverse of the Fisher information matrix. The method of Khan & Lin 2017 simplifies the update by avoiding a direct computation of the FIM. This is made possible due to a relationship between the natural parameter [MATH] an... |
[EQUATION] This relationship has been discussed in the earlier work of Hensman et al. 2012 and can also be found in Amari 2016 The method of Khan & Lin 2017 exploits this result within a mirror descent framework. They propose to use a mirror-descent update in the expectation- parameter space which is equivalent to the ... |
Theorem 2 Consider the following mirror-descent step: [EQUATION] where [MATH] is the Kullback-Leibler divergence and [MATH] is the learning rate in iteration [MATH] . Each step of this mirror descent update is equivalent to the following natural-gradient descent in the natural-parameter space: |
[EQUATION] A formal proof of this statement can be found in Raskutti & Mukherjee 2015 Using ( 26 ), the natural-gradient update above can be simply written as the following: |
[EQUATION] which involves computing the gradient with respect to [MATH] but taking a step in the natural-parameter space. As we show in the next section, the above relationship enables us to derive a simple natural-gradient update because, for a Gaussian distribution, the gradient with respect to [MATH] leads to a simp... |
Appendix C Derivation of Natural-Gradient Updates for Gaussian Mean-Field Variational Inference In this section, we derive the natural-gradient update for the Gaussian approximation [MATH] with mean [MATH] and covariance matrix [MATH] . In the end, we will make the mean-field approximation: [MATH] to get the final upda... |
We start by defining the natural and expectation parameters of a Gaussian: [EQUATION] Now we will express the gradient with respect to these expectation parameters in terms of the gradients with respect to [MATH] and [MATH] using the chain rule (see Appendix B.1 in Khan & Lin 2017 for a derivation): |
[EQUATION] Next, using the definition of natural parameters, we can rewrite ( 29 ) in terms of [MATH] and [MATH] (here [MATH] implies that it is gradient of the variational objective with respect to a variable [MATH] at [MATH] ): |
[EQUATION] In summary, the natural-gradient update is [EQUATION] By considering a Gaussian mean-field VI with a diagonal covariance: [MATH] , we obtain |
[EQUATION] In update ( ), we use stochastic gradients instead of exact gradients. Note that there is an explicit constraint in the above update, i.e., the precision [MATH] needs to be positive at every step. The learning rate can be adapted to make sure that the constraint is always satisfied. We discuss this method in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.