A statistical theory of cold posteriors in deep neural networks

Laurence Aitchison

Introduction: The Cold Posterior Effect

In a perfect Bayesian world, the posterior distribution—the update of our beliefs after seeing data—should provide optimal predictions. However, researchers have consistently observed a troubling phenomenon when applying Bayesian Neural Networks (BNNs) to standard deep learning tasks: BNNs typically only perform well if their posterior distribution is artificially "sharpened" or "cooled."

This is achieved by introducing a temperature parameter $T < 1$, which effectively over-counts the evidence. This practice, known as the Cold Posterior Effect, contradicts core Bayesian theory. If our generative model were correct, any artificial change to the posterior should degrade performance. This discrepancy has led many researchers to suspect that the "priors" (our initial assumptions about network weights) used in BNNs are fundamentally flawed.

This paper proposes a radically different culprit: the likelihood. It argues that we are using the wrong mathematical description of how labels are generated because we ignore a crucial step in the data pipeline: dataset curation.

The Generative Model of Curation

Standard image benchmark datasets, such as CIFAR-10, are not random samples of the visual world; they are carefully filtered to remove ambiguous examples. The mere fact that an image exists in CIFAR-10 tells us something valuable: it is an "easy" or "unambiguous" example. This filtering pushes the data points away from the decision boundaries.

To formalize this, the author introduces a Generative Model of Curation based on consensus.

An illustration of the consensus curation model: unambiguous images are kept, while ambiguous ones (where labellers disagree) are discarded.

Imagine a dataset created by $S$ different labellers. Under the consensus model, an image is only included in the final dataset if all $S$ labellers agree on the class. If they disagree, the image is discarded.

Mathematically, the probability of seeing a specific label $y$ for an image $X$ under this curated model is proportional to the single-labeller probability raised to the power of $S$: $$P(y|X, \theta)^S$$

In BNN training, "cooling" the posterior involves multiplying the log-likelihood by $1/T$. The paper demonstrates a direct mathematical equivalence here: the curation process (the power $S$) is equivalent to setting the temperature $T = 1/S$.

We have been treating curated labels as if they came from a single, fallible human. In reality, they represent a consensus of many. By using $T=1$, standard models effectively underestimate the "strength" of the evidence provided by these highly curated labels.

Experimental Evidence

The paper validates this curation hypothesis across several distinct datasets and scenarios:

  • Galaxy Zoo 2: This real-world dataset of galaxy morphologies allowed the author to create both "curated" (high-consensus) and "uncurated" (random) subsets. On the uncurated data, the cold posterior effect was weak. However, on the curated data, the effect was massive—performance improved by a factor of ~3 as the temperature was lowered.
  • CIFAR-10H: This is a specialized version of the CIFAR-10 test set where ~50 humans labeled every image, providing "soft" labels that capture raw human uncertainty. When training on this uncurated, full set of human labels, the cold posterior effect almost entirely disappeared, and the optimal temperature moved back toward $T=1$.
  • Label Noise: Adding random noise to labels destroys the curation pattern. As expected under the author's theory, introducing label noise caused the cold posterior effect to vanish or even reverse, making $T=1$ optimal again.

Conclusion and Future Directions

The "Cold Posterior Effect" is not necessarily a sign of broken priors, but rather a symptom of ignoring the dataset curation process. Interestingly, this extends beyond Bayesian methods: even in standard non-Bayesian training (Maximum A-Posteriori), the best-performing weight decay is often lower than what a standard prior would suggest, implying this is a universal phenomenon in deep learning.

While the consensus model is a simplification—real-world curation like that of ImageNet involves complex, multi-stage verification—it provides a powerful principled explanation. The author acknowledges that curation might not be the only cause; model misspecification and artifacts of sampling algorithms (like SGLD) likely still play a role.

Ultimately, this work suggests a clear path forward: if we want better, mathematically sound uncertainty estimates in deep learning, we must either explicitly include the curation process in our generative models or shift toward training on "raw," uncurated datasets with soft human labels.

Summary updated

BibTeX
@inproceedings{aitchison2021statistical,
  author = {Laurence Aitchison},
  title = {{A statistical theory of cold posteriors in deep neural networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=Rd138pWXMvG},
}
Figure