Wide Mean-Field Variational Bayesian Neural Networks Ignore the Data

Beau Coker, Weiwei Pan, Finale Doshi-Velez

TL;DR

As the width of a single-layer Bayesian Neural Network (BNN) approaches infinity, mean-field variational inference (MFVI) fails catastrophically: the posterior predictive mean completely ignores the data and converges to zero. This stands in stark contrast to the true posterior, which correctly converges to a Gaussian Process, revealing a fundamental mathematical flaw in how the KL divergence regularizes wide variational BNNs.

What Problem Does This Paper Address?

Bayesian Neural Networks (BNNs) are highly desirable because they naturally capture predictive uncertainty. However, computing the exact posterior distribution over network parameters is mathematically intractable. To solve this, researchers often turn to Mean-Field Variational Inference (MFVI), a popular approximation technique that assumes all network weights are independent Gaussian variables.

In modern deep learning, we frequently operate in the "over-parameterized" regime, using networks that are incredibly wide. Theoretically, as a BNN's width (number of hidden units) goes to infinity, its true posterior converges nicely to a Gaussian Process (specifically, the Neural Network Gaussian Process, or NNGP). Practically, however, engineers have noticed that wide MFVI BNNs tend to underfit severely.

This paper addresses a fundamental question: Is this severe underfitting a mere optimization issue, or is it an inherent mathematical flaw within the variational objective itself?

Methods

The authors rigorously analyze a single-layer feedforward BNN under MFVI for univariate regression. To ensure a stable prior predictive variance as the network width ($K$) grows, the output-layer prior variance is scaled inversely by the width ($1/K$).

The core contribution is Theorem 1, which proves that if you use an error function ($\text{erf}$) activation function and optimize the Evidence Lower Bound (ELBO), the variational posterior predictive mean converges to zero as $K \to \infty$.

The proof follows three main steps:

  1. Evaluate the ELBO at the prior: Show that the ELBO evaluated at the prior distribution is independent of width, establishing a universal lower bound.
  2. Bound the KL regularization: Because the optimized ELBO cannot perform worse than the prior, the Kullback-Leibler (KL) divergence term is strictly constrained, which limits how far the variational parameters can move away from the prior.
  3. Bound the posterior mean: Apply Cauchy-Schwarz and Jensen's inequalities to demonstrate that the absolute value of the posterior predictive mean must shrink to zero.

The authors complement this proof with empirical gradient descent simulations across various network widths and activation functions.

Datasets

The paper evaluates the convergence behavior empirically using three datasets (all z-score standardized):

  • "2-points" dataset: A simple toy setup consisting of just two data points, ideal for clear visualization of function-space behavior.
  • Synthetic Sine Wave: A noisy dataset generated from a sine wave ($N = 20$).
  • Olympic Marathon Paces: A real-world dataset tracking winning Olympic marathon paces from 1896 to 2012 ($N = 27$).

Key Insights and Ideas

  • The ELBO Objective is the Culprit: The failure of wide BNNs to fit data is not caused by poor optimization or local minima. It is a mathematical property of the ELBO objective function itself.
  • The KL Term Over-Regularizes: The KL divergence term acts as an overly aggressive $L_2$ regularizer on the output weights. As the network gets wider, the prior forces individual output weights to be tiny ($1/K$ scaling). Meanwhile, the KL penalty on the input-layer weights prevents them from adjusting freely to fit the data. To maximize the ELBO, the model simply shuts down, pulling all weights toward the zero-mean prior.
  • Contrast with Random Features: This pathology does not happen in random features models (like Random Fourier Features). In those models, input-layer weights are drawn from a fixed distribution and never penalized during optimization, allowing them to fit data perfectly as width increases.
  • Theoretical Grounding for "Cold Posteriors": In practice, deep learning researchers often use "cold posteriors" by artificially downweighting the KL divergence term to make BNNs perform well. This paper provides the theoretical justification for why that hack is necessary: without it, the KL term completely obliterates the data signal in wide networks.

Key Results

  • Catastrophic Underfitting Verified: As shown in Figure 1, while the true infinite-width posterior (NNGP) fits the data points perfectly, the wide MFVI BNN completely flattens out to a mean of zero.
Figure 1. Prior and posterior predictive distributions for mean-field variational BNNs of different widths compared to the NNGP, to which the true posterior of the BNN converges. For a large width, the mean-field variational BNN ignores the data, unlike the NNGP. The shaded regions constitute ±1 standard deviation around the means (solid lines). All estimates are based on 1000 function samples (a few of which are drawn faintly).
  • Clear Convergence to the Prior: Across all three datasets, as the network width increases from 125 to 32,000, the Euclidean distance between the variational posterior mean and the prior mean drops sharply toward zero (Figure 2, top panel).
Distance to the prior for mean and variance across widths.
  • Generalization Beyond Erf: Although Theorem 1 assumes an $\text{erf}$ activation function, empirical results confirm that the exact same data-ignoring behavior occurs when using standard tanh and ReLU activations (Figure 3).
Figure 3. Comparison of the posterior predictives of MFVI BNNs using tanh and ReLU activation functions for small (left panel) and large (right panel) widths. Regardless of the activation, wide MFVI BNNs ignore the data.

Limitations and Future Work

  • Single-Layer Limitation: The mathematical proof is currently restricted to single-layer architectures. Extending this asymptotic analysis to deep networks remains an open challenge.
  • Activation Constraints: The formal proof relies on the specific mathematical properties of the error function ($\text{erf}$), even though empirical evidence shows it applies more broadly.
  • The Variance Conjecture: While this paper proves the posterior mean goes to zero, the authors conjecture that the entire variational posterior distribution (including variance) converges back to the prior. Proving this stronger statement is highlighted as immediate future work.

Summary updated

Abstract

Variational inference enables approximate posterior inference of the highly over-parameterized neural networks that are popular in modern machine learning. Unfortunately, such posteriors are known to exhibit various pathological behaviors. We prove that as the number of hidden units in a single-layer Bayesian neural network tends to infinity, the function-space posterior mean under mean-field variational inference actually converges to zero, completely ignoring the data. This is in contrast to the true posterior, which converges to a Gaussian process. Our work provides insight into the over-regularization of the KL divergence in variational inference.
BibTeX
@inproceedings{coker2022wide,
  author = {Beau Coker and Weiwei Pan and Finale Doshi-Velez},
  title = {{Wide Mean-Field Variational Bayesian Neural Networks Ignore the Data}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2022},
  url = {https://openreview.net/forum?id=aq9J8vjyAk},
}
Figure