ESS-Flow: Training-free guidance of flow-based models as inference in source space
Adhithyan Kalaivanan, Zheng Zhao, Jens Sjölund, Fredrik Lindsten
TL;DR
ESS-Flow tackles conditional generation with pretrained flow-based models without retraining or gradients by performing Bayesian inference in the source space and sampling with Elliptical Slice Sampling. By exploiting the Gaussian source prior, it achieves gradient-free sampling from the target distribution $\pi(z) \propto g(T_\theta(z)) p(z)$, avoiding Jacobians and enabling use with non-differentiable simulations and quantization. The method, validated on materials design and protein structure prediction, outperforms several gradient-based and gradient-free baselines in terms of targeted property alignment and structural realism, while introducing a practical multi-fidelity extension for computational efficiency. This approach broadens the applicability of flow priors to scientific inverse problems, offering a flexible, training-free mechanism for controlled generation with principled Bayesian guarantees.
Abstract
Guiding pretrained flow-based generative models for conditional generation or to produce samples with desired target properties enables solving diverse tasks without retraining on paired data. We present ESS-Flow, a gradient-free method that leverages the typically Gaussian prior of the source distribution in flow-based models to perform Bayesian inference directly in the source space using Elliptical Slice Sampling. ESS-Flow only requires forward passes through the generative model and observation process, no gradient or Jacobian computations, and is applicable even when gradients are unreliable or unavailable, such as with simulation-based observations or quantization in the generation or observation process. We demonstrate its effectiveness on designing materials with desired target properties and predicting protein structures from sparse inter-residue distance measurements.
