Generating Physically Consistent Molecules with Energy-Based Models

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

TL;DR

Nature decides how molecules fold and settle using potential energy—configurations roll downhill into stable valleys. Modern AI models like diffusion generate 3D molecules by learning paths from noise to data, throwing away that physical energy map for easier math. EBMol brings physics back: it learns an explicit, persistent energy landscape without expensive training simulations, achieving state-of-the-art 3D molecule generation while unlocking "free" zero-shot perks like ranking sample quality, steering molecular shapes, and designing chemical linkers.

What Problem Does This Paper Address?

In physical reality, molecules at thermal equilibrium follow a Boltzmann distribution: low-energy configurations are stable and probable, while strained, high-energy arrangements are rare. Naturally, if you want to build a generative model for 3D molecules, learning a scalar Energy-Based Model (EBM) whose valleys correspond to stable molecules is the most physically grounded approach.

So why hasn't everyone done this? Because EBMs are notoriously painful to train and sample from. Training usually requires expensive Markov Chain Monte Carlo (MCMC) simulations or datasets sampled at true thermodynamic equilibrium (whereas standard chemical datasets just hand you isolated, relaxed minimum-energy structures). Sampling is just as rough: navigating from random noise to a valid molecule across a rugged, unphysical energy landscape easily gets stuck.

Diffusion and flow-matching models sidestepped these headaches by learning time-dependent transport fields that shuttle noise to data on a strict schedule. They work great, but at a steep cost: once generation is over, you have no persistent energy function left behind to score, rank, or guide molecules at test time.

Methods

EBMol uses a standard SE(3)-equivariant graph neural network (EGNN) to predict per-atom energies that sum up to a molecule's total energy, $E_\theta(\mathbf{x})$. What is brand new is how it shapes and explores this landscape:

  • Restoring Field Matching (RFM): Instead of running simulations during training, RFM constructs a geometric "bowl" around real molecules. Standard flow matching interpolates from noise ($t=1$) to data ($t=0$). RFM extends this path past the data to $t \in [-1, 1]$ (using linear extrapolation for 3D coordinates and reflections for categorical atom types). It trains the negative energy gradient $-\nabla E_\theta$ to point back toward the data from both sides, smoothly scaling the gradient to zero right at $t=0$, while a regularization term anchors clean data energies near zero.
  • Mixed-Geometry Mirror-Langevin Algorithm (MLA): Molecules combine continuous 3D coordinates with discrete atom types (represented as probabilities on a simplex). Standard Langevin dynamics pushes probabilities outside valid bounds. EBMol adapts MLA to update coordinates in Euclidean space while mapping atom types into an unconstrained dual (logit) space via a negative-entropy mirror map, adding noise there, and projecting back via Softmax.
  • Parallel Tempering: To scale compute at inference time, EBMol runs parallel sampling chains at different temperatures—hot chains explore broadly, cold chains refine locally, and periodic swaps send promising discoveries down the ladder.

Datasets

The authors train and evaluate on two standard 3D molecular benchmarks:

  • QM9: ~134k small organic molecules (up to 9 heavy atoms across 5 element types).
  • GEOM-Drugs: ~430k larger, drug-like molecules (averaging 44 atoms, up to 181, across 15 elements).

Notably, because existing models had saturated the legacy, QM9-calibrated lookup tables used on GEOM-Drugs, the authors adopt a revised evaluation protocol. Using OpenBabel for bond, charge, and aromaticity inference alongside calibrated valency tables and quantum-chemical (GFN2-xTB) relaxation metrics, the true data baseline jumps from 86.5% to 99.6% atom stability (and from ~0% to 88.2% molecule stability), restoring a meaningful benchmark.

Key Insights and Ideas

  • Physics emerges without energy labels: EBMol never sees quantum-mechanical energy labels during training—only static atom coordinates and types. Yet, its learned energy correlates strongly ($r = 0.65$) with physical GFN2-xTB relaxation energies on molecules generated by other models, making $E_\theta$ a fast, lightweight filter for screening out strained geometries.
  • Plug-and-play controllability: Because $E_\theta$ is a persistent, time-independent potential, you can simply add differentiable math functions to it at test time. By adding PCA-eigenvalue potentials during sampling, EBMol steers molecules into underrepresented linear, planar, or spherical shapes without retraining.
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.
  • Zero-shot linker design via atom-additivity: Because total energy is a sum over atoms, you can freeze known molecular fragments in 3D space and sample only the missing connecting atoms—solving complex linker design tasks out of the box.

Key Results

  • QM9: Scaling inference compute to 1810 network function evaluations (NFEs), EBMol reaches 99.76% atom stability, 97.09% molecule stability, and 98.93% validity, beating all bond-implicit baselines while using roughly half the parameters of the strongest competitor (SLDM).
  • GEOM-Drugs: At 7240 NFEs, EBMol achieves 61.42% molecule stability and 99.03% validity (vs. SLDM's 20.59% and 86.98% at 1000 NFEs; even at a compute-matched 1080 NFEs, EBMol leads at 24.68% and 95.36%).
  • Physical Realism: EBMol's structures sit remarkably close to true quantum local minima, achieving a median GFN2-xTB relaxation energy of 1.78 kcal/mol—an order of magnitude lower than prior bond-implicit models (e.g., SLDM at 17.90 kcal/mol) and even beating the 40.6M-parameter, bond-explicit Megalodon (3.19 kcal/mol) using just 2.2M parameters.
  • Zero-Shot Tasks: EBMol achieves a 73.9% average success rate across six zero-shot linker design tasks.

Limitations and Future Work

  • Sampling cost and sensitivity: Achieving top-tier results requires thousands of NFEs, and the Langevin/parallel-tempering samplers remain sensitive to hyperparameter tuning.
  • Quality–diversity tradeoff: Parallel tempering concentrates probability mass into the deepest energy basins, boosting validity at the cost of sample uniqueness and diversity.
  • Theoretical gap: While the authors prove training well-posedness and limiting behaviors, the guarantee that data points form strict local minima is verified empirically rather than proven formally.
  • Future directions: The authors suggest calibrating $E_\theta$ directly against quantum DFT energies (enabling unified generation and molecular dynamics), adopting accelerated Langevin samplers for speed, and adding repulsive potentials between chains to boost diversity.

Summary updated

Abstract

Molecules in equilibrium follow a Boltzmann distribution, making the underlying energy landscape a physically grounded modeling objective. However, such landscapes are difficult to learn from data and, once learned, hard to sample from. Diffusion and flow-matching models sidestep these difficulties by learning a time-conditional score or transport field between noise and data, losing the energy inductive bias in exchange for a more tractable training objective. We introduce EBMol, an energy-based model (EBM) that restores this inductive bias by learning an atom-additive scalar potential without explicit simulation during training. Our method employs a flow-inspired Restoring Field Matching objective to approximate the energy landscape. We adopt the Mirror-Langevin algorithm for sampling, enabling unified updates of atomic positions and types, and incorporate parallel tempering for inference-time compute scaling. EBMol is the first EBM for 3D molecular generation to achieve state-of-the-art performance on QM9 and GEOM-Drugs. Moreover, we show that the learned energy landscape serves as a principled quality metric for ranking and filtering configurations, and demonstrate controllable generation without retraining through shape-steered sampling via potential composition and zero-shot linker design.
BibTeX
@inproceedings{griesbacher2026generating,
  author = {Christoph Griesbacher and Lea Bogensperger and Andreas Habring and Thomas Pock},
  title = {{Generating Physically Consistent Molecules with Energy-Based Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=SEBAsCmCg3},
}
Figure