Variational Wasserstein gradient flow

Jiaojiao Fan, Qinsheng Zhang, Amirhossein Taghvaei, Yongxin Chen

Introduction

Many problems in machine learning and physics—such as sampling from a posterior or modeling gas diffusion—can be framed as "gradient flows" on the space of probability distributions. The gold standard for discretizing these flows is the Jordan-Kinderlehrer-Otto (JKO) scheme.

However, implementing JKO numerically is notoriously difficult. At each step, one must minimize a functional that often involves the probability density itself. In high-dimensional spaces, estimating density from samples suffers from the curse of dimensionality. Recent neural-network-based attempts (like JKO-ICNN) tried to bypass this using Input Convex Neural Networks, but they require computing the log-determinant of a Hessian matrix—a calculation that scales cubically ($O(n^3)$) with the dimension $n$.

This paper introduces JKO-Flow, a variational approach to Wasserstein gradient flows that eliminates the need for explicit density estimation or computationally expensive Hessian calculations, enabling scalable optimization over probability distributions in high dimensions.

Methodology: Variational Wasserstein Gradient Flow

Instead of calculating the density-dependent objective function directly, the authors leverage the variational (dual) representation of $f$-divergences.

Key components of this approach include:

  • Minimax Optimization: The JKO proximal step is recast as a primal-dual problem. A "transport map" $T$ (the primal) moves samples to minimize energy, while a "dual function" $h$ estimates the divergence between the current and target distributions.
  • Neural Parameterization: Both $T$ and $h$ are parameterized as neural networks.
  • Sample-Based Updates: Because the variational form only requires expectations over distributions, the algorithm works entirely with batches of samples. This bypasses the need for explicit density formulas or expensive Hessian computations.

Key Results and Insights

The authors evaluated JKO-Flow on a diverse set of benchmarks, including Gaussian Mixture Models (GMM), Bayesian inference tasks, and unconditional image generation (MNIST, CIFAR10).

Fitted GMM measure using JKO-Flow

Dimensional Independence and Speedup

The most significant advantage of JKO-Flow is that by using the dual form, training complexity becomes largely independent of the problem's dimension. While previous methods slow down significantly as $n$ increases, JKO-Flow's training time remains relatively flat.

Training time comparison across dimensions

In high-dimensional GMM sampling ($n=32$), JKO-Flow maintained a training time of ~22 seconds per two JKO steps, whereas the previous state-of-the-art (JKO-ICNN-d) jumped to over 100 seconds.

Accuracy and Stability

  • Bayesian Inference: On Bayesian Logistic Regression, JKO-Flow achieved comparable or better log-likelihood and accuracy across multiple real-world datasets compared to existing particle-based and neural methods.
  • Generative Modeling: The JKO framework acts as a natural regularizer. Unlike standard GANs, which often suffer from mode collapse, JKO-Flow's inherent Wasserstein distance penalty encourages more stable training. For CIFAR10 generation, JKO-Flow achieved a Fenchel Inception Distance (FID) of 23.1, outperforming other gradient-flow-based generative models.

Limitations and Future Work

While highly scalable, the method has a few limitations:

  • Minimax Instability: Similar to GANs, primal-dual training can be temperamental, requiring careful balancing between the transport map and the dual function.
  • Inference Bottleneck: If evaluating the density of a generated point is required (rather than just generating samples), an invertible map is still needed, reintroducing some computational complexity during evaluation.
  • Beyond $f$-divergences: Current theory focuses on functionals written as $f$-divergences. Extending this to more general functionals, like interaction energies, remains an open path for future research.

Summary updated

BibTeX
@inproceedings{fan2022variational,
  author = {Jiaojiao Fan and Qinsheng Zhang and Amirhossein Taghvaei and Yongxin Chen},
  title = {{Variational Wasserstein gradient flow}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=zQkvkKKNHVY},
}
Figure