Flow Sampling : Learning to Sample from Unnormalized Densities via Denoising Conditional Processes

Aaron J Havens, Brian Karrer, Neta Shaul

TL;DR

This paper introduces "Flow Sampling," a novel framework for efficiently learning to sample from complex probability distributions defined by energy functions, without needing explicit data samples. It leverages diffusion models and flow matching to create a denoising process that learns directly from the energy function, significantly reducing computational cost and extending to challenging Riemannian manifolds.

What Problem Does This Paper Address?

In many scientific fields, like computational chemistry and physics, we encounter probability distributions that are defined by an "energy function" (or a "reward function" in reinforcement learning). While we can easily evaluate this function and its gradient, we often can't directly sample from the distribution it defines. This is because the normalization constant is unknown or intractable. Traditional methods like Markov Chain Monte Carlo (MCMC) can be slow and inefficient, especially for complex, high-dimensional distributions or when rapid sampling is needed for tasks like materials design. Existing diffusion-based samplers often rely on costly Monte Carlo corrections or auxiliary MCMC steps. The core challenge is to develop a method that can efficiently learn to sample from these unnormalized distributions without requiring direct samples from the target distribution itself, and to do so in a scalable and generalizable way, even for non-Euclidean geometries.

Methods

Flow Sampling builds upon the principles of diffusion models and flow matching, but adapts them for a "data-free" setting. Instead of conditioning on data samples, it conditions on noise samples. The key innovation is its training objective: it learns a denoising diffusion drift by regressing onto a conditional drift derived directly from the energy function. This is achieved by utilizing an "interpolant process" that connects a simple source distribution (like a Gaussian) to the target distribution.

Here's a breakdown of the novel aspects:

  • Denoising Conditional Drift: The model learns to predict the "drift" of a diffusion process that, when run in reverse (denoising), generates samples from the target distribution. This drift is conditioned on a noise sample from the source distribution.
  • Energy Function Integration: The training objective directly incorporates the energy function's gradient, allowing the model to learn the target distribution's shape without needing explicit samples. This is crucial because evaluating the energy function is often the bottleneck.
  • Interpolant Process for Efficiency: By using a specific type of interpolant process, the framework minimizes the number of energy function evaluations required during training. This is a significant improvement over methods that need repeated evaluations.
  • Riemannian Manifold Extension: The framework is extended to handle sampling on curved spaces (Riemannian manifolds), which are common in molecular modeling and other scientific applications. This involves adapting the diffusion process and interpolant to geodesic paths and deriving closed-form solutions for conditional drifts on specific manifolds like spheres and hyperbolic spaces.

Datasets

The paper evaluates Flow Sampling on several types of data and benchmarks:

  • Synthetic Energy Benchmarks: Standard datasets like Double-Well (DW-4), Lennard-Jones (LJ-13, LJ-55) potentials are used to test the sampler's ability to capture complex energy landscapes.
  • Peptide Conformer Generation: Two peptide systems, alanine dipeptide (Ala2) and alanine tetrapeptide (Ala4), are used to generate molecular conformations. This involves modeling distributions over torsional angles and atomic coordinates.
  • Spherical Distributions: Mixtures of von Mises-Fisher distributions on the unit sphere ($S^2$) are used to test the Riemannian manifold extension.
  • Amortized Molecular Conformer Generation: A large-scale benchmark from previous work (Havens et al., 2025) involving conditional Boltzmann distributions for molecular conformer generation is used.

Key Insights and Ideas

  • Data-Free Sampling is Achievable and Efficient: The core insight is that by cleverly leveraging diffusion models and flow matching, we can learn to sample from unnormalized distributions without needing direct samples of the target. This is a significant paradigm shift for many scientific applications.
  • Energy Gradients are Sufficient: The framework demonstrates that the gradients of the energy function, when used within a denoising diffusion process, provide enough information to learn the target distribution. This bypasses the need for expensive sampling or complex Monte Carlo methods.
  • Riemannian Geometry is Not a Barrier: The extension to Riemannian manifolds is a major breakthrough. It shows that diffusion-based sampling can be generalized to curved spaces, opening up possibilities for modeling complex molecular structures and other geometric data.
  • Efficiency Through Replay Buffers and Closed-Form Solutions: The use of replay buffers for energy gradients and closed-form solutions for conditional drifts on specific manifolds dramatically reduces computational cost and training time.

Key Results

  • State-of-the-Art Performance: Flow Sampling achieves state-of-the-art results on synthetic energy benchmarks and peptide conformer generation, outperforming existing methods.
  • Significant Speedup: The method demonstrates a 4x-8x speedup in simulation training for amortized conformer generation compared to previous approaches.
  • Robustness at Lower Training Costs: Flow Sampling maintains performance even when the number of energy function evaluations during training is substantially reduced, indicating its efficiency and scalability.
  • Accurate Mode Coverage: For multimodal distributions (like peptide conformations), Flow Sampling effectively captures all distinct modes and maintains better sample concentration around low-energy regions.
  • Successful Riemannian Sampling: The framework successfully samples from distributions on the sphere, demonstrating its capability in non-Euclidean geometries.

Limitations and Future Work

  • Fixed-Point Training: The current training procedure relies on a fixed-point iteration, where samples are drawn from a detached version of the model. While empirically effective, global convergence guarantees for this replay-buffer dynamics are not yet provided.
  • Constant Curvature Manifolds: The Riemannian extension currently relies on closed-form conditional drifts for constant curvature manifolds. Extending this efficiency to more general manifolds and constrained spaces is an important future direction.
  • Theoretical Guarantees: While empirically strong, further theoretical analysis of the convergence properties of the fixed-point training procedure would be beneficial.

Summary updated

BibTeX
@inproceedings{havens2026flow,
  author = {Aaron J Havens and Brian Karrer and Neta Shaul},
  title = {{Flow Sampling : Learning to Sample from Unnormalized Densities via Denoising Conditional Processes}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=YlcyOMTPNl},
}
Figure