Energy-Weighted Flow Matching: Unlocking Continuous Normalizing Flows for Efficient and Scalable Boltzmann Sampling

Niclas Dern, Lennart Redl, Sebastian Pfister, Marcel Kollovieh, David Lüdke, Stephan Günnemann · DOI

Introduction

In computational physics and molecular biology, sampling from the Boltzmann distribution is a fundamental challenge. This distribution defines the probability of a system configuration based on its energy $E(x)$ and temperature $T$: $\mu_{\text{target}}(x) \propto \exp(-E(x)/T)$. While traditional methods like Markov Chain Monte Carlo (MCMC) are standard, they frequently struggle with "mode-hopping" in complex, rugged energy landscapes, often becoming trapped in local minima.

Generative models, particularly Continuous Normalizing Flows (CNFs), offer a potential solution by learning to map a simple base distribution to the complex target. However, standard training for these models typically requires a large dataset of ground-truth samples—the very samples we are trying to generate. Researchers from the Technical University of Munich have addressed this bottleneck with Energy-Weighted Flow Matching (EWFM), a framework that enables training CNFs using only the system's energy function.

The Energy-Weighted Flow Matching Objective

The core innovation of this work is the reformulation of the Conditional Flow Matching (CFM) objective. Standard CFM minimizes the difference between a learned vector field and a target vector field derived from data samples. EWFM proves that this objective can be computed without target samples by using importance sampling.

Comparison between standard Conditional Flow Matching (CFM) and the proposed Energy-Weighted Flow Matching (EWFM).

By reweighting the loss function with importance weights—the ratio between the target Boltzmann density and an arbitrary proposal density—the model can learn the correct vector field. This allows the use of highly expressive CNF architectures in settings where only the energy function is known.

Iterative and Annealed Training Strategies

Directly applying importance sampling can be unstable if the proposal distribution is significantly different from the target, leading to high-variance weights. To mitigate this, the authors introduced Iterative EWFM (iEWFM). In this approach, the model acts as its own proposal for subsequent training iterations. As the model improves, the proposal distribution aligns more closely with the target, reducing weight variance and stabilizing the learning process.

The iterative training process (iEWFM) showing the proposal distribution converging toward the target and the resulting reduction in importance weight variance.

For systems with high energy barriers, the authors further developed Annealed EWFM (aEWFM). This technique starts training at a high temperature to flatten the energy landscape, making exploration easier, and gradually "cools" the system to the target temperature as training progresses. Additionally, a sample buffer is utilized to cache energies and densities, significantly reducing the computational overhead of ODE solving and energy evaluations.

Experimental Evaluation and Results

The framework was tested on several benchmarks, including Gaussian Mixture Models (GMM-40) and Lennard-Jones clusters (LJ-13 and LJ-55).

  • Efficiency: On the LJ-13 system, EWFM achieved a 5,000-fold reduction in energy evaluations compared to previous state-of-the-art methods like iDEM, requiring only $1 \times 10^7$ calls versus $5 \times 10^{10}$.
  • Scalability: EWFM demonstrated superior performance on the high-dimensional LJ-55 cluster (165D), outperforming baselines in Negative Log-Likelihood (NLL) while maintaining high sample quality.
  • Robustness: The annealing strategy proved vital for discovering all modes in multi-modal landscapes where simple Gaussian initializations would fail.

Conclusion and Future Work

Energy-Weighted Flow Matching represents a significant step forward in making Continuous Normalizing Flows practical for physical sciences. By slashing the number of required energy evaluations by orders of magnitude, it opens the door to simulating larger and more complex molecular systems. Future research will focus on reducing the wall-clock time associated with ODE integration and exploring more sophisticated proposal distributions to further enhance training efficiency.

Summary updated

BibTeX
@inproceedings{dern2026energy,
  author = {Niclas Dern and Lennart Redl and Sebastian Pfister and Marcel Kollovieh and David Lüdke and Stephan Günnemann},
  title = {{Energy-Weighted Flow Matching: Unlocking Continuous Normalizing Flows for Efficient and Scalable Boltzmann Sampling}},
  booktitle = {DeLTa @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=JYP1FWXqxO},
}
Figure