Abstract
The Deep Weight Prior (DWP) replaces generic, "one-size-fits-all" weight distributions in Bayesian Neural Networks with sophisticated priors learned by generative models. By training a Variational Autoencoder (VAE) on kernels from previously trained networks, the authors create a prior that understands spatial correlations. This approach leads to significantly better performance on small datasets and faster training convergence for standard Convolutional Neural Networks (CNNs).
The Problem with Standard Priors
In Bayesian Neural Networks (BNNs), rather than learning a single point estimate for a weight, we learn a probability distribution. To achieve this, we must define a prior—our initial assumption of what the weights should look like before observing any data.
Traditionally, researchers rely on simple priors, such as a standard Gaussian distribution centered at zero. While mathematically convenient, these priors are "fully factorized," meaning they assume every single pixel in a convolutional filter is entirely independent of its neighbors.
In practice, this assumption is flawed. Effective convolutional filters possess inherent spatial structure, often resembling edges, blobs, or specific textures. By using simple, independent priors, models discard a massive amount of structural knowledge. The core challenge addressed in this work is mathematically defining a prior that captures the complex, "natural" structure of a successful convolutional kernel.
Methods: Learning the Prior
To solve this, the authors propose a framework that shifts from manually defining a prior to learning it from data.
- Learning the Prior via Generative Models: Instead of picking a formula, the authors extract convolutional kernels from "source" networks already trained on similar datasets. They then train a Variational Autoencoder (VAE) on these harvested kernels. The VAE’s decoder effectively becomes the prior, defining a manifold of "realistic" and structurally sound filters.
- Variational Inference with Implicit Priors: Because the prior is now defined by a generative model (an "implicit" distribution), calculating the exact probability density needed for standard Bayesian inference becomes intractable.
- Auxiliary Variational Lower Bound: To overcome this, the authors developed a novel auxiliary variational lower bound. This innovation allows them to perform stochastic variational inference even with an implicit prior. They introduce an auxiliary "reverse model" (an encoder) that bridges the gap between the variational posterior and the complex DWP.
Experimental Setup
The authors evaluated their method using a transfer-learning approach, utilizing "source" datasets to build the prior and "target" datasets to test it:
- Source Datasets: notMNIST (letters in various fonts) and CIFAR-100. These trained the source networks from which kernels were harvested.
- Target Datasets: MNIST (handwritten digits) and CIFAR-10.
- Evaluation Focus: The primary tests focused on scenarios with limited training data (ranging from 50 to 1000 examples) to determine if the DWP could compensate for a lack of target information.
Key Insights and Results
- Kernels are Universal: A major takeaway is the confirmation that convolutional kernels are highly transferable across similar domains. A filter that detects an edge in
notMNISTis highly likely to be useful forMNIST. - Spatial Correlation Matters: By abandoning independent weight priors, the model effectively "pre-learns" the geometry of vision. It inherently understands that pixels in a $3\times3$ or $7\times7$ filter should relate to one another.
- Superior Accuracy with Small Data: On MNIST with only 50 training samples, the DWP achieved roughly 83% accuracy, significantly outperforming standard normal priors (~77%) and log-uniform priors (~73%).
- Initialization Boost for Standard CNNs: Beyond BNNs, the DWP serves as an excellent initialization method for standard, non-Bayesian CNNs. Sampling weights from the DWP is far more effective than standard "Xavier" or "He" initialization because the network starts with filters that already function as feature detectors. When used this way, the DWP reached high accuracy in a fraction of the steps required by Xavier initialization.
- Better Feature Extraction: Even without any subsequent training (using random feature extraction), weights sampled from a DWP performed significantly better than Xavier-initialized weights, proving that the structural information embedded in the prior is inherently valuable.
Limitations and Future Work
While powerful, the DWP framework has a few limitations:
- Layer-wise Factorization: Currently, the DWP assumes that kernels within a layer are independent and that different layers do not depend on each other. In reality, hierarchical relationships exist between filters in sequential layers that this model does not yet capture.
- Computational Overhead: The pre-training phase is resource-intensive. It requires training numerous models on a "source" dataset to harvest enough kernel samples to effectively train the VAE.
- Domain Specificity: While kernels are transferable within "natural images" or "grayscale characters," a DWP learned on CIFAR might not serve as a good prior for radically different domains like medical X-rays or seismic data. Future work will need to explore how to build more universal, cross-domain weight priors.
Summary updated