NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On the detrimental effect of invariances in the likelihood for variational inference

Richard Kurle, Ralf Herbrich, Tim Januschowski, Yuyang Wang, Jan Gasthaus

Abstract

Variational Bayesian posterior inference often requires simplifying approximations such as mean-field parametrisation to ensure tractability. However, prior work has associated the variational mean-field approximation for Bayesian neural networks with underfitting in the case of small datasets or large model sizes. In this work, we show that invariances in the likelihood function of over-parametrised models contribute to this phenomenon because these invariances complicate the structure of the posterior by introducing discrete and/or continuous modes which cannot be well approximated by Gaussian mean-field distributions. In particular, we show that the mean-field approximation has an additional gap in the evidence lower bound compared to a purpose-built posterior that takes into account the known invariances. Importantly, this invariance gap is not constant; it vanishes as the approximation reverts to the prior. We proceed by first considering translation invariances in a linear model with a single data point in detail. We show that, while the true posterior can be constructed from a mean-field parametrisation, this is achieved only if the objective function takes into account the invariance gap. Then, we transfer our analysis of the linear model to neural networks. Our analysis provides a framework for future work to explore solutions to the invariance problem.

Introduction

Bayesian Neural Networks (BNNs) offer a compelling framework for capturing epistemic uncertainty and improving generalization. In practice, however, training these models often relies on Mean-Field Variational Inference (MFVI), which approximates the complex, high-dimensional posterior distribution of weights with a simplified collection of independent Gaussians. Despite its computational efficiency, MFVI frequently suffers from "posterior collapse"—a failure mode where the model ignores the training data and reverts to its prior assumptions, particularly as the model width increases or the dataset size decreases.

This paper identifies a fundamental mathematical cause for this collapse: the presence of symmetries and invariances in the likelihood function. When multiple distinct weight configurations produce identical outputs (e.g., neuron permutations), the resulting posterior landscape becomes highly non-Gaussian, featuring complex ridges and multiple modes that a simple mean-field approximation cannot capture.

The Invariance Gap

The core contribution of this research is the formalization of the "Invariance Gap." The authors compare two variational distributions:

  1. Mean-Field ($q_0$): The standard approach that assumes independence between weights and ignores model symmetries.
  2. Invariance-Abiding ($q_{mix}$): A sophisticated distribution that explicitly accounts for symmetries by averaging over all equivalent weight transformations.

The research demonstrates that the standard Evidence Lower Bound (ELBO) used to optimize $q_0$ is inherently looser than an objective that accounts for these symmetries. Specifically, the difference between the true objective and the mean-field objective is defined by the KL divergence between the mean-field and the invariance-abiding distributions:

$$L_{ELBO}(q_0) - L_{ELBO}(q_{mix}) = KL[q_0 || q_{mix}]$$

Crucially, this gap is not a constant offset. It is largest when the model is attempting to fit the data and vanishes when the model reverts to the prior. Consequently, the optimization process is mathematically biased toward the prior, as "collapsing" the model effectively eliminates the penalty imposed by the invariance gap.

Analysis of Linear and Deep Models

To isolate the effects of this gap, the authors analyze a canonical linear model characterized by translation invariance—where adding a value to one weight and subtracting it from another leaves the output unchanged. In these controlled environments, the researchers observed that the invariance gap grows linearly with the number of model dimensions ($K$). This explains why over-parametrized models are paradoxically more prone to underfitting when using standard variational methods.

This analysis extends to deep neural networks, which possess both discrete symmetries (such as weight permutations) and continuous translation invariances. The research shows that the likelihood surface of a BNN is not a single peak but a complex landscape of identical peaks and long, flat ridges. Attempting to fit a standard Gaussian (MFVI) into this landscape is akin to forcing a round peg into a star-shaped hole; the mismatch creates a persistent pressure that pushes the variational parameters toward the simpler, broader prior.

Conclusion and Future Directions

The identification of the invariance gap provides a theoretical explanation for the historical difficulties in scaling VBNNs. While the true invariance-abiding posterior is often computationally intractable for modern architectures like ResNets or Transformers, this work provides a concrete target for future algorithmic development.

The authors suggest that the path forward lies in developing efficient approximations of the invariance gap. By correcting the ELBO objective to account for these known symmetries, it may be possible to train large-scale Bayesian models that retain their predictive power and uncertainty quantification without collapsing under the weight of their own over-parametrization.

Summary updated

BibTeX
@inproceedings{kurle2022detrimental,
  author = {Richard Kurle and Ralf Herbrich and Tim Januschowski and Yuyang Wang and Jan Gasthaus},
  title = {{On the detrimental effect of invariances in the likelihood for variational inference}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=ft4xGJ8tIZH},
}
Figure