ESS-Flow: Training-free guidance of flow-based models as inference in source space

Adhithyan Kalaivanan, Zheng Zhao, Jens Sjölund, Fredrik LindstenSubmission to ICLR 2026 · Rejected

Here is a concise, engaging blog-style summary of the paper.

TL;DR

ESS-Flow enables training-free, conditional generation with continuous normalizing flows and diffusion models without computing gradients or Jacobians. By framing conditional generation as Bayesian inference directly in the Gaussian source (noise) space, it leverages Elliptical Slice Sampling (ESS) to sample valid targets even when observation models or data representations involve non-differentiable operations like categorical quantization or black-box simulators.

What Problem Does This Paper Address?

Pretrained diffusion and flow-based generative models are exceptionally good at unconditional sampling, but controlling them to hit specific properties (e.g., target material hardness or matching experimental measurements) typically requires:

  1. Retraining on scarce paired data,
  2. Relying on approximate guidance terms, or
  3. Using gradient-based optimization through the ODE solver.

Gradient-based methods suffer from high computational overhead (backpropagating through an entire ODE trajectory) and fail entirely when the pipeline is non-differentiable—for example, with discrete categorical data (like atomic numbers in chemistry) or non-differentiable physics/docking simulators. Furthermore, gradient optimization can easily become trapped in disconnected modes of multimodal data distributions.

Methods

  • Inference in Source Space via Jacobian Cancellation: Continuous normalizing flows map a simple Gaussian source distribution $z \sim \mathcal{N}(0, I)$ to data space $x = T_\theta(z)$. In source space, the target density is $\pi(z) \propto g(T_\theta(z)) p(z)$, where the complex Jacobian determinant $| \det(J_{T_\theta}(z)) |$ neatly cancels out.
  • Elliptical Slice Sampling (ESS): Because the source distribution $p(z)$ is an isotropic Gaussian, the authors apply ESS directly in $z$-space. Each step draws an auxiliary vector $\nu \sim \mathcal{N}(0, I)$ defining an ellipse passing through the current state $z$. ESS adaptively shrinks an angular bracket along this ellipse until a point is accepted, needing only forward evaluations of the generative model $T_\theta$ and the reward/potential $g(x)$.
  • Multi-Fidelity Acceleration: To cut down the cost of solving ODEs, ESS-Flow runs MCMC using a coarse ODE discretization $\Delta$, then post-corrects samples via importance weights evaluated on a fine discretization $\delta \ll \Delta$.

Datasets

  • MP-20 (Materials Project): Used via the pretrained FlowMM Riemannian flow-matching model. Properties (bulk modulus, shear modulus, band gap, energy above hull) were evaluated with ALIGNN models trained on the JARVIS-DFT dataset, alongside symmetry search with Spglib.
  • PDB:7r5b (Protein Backbone): A 147-residue protein structure tested using a modified deterministic probability flow ODE derived from Chroma.
  • Synthetic 25-Component Gaussian Mixture Model (GMM): Used to benchmark dimensional scaling up to $d_x = 800$.

Key Insights and Ideas

  • Gradient-free exploration resolves quantization bottlenecks: Discrete properties (such as atomic number rounding) break autograd chains or yield zero gradients. ESS-Flow avoids gradient approximations (like softmax relaxations) entirely.
  • Overcoming disconnected modes: Because ESS searches along wide elliptical orbits in source space, proposals can jump across disconnected manifolds in data space that trap gradient flows (such as D-Flow).
  • Prior preservation prevents unnatural artifacts: In inverse problems like protein structure prediction, optimization-based methods (e.g., ADP-3D) overfit the target likelihood, causing severe atomic clashes. ESS-Flow strictly enforces the prior distribution, maintaining structural realism.

Key Results

  • Crystalline Materials Design:
  • Achieved drastically lower absolute error when targeting extreme (>99th percentile) properties compared to baselines. For example, on 300 GPa bulk modulus targeting, ESS-Flow had an absolute error of 8.99 GPa (vs. 205.88 GPa for D-Flow, 49.93 GPa for PnP-Flow, 39.14 GPa for DAPS).
  • Targeted non-differentiable discrete space group symmetry ($P6_3/mmc$) with a 92.3% success rate (compared to only 2.5% from the unconditional prior).
  • Achieved the highest combined S.U.N.T. (stability, uniqueness, novelty, threshold) rates across tasks.
  • Protein Backbone Inverse Problems:
  • Preserved protein realism: ESS-Flow produced structures with an ELBO of 8.89 and only 24.8 clashes, whereas gradient baselines that chased low distance error degraded to severe physical violations (ADP-3D: -5.68 ELBO, 731.3 clashes; DAPS: -8.07 ELBO, 483.3 clashes).
  • Scalability:
  • Tested on synthetic GMMs up to dimension $d_x = 800$, maintaining steady sampling efficiency ($2.7 - 4.1$ likelihood evaluations per step).
  • Requires substantially less peak GPU memory (e.g., 0.6 GB vs. 62.2 GB for D-Flow on band gap) because it needs no backpropagation graph.

Limitations and Future Work

  • High Evaluation Count: Although memory-efficient and gradient-free, ESS-Flow requires many forward ODE passes (tens to hundreds of thousands of total function evaluations).
  • Manifold-Collapsed Targets: MCMC in source space struggles when target likelihoods represent hard, lower-dimensional manifold constraints (e.g., noiseless image inpainting) where the prior mass covering the target is negligible.
  • Simple Multi-Fidelity Re-weighting Breaks under Sharp Targets: The post-hoc importance sampling approach suffered from low effective sample sizes (0.1%–1.0%) on sharply peaked potentials. Future work points toward integrating delayed-acceptance ESS or simulated tempering across ODE discretization levels.

Summary updated

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.
BibTeX
@misc{kalaivanan2025ess,
  author = {Adhithyan Kalaivanan and Zheng Zhao and Jens Sjölund and Fredrik Lindsten},
  title = {{ESS-Flow: Training-free guidance of flow-based models as inference in source space}},
  year = {2025},
  eprint = {2510.05849},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.05849},
}
Figure