Temperature-Annealed Boltzmann Generators

Henrik Schopmans, Pascal Friederich

TL;DR

Researchers have developed Temperature-Annealed Boltzmann Generators (TA-BG), a new variational sampling method that overcomes the notorious "mode collapse" problem in molecular simulations. By starting training at high temperatures and iteratively annealing down to room temperature using a reweighting-based objective, TA-BG achieves higher accuracy and up to 3x better efficiency than current state-of-the-art methods like Flow Annealed Importance Sampling Bootstrap (FAB).

What Problem Does This Paper Address?

In computational chemistry and biology, we often want to sample the Boltzmann distribution of a molecule—essentially a map of which shapes (conformations) the molecule is likely to take based on its energy. Traditional methods like Molecular Dynamics (MD) or Markov chain Monte Carlo (MCMC) are the gold standard but are computationally expensive because they have to "walk" through high-dimensional space step-by-step.

Generative models, specifically Normalizing Flows, offer a faster alternative by learning to map a simple distribution (like a Gaussian) directly to the complex molecular distribution. However, they suffer from mode collapse: the model finds one low-energy state (a "mode") and gets stuck there, completely ignoring other equally important metastable states. This happens because the standard training objective (reverse KL divergence) is "mode-seeking"—it would rather be precisely right about one peak than try to cover all of them and risk being wrong in the high-energy gaps between them.

Methods

The authors propose a two-phase workflow to "trick" the model into seeing the whole landscape:

  1. High-Temperature Pre-training: The model is first trained using reverse KL divergence at a very high temperature (1200 K). At these temperatures, the energy barriers between different molecular states are lower, and the probability distribution is more "connected." This allows the model to discover all relevant modes without collapsing.
  2. Reweighting-Based Annealing: The model is then gradually cooled to the target temperature (300 K). In each step, the authors sample from the current flow, calculate importance weights to transition to a slightly lower temperature, and then perform forward KL divergence training. Because forward KLD is "mass-covering," it forces the model to maintain support over all the modes it discovered during the high-temp phase.
Illustration of the TA-BG workflow: (1) High-temp training to avoid collapse, (2-4) iterative annealing via reweighting and forward KLD, (5) final evaluation.

The architecture uses Neural Spline Flows operating on internal coordinates (bond lengths, angles, and dihedrals), which naturally respects the symmetries of the molecules.

Datasets

The authors evaluated TA-BG on three peptide systems of increasing complexity:

  • Alanine Dipeptide: The standard "toy" benchmark for this field (22 atoms).
  • Alanine Tetrapeptide: A mid-sized system (42 atoms) introduced here as a more challenging benchmark.
  • Alanine Hexapeptide: A large, complex system (62 atoms) with many metastable states that are difficult to resolve.

They also tested the method on a 2D Gaussian Mixture Model (GMM) with 40 modes to demonstrate its general sampling capabilities.

Key Insights and Ideas

  • Temperature as a Regularizer: The core "aha" moment is that the reverse KLD isn't fundamentally broken; it's just being used at temperatures where the modes are too isolated. High temperature acts as a bridge that lets the model see the whole picture.
  • Geometric vs. Linear Cooling: The authors found that a geometric temperature schedule (cooling by a constant ratio) maintains a much more consistent overlap between steps than a linear schedule, making the annealing process more stable.
  • The Power of Fine-Tuning: Adding a final fine-tuning step at the target temperature significantly boosts the Effective Sample Size (ESS), a key metric for sampling efficiency.
  • Resolving the Hexapeptide: For the largest system (Hexapeptide), TA-BG was the only variational method tested that could accurately resolve all metastable states.
Visualization of the annealing process for three peptides, showing how the free energy surface sharpens as temperature drops.

Key Results

  • Efficiency: TA-BG required roughly 3x fewer target energy evaluations than the FAB baseline to reach similar or better accuracy. This is crucial because energy evaluations (often requiring expensive quantum chemistry) are the primary bottleneck in these simulations.
  • Accuracy: On the Alanine Tetrapeptide, TA-BG achieved a significantly lower Negative Log-Likelihood (NLL) and better Ramachandran KLD (a measure of how well it captures backbone rotations) compared to FAB and standard reverse KLD.
  • Mode Coverage: As shown in the side-by-side comparisons, TA-BG successfully captures the metastable regions that standard reverse KLD completely misses due to collapse.
Side-by-side comparison of different methods at 300 K. TA-BG (ours) closely matches the ground truth, while REV KLD shows clear mode collapse.

Limitations and Future Work

  • Scaling to Higher Dimensions: While TA-BG scales better than previous methods, vanilla Importance Sampling (IS) eventually fails as dimensionality increases because the weights become too sparse. The authors suggest replacing IS with Annealed Importance Sampling (AIS) in future iterations to handle even larger proteins.
  • Transferability: The current model uses internal coordinates specific to each molecule. Moving toward equivariant, transferable flows would allow a single model to work across different molecular systems.
  • Starting Temperature: Choosing the initial high temperature currently requires some trial and error. The authors provided an ablation study (Figure 6) showing a "critical temperature" for each system, but automating this choice would be a significant improvement.

Summary updated

BibTeX
@inproceedings{schopmans2025temperature,
  author = {Henrik Schopmans and Pascal Friederich},
  title = {{Temperature-Annealed Boltzmann Generators}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=RqtRSrCbNu},
}
Figure