Stochastic Weight Sharing for Bayesian Neural Networks
Moule Lin, Shuhao Guan, Weipeng Jing, Goetz Botterweck, Andrea Patane
TL;DR
The paper tackles the computational and memory bottlenecks of Bayesian neural networks by introducing 2D Gaussian Bayesian Neural Networks (2DGBNN), a stochastic weight-sharing approach that represents weight uncertainty with a small set of 2D Gaussian components. It combines Gaussian Mixture Model clustering, Wasserstein-2 distance-based merging, and alpha-blending sampling within a Variational Inference framework to compress parameters while preserving accuracy and calibrated uncertainty on large architectures such as ResNet-101 and ViT across CIFAR and ImageNet. The approach yields up to roughly $50\times$ fewer trainable parameters and significant model-size reductions, while delivering competitive NLL and ECE metrics compared to state-of-the-art Bayesian methods, enabling practical Bayesian training for large-scale vision models. This work thus provides a scalable pathway to deploy uncertainty-aware deep models in edge and resource-constrained settings and lays groundwork for further integration of stochastic weight-sharing into fully Bayesian training.
Abstract
While offering a principled framework for uncertainty quantification in deep learning, the employment of Bayesian Neural Networks (BNNs) is still constrained by their increased computational requirements and the convergence difficulties when training very deep, state-of-the-art architectures. In this work, we reinterpret weight-sharing quantization techniques from a stochastic perspective in the context of training and inference with Bayesian Neural Networks (BNNs). Specifically, we leverage 2D adaptive Gaussian distributions, Wasserstein distance estimations, and alpha blending to encode the stochastic behaviour of a BNN in a lower dimensional, soft Gaussian representation. Through extensive empirical investigation, we demonstrate that our approach significantly reduces the computational overhead inherent in Bayesian learning by several orders of magnitude, enabling the efficient Bayesian training of large-scale models, such as ResNet-101 and Vision Transformer (VIT). On various computer vision benchmarks including CIFAR10, CIFAR100, and ImageNet1k. Our approach compresses model parameters by approximately 50x and reduces model size by 75, while achieving accuracy and uncertainty estimations comparable to the state-of-the-art.
