Temperature-Annealed Boltzmann Generators

Henrik Schopmans, Pascal Friederich · OpenReview

Abstract

Efficient sampling of unnormalized probability densities, such as the Boltzmann distribution of molecular systems, remains a significant challenge in computational chemistry. While variational approaches using normalizing flows and reverse Kullback-Leibler (KL) divergence have emerged as alternatives to traditional Markov chain Monte Carlo methods, they frequently suffer from mode collapse. This paper introduces Temperature-Annealed Boltzmann Generators (TA-BG), a method that leverages high-temperature pre-training and a reweighting-based annealing objective to ensure full coverage of the configurational space. We demonstrate that TA-BG outperforms existing baselines in accuracy and efficiency, particularly in resolving the metastable states of complex systems like alanine hexapeptide.

Introduction

The Boltzmann distribution describes the probability of a molecular system being in a certain state as a function of its energy and temperature. Accurately sampling this distribution is essential for calculating thermodynamic properties and understanding molecular function. However, the energy landscapes of molecules are often "rugged," characterized by high energy barriers that separate stable configurations, known as metastable states. Traditional Molecular Dynamics (MD) simulations often struggle to cross these barriers, requiring extensive computational time to achieve convergence.

Normalizing flows have been proposed as a "shortcut" to this problem, learning a differentiable mapping from a simple prior distribution (like a Gaussian) to the complex target landscape. However, when trained without existing data using the reverse KL divergence, these models often fall victim to mode collapse—focusing on a single energy minimum and ignoring other critical states. TA-BG addresses this by strategically manipulating the temperature during the training process to ensure global exploration.

Methodology

The TA-BG approach consists of a two-phase workflow designed to capture and maintain the diversity of molecular configurations as the system "cools" to room temperature.

1. High-Temperature Pre-training

At room temperature (300 K), probability mass is concentrated in narrow regions, making it difficult for a randomly initialized flow to discover all modes. TA-BG begins by training the normalizing flow at a significantly higher temperature (e.g., 1200 K) using the reverse KL divergence. At this temperature, energy barriers are effectively lowered, allowing the model to explore the entire configuration space and learn a global distribution without collapsing into a single mode.

2. Iterative Reweighting-Based Annealing

Once the global distribution is captured, the model is iteratively cooled through a sequence of intermediate temperatures. At each step, the model generates samples which are then reweighted using importance sampling to represent the distribution at the next, lower temperature.

Crucially, the training objective switches to forward KL divergence during this phase. Unlike reverse KL, which is "mode-seeking," forward KL is "mass-covering." By training on the reweighted samples from the previous step, the model is forced to maintain coverage of all previously discovered modes as the distribution narrows toward the 300 K target.

Architecture and Representation

The models utilize internal coordinates (bond lengths, angles, and dihedrals) rather than Cartesian coordinates. This representation, combined with rational-quadratic splines, allows the flow to more efficiently handle the periodic nature of molecular rotations and the rigid constraints of chemical bonds, which are difficult to learn in standard coordinate systems.

Experimental Results

The researchers evaluated TA-BG against three systems of increasing complexity: alanine dipeptide (22 atoms), alanine tetrapeptide (42 atoms), and alanine hexapeptide (62 atoms). Ground truth data for evaluation was generated using heavy-duty Replica Exchange Molecular Dynamics (REMD) simulations.

Accuracy and Mode Resolution

In all test cases, TA-BG achieved superior results in terms of Negative Log-Likelihood (NLL) and Effective Sample Size (ESS) compared to the state-of-the-art Flow Annealed Importance Sampling Bootstrap (FAB) method. Most notably, for the alanine hexapeptide—a challenging high-dimensional benchmark—TA-BG was the only method capable of accurately resolving all metastable states. Other methods either failed to find certain configurations entirely or produced significant distortions in the probability density.

Computational Efficiency

TA-BG demonstrates a significant reduction in computational overhead. By avoiding the expensive Annealed Importance Sampling (AIS) steps required by FAB during every training iteration, TA-BG achieved higher quality results with up to three times fewer target energy evaluations. For the hexapeptide system, TA-BG required $3.08 \times 10^8$ evaluations, whereas FAB required $4.2 \times 10^8$ while still failing to capture the full distribution.

Discussion and Future Work

The success of TA-BG suggests that the primary obstacle for variational sampling is not the reverse KL objective itself, but the ruggedness of the energy landscape at low temperatures. By utilizing temperature as a control variable, TA-BG provides a robust framework for training generative models on complex physical systems.

However, limitations remain. The reliance on fixed internal coordinates limits the transferability of the model across different molecular structures. Future research may focus on integrating the TA-BG annealing strategy with equivariant normalizing flows, which could potentially allow for models that generalize across different chemical species while maintaining the sampling efficiency demonstrated here.

Conclusion

Temperature-Annealed Boltzmann Generators represent a significant step forward in the application of machine learning to molecular physics. By combining high-temperature exploration with a mass-covering annealing process, TA-BG overcomes the long-standing problem of mode collapse, providing a fast and accurate tool for exploring the complex landscapes of molecular configurations.

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