Generating Physically Consistent Molecules with Energy-Based Models

Christoph Griesbacher, Lea Bogensperger, Andreas Habring, Thomas PockarXiv 2026

TL;DR

EBMol is a novel energy-based model for 3D molecular generation that restores the physical inductive bias of energy landscapes without the need for expensive simulations during training. By combining a new "Restoring Field Matching" objective with Mirror-Langevin sampling, it achieves state-of-the-art performance on standard benchmarks and enables zero-shot capabilities like shape-steered generation and linker design.

What Problem Does This Paper Address?

In nature, molecules at equilibrium follow a Boltzmann distribution, meaning their stability is directly tied to their potential energy. Ideally, generative models should learn this underlying "energy landscape" to produce physically realistic structures. However, traditional Energy-Based Models (EBMs) are notoriously difficult to train because they usually require expensive Markov Chain Monte Carlo (MCMC) simulations to estimate gradients.

To avoid these headaches, recent state-of-the-art methods like diffusion and flow-matching models learn to map noise to data through time-conditional fields. While effective at generating diverse molecules, they lose the explicit scalar energy function. This means they lack a principled way to rank generated samples by physical quality or to easily compose different physical constraints at inference time. EBMol aims to bridge this gap by making energy-based modeling both tractable and high-performing.

Methods

The authors introduce two primary innovations to make EBMol work:

  1. Restoring Field Matching (RFM): This is a simulation-free training objective inspired by flow matching. Standard flow matching defines a path from noise ($t=1$) to data ($t=0$). EBMol extends this path "beyond" the data to $t=-1$. As shown in Figure 1, the model is trained to match a "restoring field" that points toward the data from both sides. This geometrically forces the data points to become local minima in a learned scalar energy landscape $E_\theta$.

    Figure 1: Overview of Restoring Field Matching. The RFM loss shapes a scalar energy landscape with data points x0 ∼pdata as local minima by training the negative gradient −∇Eθ to point toward data from both sides: from the prior (interpolation, t ∈[0, 1]) and from beyond the data (extrapolation, t ∈[−1, 0]).
  2. Mirror-Langevin Algorithm (MLA): Sampling from a molecular energy landscape is tricky because molecules have a mixed state space: continuous 3D coordinates and discrete atom types (represented as categorical distributions on a simplex). EBMol adapts the Mirror-Langevin Algorithm to perform unified updates across both spaces, ensuring atom types stay validly constrained while coordinates evolve.

To further improve sampling, they use Parallel Tempering, running multiple chains at different "temperatures" to help the model escape local traps and find the most stable molecular configurations.

Datasets

The model was evaluated on two standard 3D molecular generation benchmarks:

  • QM9: A dataset of ~134k small organic molecules (up to 9 heavy atoms).
  • GEOM-Drugs: A much larger and more diverse dataset of ~430k drug-like molecules (average 44 atoms).

Notably, the authors argue that existing evaluation protocols for GEOM-Drugs are too lenient. They introduce a revised protocol using the OpenBabel toolbox to more accurately assess chemical validity, including formal charges and aromaticity, which significantly raises the bar for what counts as a "stable" generated molecule.

Key Insights and Ideas

  • Energy as a Quality Filter: Because EBMol learns an explicit energy function, the energy value itself serves as a zero-shot metric for quality. The authors found a strong correlation ($r=0.65$) between EBMol's predicted energy and the actual physical energy calculated by high-fidelity quantum chemistry methods (GFN2-xTB), despite the model never seeing real energy values during training.
  • Zero-Shot Composition: Since the model outputs a scalar potential, you can simply add new differentiable energy terms at inference time to steer generation. For example, by adding a "shape potential," they could force the model to generate linear, planar, or spherical molecules without any retraining.
  • Physical Realism: Unlike previous "bond-implicit" models that often produce strained geometries, EBMol's energy-centric approach naturally leads to structures that are much closer to physical local minima.

Key Results

  • State-of-the-Art Performance: EBMol is the first EBM to achieve SOTA results on QM9 and GEOM-Drugs, outperforming strong diffusion and flow-matching baselines like SLDM and GeoBFN in terms of molecular stability and validity.
  • Physical Accuracy: On GEOM-Drugs, EBMol achieved a median relaxation energy of 1.78 kcal/mol. This is an order of magnitude lower than previous bond-implicit methods (which were often $>17$ kcal/mol) and is competitive with models that have 18x more parameters and explicit bond supervision.
  • Controllable Generation: The model successfully shifted its output distribution toward specific geometric shapes using composable potentials, as illustrated in the shape distribution plots.
Figure 2: Shape distribution of 5000 generated molecules. Left: unsteered generation. Right: generation with composable shape potentials targeting linear, planar, and spherical geometries. Steering successfully redirects sampling toward underrepresented shapes.

Limitations and Future Work

While EBMol is a major step forward, the authors note a few limitations:

  • Compute Cost: Achieving the best results requires a high number of Network Function Evaluations (NFEs) during sampling, making it slower than some one-step or few-step generators.
  • Hyperparameter Sensitivity: The sampling process (especially the Mirror-Langevin step size and noise scales) is sensitive and requires careful tuning.
  • Future Calibration: A promising next step is "energy calibration"—replacing the current zero-anchor objective with one that aligns the learned energy directly with physical units (like kcal/mol) from DFT calculations, potentially turning EBMol into a fast, approximate molecular dynamics potential.

Summary updated

BibTeX
@misc{griesbacher2026generating,
  author = {Christoph Griesbacher and Lea Bogensperger and Andreas Habring and Thomas Pock},
  title = {{Generating Physically Consistent Molecules with Energy-Based Models}},
  year = {2026},
  eprint = {2605.18381},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.18381},
}
Figure