Energy-Based Flow Matching for Generating 3D Molecular Structure

Wenyin Zhou, Christopher Iliffe Sprague, Vsevolod Viliuga, Matteo Tadiello, Arne Elofsson, Hossein Azizpour · 2025

Read Energy-Based Flow Matching for Generating 3D Molecular Structure by Wenyin Zhou, Christopher Iliffe Sprague, Vsevolod Viliuga, Matteo Tadiello, Arne Elofsson, Hossein Azizpour (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-18949.txt.

Introduction

Wenyin Zhou and co-authors reframed a molecule-building method in 2025 around energy, the score that says how natural a shape is. Tools that dream up molecular shapes serve drug docking, protein folding, and design. Flow matching, which morphs random shapes into real ones step by step, is a leading approach.

Their view learns a single map that carries a random layout toward a true structure, guided by energy ideas. The setup links to two neat traits: applying the map twice changes little, and results stay stable. It also echoes the polish step used by a famous folding tool. On docking and backbone-building tests, the method beat recent flow and diffusion rivals on the same budget. The authors call the energy lens both sound in theory and strong in practice.

Catalog record

CREATORWenyin Zhou, Christopher Iliffe Sprague, Vsevolod Viliuga, Matteo Tadiello, Arne Elofsson, Hossein Azizpour
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE70 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2508-18949

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Energy-Based Flow Matching for Generating 3D Molecular Structure Wenyin Zhou, Christopher Iliffe Sprague, Vsevolod Viliuga, Matteo Tadiello, Arne Elofsson, Hossein Azizpour Abstract Molecular structure generation is a fundamental problem that involves determining the 3D positions of molecules’ constituents. It has crucial biological applications, such as molecular docking, protein folding, and molecular design. Recent advances in generative modeling, such as diffusion models and flow matching, have made great progress on these tasks by modeling molecular conformations as a distribution. In this work, we focus on flow matching and adopt an energy-based perspective to improve training and inference of structure generation models. Our view results in a mapping function, represented by a deep network, that is directly learned to iteratively map random configurations, i.e. samples from the source distribution, to target structures, i.e. points in the data manifold. This yields a conceptually simple and empirically effective flow matching setup that is theoretically justified and has interesting connections to fundamental properties such as idempotency and stability, as well as the empirically useful techniques such as structure refinement in AlphaFold. Experiments on protein docking as well as protein backbone generation consistently demonstrate the method’s effectiveness, where it outperforms recent baselines of task-associated flow matching and diffusion models, using a similar computational budget. 1 Introduction (a) Flow matching data parameterization. (b) Flow Matching: idempotent flow map Figure 1 : Training paradigm of standard flow matching and IDFlow. x_{0} and x_{1} are samples from the source and target distribution p_{0}(x) and p_{1}(x) , x_{t} is the linear interpolant between the source and target sample, \hat{x}_{1} is the prediction of the network, f_{\theta}(\hat{x}_{1}) is the refined prediction, L_{\text{CFM}} is the conditional flow matching loss and L_{\text{R}} is the refinement loss. (a) Flow matching: directly predict the data \hat{x}_{1} given the interpolant x_{t} . (b) IDFlow: a mapping function represented by a deep neural network f_{\theta} , iteratively predicts and refines the prediction. The energy is estimated to be the input output structure difference after refinement. Structure prediction, the task to determine a molecule’s 3D structure, is a fundamental problem in structural biology for understanding diverse biological mechanisms ( Kessel & Ben-Tal 2018 ) . It finds various applications, such as protein docking, which generates the bound structure of protein-ligand complex, and de novo protein design, which creates novel proteins fulfilling certain desirable biological functions. Regression-based structure prediction models ( Jumper et al. 2021 ; Baek et al. 2021 ; Lin et al. 2023 ) have demonstrated remarkable performance by using a deep neural network to make a point estimate of the structure. However, these methods do not capture aleatoric uncertainty due to the possibility of multiple molecular conformations. In contrast to regression-based models, generative methods, such as diffusion ( Song & Ermon 2019 ; Ho et al. 2020 ; Song et al. 2021 ) and flow matching models ( Lipman et al. 2023 ; Albergo & Vanden-Eijnden 2023 ; Liu et al. 2022 ) , can generate several possible configurations modeling the positional distribution of molecules. Owing to this advantage, sampling-based approach has recently attracted huge interest in molecular structure generation, including molecular conformer generation ( Hoogeboom et al. 2022 ) , molecular docking ( Corso et al. 2023 ) , and protein design ( Watson et al. 2023 ; Campbell et al. 2024 ) . Here, importantly, we first observe that these families of generative modeling are generally reminiscent of the computational models for molecular structure determination. Particularly, in computational models, a stable equilibrium structure is sought as the local minimum of an energy function governed by the Boltzmann distribution p(x)\propto\exp{(-E(x))} , which resembles modeling (and generating from) the data distribution by estimating the score – or a corresponding energy – of its density. In this work, we make this connection explicit and propose a simple modification of the objective in flow matching that directly minimizes an energy function. Specifically, we take the reconstruction error \|x-\hat{x}\| as the energy function and locally construct the energy landscape using contrastive predictions sampled from the flow model. Leveraging a data parameterization ( Stärk et al. 2023 ; Yim et al. 2023a ) of flow matching, minimizing our devised energy, quite intriguingly, translates into training a neural network that iteratively predicts and refines the generated sample as shown in Fig. 1 , rendering the neural network, an approximated idempotent function. Notably, our trained idempotent function (IDFlow) simultaneously serves as both a neural sampler and a refiner, leading to the characterization of a predictor-refiner sampler, analogous to the predictor-corrector sampler in diffusion models ( Song et al. 2021 ) . This approach iteratively refines the sampling trajectory toward points where the energy function approximates zero, effectively enhancing flow matching as an energy-based model but crucially without significant increase in training cost. The key contributions are as follows. • We adopt an energy-based model perspective for flow matching on sampling-based molecular structure generation tasks which respects the energy minimization. • We provide a simple instance of such framework with negligible computational burden, IDFlow, which iteratively predicts and refines the sample and, importantly, draws interesting connections to related approaches, such as structure refinement. • We conduct extensive experiments based on two recent flow matching models tackling three structure prediction tasks of (single and multi-ligand) docking and protein design using four public datasets. Our results show that IDFlow improves the structure generation performance over the recent task-associated flow matching and diffusion models. 2 Background 2.1 Energy-Based Models Energy-Based Models (EBMs) consider a positive energy function E_{\theta}(x)\in\mathbb{R}_{+} assigning a scalar value to each data point x . Learning within this paradigm requires devising an energy function and a loss function to shape the energy landscape. For instance, the L_{2} regression loss could be seen as directly using the energy function for the loss and the exact format of the energy function (referred to as the energy architecture hereafter) is the L_{2} norm between the network output f_{\theta}(x) and the label y : \displaystyle\textbf{Energy}:\quad E_{\theta}(x) \displaystyle=||f_{\theta}(x)-y||^{2} (1) \displaystyle\textbf{Loss}:\quad L_{\theta}(x) \displaystyle=E_{\theta}(x), (2) where (x,y) is a training pair of input and annotation. Training with this strategy primarily reduces the energy of the training examples. In general, there are two ways of training the EBMs: 1) contrastive approaches which maximize the energy margin between positive and negative training examples, and 2) regularized methods that minimize the volume of low-energy space while avoiding the collapse of the overall energy landscape, e.g., regularizing the latent space to be close to the standard Gaussian as low energy space in variational autoencoders ( Kingma & Welling 2013 ) . Particularly, the collapse occurs when the network produces identical outputs regardless of the input. One contrastive method of training EBMs is learning a function that maps the points off the data manifold to the points on the data manifold ( LeCun 2022 ) . It is this latter approach that we adopt in this work to improve Flow Matching for structure prediction. For a detailed review of EBMs, see ( LeCun et al. 2006 ) . 2.2 Flow Matching Flow matching ( Lipman et al. 2023 ; Lipman et al. 2024 ; Albergo & Vanden-Eijnden 2023 ; Liu et al. 2022 ) is a simulation-free training method for continuous normalizing flows ( Chen

Read the complete text