Feynman-Kac-Flow: Inference Steering of Conditional Flow Matching to an Energy-Tilted Posterior

Konstantin Mark, Leonard Galustian, Maximilian P.-P. Kovar, Esther Heid · 2025

Read Feynman-Kac-Flow: Inference Steering of Conditional Flow Matching to an Energy-Tilted Posterior by Konstantin Mark, Leonard Galustian, Maximilian P.-P. Kovar, Esther Heid (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-2509-01543.txt.

Introduction

Conditional flow matching generates samples quickly and well, but many uses need those samples steered toward exact requirements. Konstantin Mark, Leonard Galustian, Maximilian P. -P. Kovar, and Esther Heid formulate that steering as tilting the output with an energy potential, favoring samples with desired traits. Steering tools existed for diffusion models, yet none had been extended to flow matching.

The team derives Feynman-Kac steering for flow matching for the first time, adapting a method from statistical physics. Tests include synthetic tasks and the hard case of tilted distributions in high-dimensional space. They then tackle an unsolved challenge: generating transition states of chemical reactions with the correct chirality, the handedness that decides which reaction paths are possible. The work opens guided generation in flow models to precise scientific demands.

Catalog record

CREATORKonstantin Mark, Leonard Galustian, Maximilian P.-P. Kovar, Esther Heid
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE44 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2509-01543

Browse the full library · About the Tower of Babel

Full text

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

Feynman-Kac-Flow: Inference Steering of Conditional Flow Matching to an Energy-Tilted Posterior Konstantin Mark, Leonard Galustian, Maximilian P.-P. Kovar, Esther Heid Abstract Conditional Flow Matching(CFM) represents a fast and high-quality approach to generative modelling, but in many applications it is of interest to steer the generated samples towards precise requirements. While steering approaches like gradient-based guidance, sequential Monte Carlo steering or Feynman-Kac steering are well established for diffusion models, they have not been extended to flow matching approaches yet. In this work, we formulate this requirement as tilting the output with an energy potential. We derive, for the first time, Feynman-Kac steering for CFM. We evaluate our approach on a set of synthetic tasks, including the generation of tilted distributions in a high-dimensional space, which is a particularly challenging case for steering approaches. We then demonstrate the impact of Feynman-Kac steered CFM on the previously unsolved challenge of generated transition states of chemical reactions with the correct chirality, where the reactants or products can have a different handedness, leading to geometric constraints of the viable reaction pathways connecting reactants and products. Code to reproduce this study is avaiable open-source at https://github.com/heid-lab/fkflow . I Introduction Since its introduction by Lipman et al. Lipman et al. 2023 , Conditional Flow Matching (CFM) has seen several interesting applications, ranging from image Lipman et al. 2023 , audio Guo et al. 2024 and video Davtyan et al. 2023 generation to decision-making Zheng et al. 2023 , time series modelling Tamir et al. 2024 , protein modelling Stärk et al. 2023 ; Jing et al. 2024 or molecular structure design Tian et al. 2024 , amongst others. CFM transforms samples from a source distribution (such as random noise) to samples following a given target distribution (such as images or molecular structures) by modelling probability paths via vector fields. It largely improves on diffusion-based methods both in quality and speed, establishing CFM as a popular generative method Lipman et al. 2023 . For many current applications, the ability to adjust the distributions produced by a CFM model to conform to certain properties has gained importance. This can range from improving image quality for image generation tasks to making chemical structure geometries more physically plausible. Such a task is generally formulated as tilting a model’s output distribution with an energy potential- or reward-function. There are several approaches to fine-tuning diffusion and flow matching models to produce samples related to some reward function. Primarily, diffusion allows direct back-propagation over the sampling path Clark et al. 2024 . In a different direction, stochastic optimal control-based frameworks have been used to fine-tune a model to sample from a tilted distribution, both for diffusion Zhang and Chen 2022 and flow matching Domingo-Enrich et al. 2025 ; Tang et al. 2025 . Inference-only steering methods for diffusion models generally fall either under gradient based guidance Bansal et al. 2023 or sequential Monte Carlo(SMC) steering Wu et al. 2023 ; Li et al. 2024 . Using gradients in the guidance generally leads to a faster convergence but only works for differentiable reward functions. The SMC methods have been unified and extended into one framework through Feynman-Kac steering (FK) Singhal et al. 2025 . FK in particular also extends Importance Sampling (IS) which can be used trivially on any distribution to generate tilted samples, although the latter often struggles with distributions in high-dimensional and multi-modal settings. Yet, FK steering has not been extended to CFM, and is currently only used to steer diffusion models. A particularly promising but challenging application for steering methods is the generation of chemical structures, with a breadth of physics-inspired restrictions to tilt the target distribution to samples with low energies, bond length or angle constraints, or correct chirality, where many relevant molecular structures can occur left or right-handed causing a difference in biological activity. (Non-steered) generative models have shown large success in conformer generation Xu et al. 2022 ; Hassan et al. 2024 ; Jing et al. 2023 , the task of generating geometries of molecules that lie at local energy minima. This success has been extended to transition state (TS) prediction or refinement, first using diffusion Kim et al. 2024 and then using flow matching Duan et al. 2025 ; Galustian et al. 2025 ; Darouich et al. 2025 models, the latter offering most importantly much faster inference time. The generation of transition state structures is a highly relevant task in chemical reaction modelling. TSs are first order saddle points that lie on a minimal energy reaction pathway on a potential energy surface. They are normally determined through quantum mechanical calculations that are expensive to compute. CFM is able to model the generation of geometries as a transformation of probability distributions. Generating geometries that conform to the right chirality has been a tricky task in conformer generation. Chiral molecules cannot be transformed into their mirror image by rotation and translation alone, which presents a difficulty for the rotation-equivariant architectures used for these generative tasks. Simple choices to handle the problem of chirality in conformer generation involve simply flipping a conformation if a geometry with the wrong chirality was predicted Ganea et al. 2021 ; Hassan et al. 2024 , however this technique breaks down as soon as multiple chiral centres are involved and particularly for diastereomers. Ref. Hassan et al. 2024 tried implementing proper chirality handling in a CFM setting by implementing an SO(3)-equivariant architecture, but found that it was outperformed by simple flips. There are several methods specific to graph neural networks to deal with tetrahedral chirality by reducing the invariance of message passing aggregation to be aware of the order of neighbours Pattanaik et al. 2020 ; Gaiński et al. 2023 but they have failed to gain traction for representations used in generation tasks. Ref. Pattanaik et al. 2020 mentions inadequacy of many of the datasets including QM9 Ramakrishnan et al. 2014 for judging performance of models on complex chiral tasks. Datasets like GEOM Axelrod and Gómez-Bombarelli 2022 based on QM9 that are extensively used for benchmarking conformer generation tasks could, by extension, be a reason for a lack of focus on proper chirality awareness in recent work on conformer generation Wang et al. 2024 ; Ganea et al. 2021 ; Hassan et al. 2024 ; Hong et al. 2025 , although there are methods to accurately model chirality by working in non-euclidean spaces Jing et al. 2023 . In the more complex task of biomolecular modelling there have been recent advances in chirality awareness. Ref. Wohlwend et al. 2025 uses Feynman-Kac steering to reduce hallucinations including incorrect stereochemistry from a diffusion generative model. Ref. Corley et al. 2025 improve accuracy in chiral centres by adding chirality based angle gradients as features. The difficulty of generating chirality-aware geometries is exacerbated in the setting of TS generation. Primarily, chirality is not well-defined for TS, but rather comes together as a superposition of the chiralities of reactant and product that subtly depends on the mechanisms behind a given reaction. As such the technique of flipping into position is out of question but for simple cases where chiral centres are not actively involved in the reaction. Notably Ref. Duan et al. 2025 relies on incorporating reactant and product conformers into

Read the complete text