Neural Sampling from Boltzmann Densities: Fisher-Rao Curves in the Wasserstein Geometry

Jannis Chemseddine, Christian Wald, Richard Duong, Gabriele Steidl

Introduction

Sampling from complex, unnormalized Boltzmann densities is a cornerstone of generative AI. However, simple energy-based interpolations often fail because mass "teleports" between modes, causing neural networks to struggle to learn the underlying distributions. This paper provides a rigorous mathematical proof explaining why these velocity fields explode and proposes a novel Gradient Flow Interpolation (GFI) based on Langevin dynamics. This new approach ensures smooth, well-behaved paths for more reliable neural sampling.

The Problem: Teleportation of Mass and Velocity Explosion

In generative modeling, a common objective is to sample from a target distribution $\rho_D$ (the "data") by transforming a simple distribution $\rho_Z$ (the "noise"). When dealing with Boltzmann densities—where the probability is defined by an energy function $f$ as $\rho \propto e^{-f}$—the normalizing constant is typically unknown.

A standard strategy is to create a path of densities $\rho_t$ that interpolates between the noise ($t=0$) and the data ($t=1$). However, researchers have observed a severe "teleportation-of-mass" issue: if the energy functions are linearly interpolated, the mass does not move smoothly. Instead, it remains at the source distribution until the very last moment and then abruptly "jumps" to the target.

Evolution of density over time, illustrating the 'teleportation-of-mass' issue where mass suddenly jumps to the target mode near t=1.

Mathematically, this sudden jump causes the velocity field—the vector field dictating how samples should move—to explode toward infinity. For a neural network attempting to learn this velocity field, this instability is catastrophic. It is akin to following a trajectory where the required speed suddenly jumps from a crawl to infinity.

Explosion of the velocity field norm as t approaches 1, demonstrating the mathematical instability of linear energy interpolation.

Methodology: Bridging Geometries

To resolve this, the authors bridge two mathematical frameworks: Fisher-Rao geometry (which describes how probability densities change) and Wasserstein geometry (which describes the optimal transport of mass).

  1. Theoretical Proof: The authors prove that a wide class of Boltzmann density curves are "absolutely continuous" in Wasserstein space. This guarantees that a valid, integrable velocity field must exist, even if naive interpolations fail to find it.
  2. Analytical "Explosion" Example: Using a concrete 1D example with Laplacian-like distributions, they analytically demonstrate exactly how and why the velocity field norm blows up during linear interpolation.
  3. Gradient Flow Interpolation (GFI): As their core contribution, the authors propose a new interpolation path inspired by the Fokker-Planck equation (closely related to Langevin dynamics).
  4. Instead of trying to learn both the path and the velocity, they fix the velocity field to a specific form: $v_t = \nabla(f_t - f_Z)$.
  5. They then only need to learn the time-dependent energy component $\psi_t$ using a neural network.
  6. This formulation ensures the path resembles a Wasserstein gradient flow, which is naturally smoother and completely avoids the teleportation problem.

Experimental Setup and Key Results

The researchers evaluated their GFI method on several challenging synthetic benchmarks designed to test mode coverage and high-dimensional scaling, including a 2D Gaussian Mixture Model (GMM) with 40 distinct modes, an exponentially scaling "Many Well" distribution, and an Asymmetric Laplacian setup designed to trigger teleportation failures.

  • Effective Sample Size (ESS): On the 40-mode GMM task, the proposed GFI achieved an impressive ESS of 0.992, whereas standard linear interpolation struggled at 0.183. A higher ESS indicates that the generated samples are highly representative of the true target distribution.
  • Mode Coverage: GFI successfully captured all modes in both the GMM and Many Well distributions. In contrast, linear and even some alternative "learned" interpolation methods suffered from mode collapse, completely ignoring certain regions of the target distribution.
  • Training Stability: By constraining the system to a path mathematically guaranteed to be better behaved, the GFI approach produced a stable flow field that avoided extreme jumps, making the neural network training process significantly more robust.

Limitations and Future Work

While GFI offers a mathematically sound solution to the teleportation problem, it comes with computational trade-offs. The loss function for GFI involves calculating Laplacians (second derivatives), which becomes computationally expensive in very high dimensions. Although the authors suggest using Hutchinson’s trace estimator to mitigate this, scaling to massive datasets like high-resolution images remains a bottleneck.

Additionally, the method currently assumes some prior domain knowledge of the target distribution to initialize the sampling strategy. Finally, while the velocity field is demonstrably better behaved, the authors note that the mathematical regularity of the learned energy component $\psi_t$ itself warrants further investigation.

Summary updated

BibTeX
@inproceedings{chemseddine2025neural,
  author = {Jannis Chemseddine and Christian Wald and Richard Duong and Gabriele Steidl},
  title = {{Neural Sampling from Boltzmann Densities: Fisher-Rao Curves in the Wasserstein Geometry}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=TUvg5uwdeG},
}
Figure