Annealing in variational inference mitigates mode collapse: a theoretical study on Gaussian mixtures

Luigi Fogliani, Bruno Loureiro, Marylou GabriéNeurIPS 2026

TL;DR

When approximating complex, multi-peaked probability distributions using Variational Inference (VI), models notoriously suffer from "mode collapse"—locking onto one peak and ignoring the rest. Practitioners often fix this with annealing (starting with a smoothed-out target and gradually sharpening it), and this paper provides the first exact mathematical theory explaining why it works and why cranking the starting temperature too high can actually backfire.

What Problem Does This Paper Address?

Suppose you want to sample from a complex probability distribution—like the energy states of a molecule or a gnarly Bayesian posterior—where direct sampling is computationally impossible. Variational Inference (VI) turns this sampling problem into an optimization problem: pick a tractable family of "student" distributions and nudge its parameters until it looks like your target.

The catch is the standard measuring stick used in VI: the reverse Kullback–Leibler (KL) divergence. Reverse KL hates placing probability mass where the target is near zero. Facing a multimodal target (a distribution with multiple separated peaks, or "modes"), the student model takes the safe route and parks all its mass on a single peak. This is mode collapse, and simply throwing more expressive deep generative models at the problem doesn't fix it.

A popular empirical workaround is annealing, borrowed from statistical physics. Instead of learning the target $\pi$ right away, you flatten the landscape by raising it to an inverse temperature $\beta < 1$ (targeting $\pi^\beta$), bridging the valleys between peaks. You then slowly cool the system down to $\beta = 1$. While annealing works wonders in practice, tuning the cooling schedule has largely been guesswork—until now.

Figure 1: Preliminary experiments: annealing mitigates mode collapse. The first 4 columns show the marginal density along the direction of µ∗of both π and qθ, at 4 different training stages. The fifth column shows the variance dynamics. Each row represents a different scenario; from top to bottom: no annealing with σ1,2 initialized to one, no annealing with covering initial distribution (high initial variances σ1,2 ≫R), annealing with schedule given by eq. (2.4). Hyperparameters values are: d = 512, R = 3, w∗= 0.8, w1 = 0.5 and time discretization step η = 0.05.

Methods

To peer inside the black box of annealed VI, the authors construct a clean mathematical laboratory: both the target and student are mixtures of two isotropic Gaussians in high dimensions ($d$).

While prior theoretical work kept student variances frozen, studying annealing requires trainable variances so the student can expand and contract with the temperature. Under spherical gradient flow, the authors uncover two major simplifications that make exact math possible:

  1. Variance Decoupling: In the high-dimensional limit ($d \to \infty$), the dynamics of the student's variances completely decouple from its means! They obey a clean closed-form equation, tracking the annealing temperature with a slight lag determined by the cooling rate.
  2. Dimensionality Reduction: Inspired by statistical physics, they project the $2d$-dimensional trajectory of the student means down into just three scalar summary statistics ("order parameters"): how much each of the two student modes aligns with the target axis ($m_1, m_2$), and how much the two student modes overlap with each other ($s$).

Using a standard geometric cooling schedule, they analyze this 3D dynamical system to derive a sharp, closed-form formula for the exact probability of mode collapse, and then test whether these theoretical rules hold up in deep neural networks using RealNVP normalizing flows.

Datasets

Because this is a theoretical and controlled dynamical study, no external real-world datasets or benchmarks are used. Instead, models are trained directly via synthetic probability density targets:

  • High-dimensional bimodal isotropic Gaussian mixtures ($d = 512$ for the analytical mixture student; $d = 128$ for RealNVP flows) with mode separation $R = 3$ and weight imbalance $w_* = 0.8$.
  • A 5-mode isotropic Gaussian mixture in $d = 128$ to verify that findings generalize beyond two peaks.

Key Insights and Ideas

  • Wide initializations aren't enough: You might think initializing your student with huge variances covering both peaks would prevent collapse. It doesn't! Without annealing, student variances rapidly shrink to match the local curvature of the peaks before the means can separate, causing both student modes to tumble into the heaviest peak.
  • High temperature creates a helpful saddle point: At high temperatures ($\beta \ll R^{-2}$), the student's own entropy dominates. This creates a repulsive force pushing the two student means in opposite directions ($s \to -1$), nudging one of them out of the dominant peak's basin of attraction before low-temperature attraction locks them in.
  • The "Too Hot" Paradox: Cranking up the initial temperature infinitely high for a fixed compute budget actually causes mode collapse! Why? First, cooling from a higher temperature in the same time $t_0$ forces a faster annealing rate. Second, the speed at which the student means specialize into opposite modes scales with $\sqrt{\beta}$—meaning at ultra-high temperatures, the landscape is too flat to guide the modes toward the right axis efficiently.
  • The Annealing Rate is King: Once your starting temperature is sufficiently high, the probability of mode collapse depends solely on the annealing rate $\kappa = \log(1/\beta_i)/t_0$. If you raise the initial temperature, you must proportionally increase the annealing duration.
Phase diagram of mode collapse probability showing the curved sweet spot between initial inverse temperature and annealing time, alongside exact matches between high-d theory and SGD trajectories.

Key Results

  • Pinpoint Theoretical Accuracy: In $d = 512$ simulations, SGD trajectories of variances and means align almost indistinguishably with the 3D ODE integration, and the analytical formula accurately traces the empirical 0.5 mode-collapse probability boundary across schedules.
  • Generalization to Deep Generative Models: Training an 8-layer RealNVP normalizing flow ($d = 128$, 4-layer MLPs of width 512) reproduces the exact same "C-shaped" phase diagram of success. For a fixed budget of iterations $t_0$, there is a clear "Goldilocks" initial temperature; going colder or hotter increases collapse on both 2-mode and 5-mode targets.

Limitations and Future Work

The exact mathematical derivations rely on simplified assumptions: high dimensionality, spherical constraints on the means, fixed equal student weights ($w_1 = w_2 = 0.5$, though empirical tests with learnable weights showed similar behavior), and a strictly geometric cooling schedule.

For future work, the authors suggest comparing geometric schedules against adaptive ones (such as schedules guided by Effective Sample Size or $\chi^2$ divergence), and extending this theoretical lens to VI with diffusion models, which operate over path spaces and may naturally resist mode collapse.

Summary updated

Abstract

Mode collapse --- the failure to capture one or more modes when targetting a multimodal distribution --- is a central challenge in modern variational inference. In this work, we provide a mathematical analysis of annealing-based strategies for mitigating mode collapse in a tractable setting: learning a Gaussian mixture, where mode collapse is known to arise. Leveraging a low-dimensional summary statistics description, we precisely characterize the interplay between the initial temperature and the annealing rate, and derive a sharp formula for the probability of mode collapse. Our analysis shows that an appropriately chosen annealing scheme can robustly prevent mode collapse. Finally, we present numerical evidence that these theoretical trade-offs qualitatively extend to neural network–based models, RealNVP normalizing flows, providing guidance for designing annealing strategies mitigating mode collapse in practical variational inference pipelines.
BibTeX
@inproceedings{fogliani2026annealing,
  author = {Luigi Fogliani and Bruno Loureiro and Marylou Gabrié},
  title = {{Annealing in variational inference mitigates mode collapse: a theoretical study on Gaussian mixtures}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=WS1Hwfq4Ay},
}
Figure