In standard Bayesian inference, the posterior distribution represents the mathematically perfect synthesis of prior beliefs and observed data. According to foundational theory, making predictions by integrating over this posterior distribution at a "temperature" of $T=1$ should yield optimal predictive performance and perfectly calibrated uncertainties.
Yet, when applied to deep neural networks, this elegant theory breaks down. As shown by Wenzel et al., standard Bayesian neural networks (BNNs) evaluated at $T=1$ consistently underperform compared to simple point estimates found via Stochastic Gradient Descent (SGD). To achieve competitive performance, practitioners must artificially sharpen the posterior distribution by introducing a temperature parameter $T < 1$. This phenomenon is known as the Cold Posterior Effect (CPE).
Understanding why the cold posterior effect occurs—and why cooling the posterior works—requires looking closely at how temperature scaling alters a model's parameter space, and where our standard probabilistic assumptions fail.
The Mechanics of Posterior Cooling
To understand why cold posteriors perform better, we must first look at what temperature scaling does to the geometry of the posterior distribution. In a tempered Bayesian framework, the posterior probability of the network weights $\theta$ given a dataset $D$ is defined as:
$$p_T(\theta | D) \propto p(\theta) \cdot p(D | \theta)^{1/T}$$
When $T=1$, we recover the standard Bayes posterior. When we lower the temperature ($T < 1$), the exponent $1/T$ becomes greater than one, disproportionately magnifying the regions of high likelihood.
Standard Posterior (T = 1) Cold Posterior (T < 1)
_..---.._ /\
_-' '-_ / \
_' '_ / \
_/ \_ _/ \_
----------------------- ------------------
(Diffuse, high variance) (Sharpened, low variance)
Mechanically, this sharpening counteracts a major failure mode in high-dimensional BNNs: the washout effect. As noted by Immer et al., when we sample from a standard $T=1$ posterior, the parameter distribution can become overly diffuse. When these diverse weight configurations are averaged together during inference, their individual, sharp predictions wash each other out, resulting in vague and underconfident ensemble predictions.
By cooling the posterior, we force the probability mass to concentrate tightly around the local modes. As Pitas et al. observe, this shifts the model away from highly stochastic sampling and closer to deterministic point estimates, preserving the sharp decision boundaries necessary for high classification accuracy.
Why the Theoretical Ideal Fails
If exact Bayesian inference is theoretically optimal, why does it require this heuristic cooling hack in deep learning? The consensus across recent research is that the cold posterior effect is not a failure of Bayesian inference itself, but rather a symptom of model misspecification. We are feeding our Bayesian algorithms the wrong ingredients.
1. Data Augmentation and Information Overcounting
In modern deep learning pipelines, data augmentation (e.g., randomly flipping or cropping images) is essential for generalization. However, standard Bayesian likelihoods assume that every sample in the dataset is independent and identically distributed (i.e., the i.i.d. assumption).
When we apply data augmentation, we feed the model multiple highly correlated versions of the same underlying data. As argued by Kapoor et al. and the authors of a study on data augmentation tempering, this causes the standard likelihood function to drastically overcount the true "effective sample size" of the data, artificially warming the posterior and making it too diffuse.
Izmailov demonstrated that when data augmentation is completely removed from training, BNNs can achieve peak performance right at the theoretically correct temperature of $T=1$. However, data augmentation is not the sole culprit; Nabarro et al. showed that even when using mathematically rigorous, principled likelihoods designed to handle augmentation, the cold posterior effect still persists.
2. Dataset Curation and Perfect Labels
Another source of misspecification lies in how benchmark datasets are built. Standard classification likelihoods (like categorical cross-entropy) inherently assume a certain baseline level of aleatoric noise—the idea that some labels are naturally ambiguous.
However, benchmark datasets like CIFAR-10 or ImageNet are heavily curated; they typically only include images where multiple human annotators reached a perfect consensus. Aitchison proved that this curation process filters out natural data noise, meaning the true labels are far more certain than standard models assume. Artificial cooling acts as a mathematical correction for this hidden information gain, aligning the model's internal noise assumptions with the curated reality of the dataset.
3. The Weight-Space Prior Problem
The most fundamental misspecification occurs in our choice of priors. Because neural networks contain millions of abstract parameters, practitioners traditionally default to simple, uninformative weight priors, such as isotropic Gaussians.
As Fortuin notes, these naive priors fail to capture the complex structural inductive biases of deep architectures. When we use a poor prior, the posterior distribution spreads mass across vast regions of parameter space that correspond to meaningless functions.
To fix this, researchers have begun moving away from simple Gaussians. Garriga-Alonso et al. showed that heavy-tailed or hierarchical priors can naturally mitigate the CPE. Taking this further, Tran et al. and Schnaus et al. demonstrated that when we replace weight-space priors with expressive, data-driven functional priors—which specify how the network should behave in function space rather than weight space—the optimal posterior temperature naturally aligns much closer to $T=1$.
A Feature, Not a Bug: The PAC-Bayesian Perspective
Rather than viewing the cold posterior effect as a flaw, some theorists argue that tempering is a mathematically necessary tool for generalization.
By analyzing BNNs through the lens of Probably Approximately Correct (PAC)-Bayes theory, Arbel et al. demonstrated that the optimal temperature for minimizing out-of-sample error is fundamentally tied to a trade-off between empirical risk (training error) and model complexity.
In complex deep networks, maximizing the standard Bayesian evidence does not guarantee the lowest generalization error. Instead, the temperature parameter acts as a crucial scaling factor that balances these two forces. From this perspective, Zhang et al. argue that the cold posterior effect is a direct indicator of underfitting, and tempering represents a fully valid Bayesian mechanism to optimize a model's capacity and minimize generalization bounds.
Key Foundational Work
How Good is the Bayes Posterior in Deep Neural Networks Really? (2020) — contributed 5 concept elements to this direction.
Why Cold Posteriors? On the Suboptimal Generalization of Optimal Bayes Estimates (2020) — contributed 5 concept elements to this direction.
How Good is the Bayes Posterior in Deep Neural Networks Really? (2020) — contributed 3 concept elements to this direction.