NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Maximum Mean Discrepancy Gradient Flow

Michael Arbel, Anna Korba, Adil Salim, Arthur Gretton

In the world of machine learning, generative modeling often requires transforming one probability distribution into another—for example, turning a cloud of random noise into a realistic image. While tools like Generative Adversarial Networks (GANs) are popular for this task, they are notoriously finicky to train.

A NeurIPS 2019 paper by Michael Arbel and colleagues, titled "Maximum Mean Discrepancy Gradient Flow," provides a rigorous mathematical framework for this process. By constructing a "Wasserstein gradient flow," the authors offer a more stable, theoretically grounded alternative to traditional adversarial training.

The Challenge of Optimal Transport with Samples

Imagine you have a pile of sand (your starting distribution, $\nu$) and you want to move it into a specific mold (your target distribution, $\mu$). In mathematics, this is known as optimal transport.

Standard methods like Langevin Dynamics or Stein Variational Gradient Descent (SVGD) are effective, but they typically require knowing the exact mathematical formula (the density) of your target. In real-world scenarios, we rarely have this formula; instead, we only have samples (e.g., a dataset of images).

The Maximum Mean Discrepancy (MMD) is a metric that compares two distributions using only samples. While MMD is widely used as a loss function, the "path" (or gradient flow) a distribution takes when minimizing MMD directly was not fully understood. Because the MMD landscape is non-convex, the "sand" often gets stuck in local optima before reaching the target mold.

A Flow-Based Solution: Noise Injection

To solve this, the researchers propose a Wasserstein gradient flow of the MMD with a critical algorithmic fix.

  1. The Flow: They define how a set of particles should move by following the negative gradient of the MMD. This is essentially gradient descent performed on the space of probability distributions.
  2. The Euler Scheme: They provide a discrete-time particle update rule: $X_{n+1} = X_n - \gamma \nabla f(X_n)$.
  3. Noise Injection (The Secret Sauce): To prevent particles from getting stuck in local minima, they regularize the flow. Before calculating the gradient at each step, they "blur" the particles by adding a small amount of Gaussian noise. This ensures the gradient remains informative even in regions where there are currently no particles.
  4. Sample-Based Practicality: The resulting algorithm only requires samples from the target distribution, making it highly applicable to empirical datasets.

Key Insights

  • MMD is not "Displacement Convex": The authors mathematically prove that MMD lacks the convexity properties that guarantee global convergence in optimal transport. This explains why simple MMD descent often fails in practice.
  • Noise vs. Diffusion: Many researchers try to fix convergence issues by adding "diffusion" (as in Langevin dynamics). However, the authors demonstrate that noise injection is superior. Diffusion actually changes the target distribution you are aiming for, whereas noise injection preserves the true global optimum of the MMD.
  • Computational Efficiency: Unlike Kernel Sobolev Discrepancy (KSD), which requires solving complex linear systems, the MMD flow operates at $O(MN + N^2)$, making it much cheaper to compute for large sets of particles.

Empirical Superiority and Robustness

The theoretical guarantees of the noisy MMD flow—specifically its $O(1/n)$ convergence rate to a global minimum—are backed by strong empirical results. The authors tested the flow on synthetic datasets, including a classic "Student-Teacher" ReLU network setup where a student network tries to match a teacher's output distribution.

Training error, test error, and noise sensitivity comparisons for MMD flows.

As illustrated in the figure above, standard MMD flow fails to converge effectively. However, the MMD + noise injection method (red line) achieves remarkable results:

  • Training and Test Error: It rapidly drops to a training error below $10^{-5}$ (subplot a) and achieves the lowest test error (subplot b), significantly outperforming standard MMD, diffusion-based MMD, and KSD.
  • Robustness: Subplot (c) highlights a major practical advantage. The noise injection method is robust across a wide "valley" of noise levels ($\beta$), whereas the diffusion method only works within a very narrow, hard-to-tune window.

Future Directions

While the paper establishes a strong theoretical foundation, scaling this approach to extremely high-dimensional data (like high-resolution images) remains a challenge, likely requiring deep neural networks to approximate the kernel. Nonetheless, these insights pave the way for better, more stable training algorithms for generative models and deepen our understanding of optimization in complex, non-convex landscapes.

Summary updated

BibTeX
@inproceedings{arbel2019maximum,
  author = {Michael Arbel and Anna Korba and Adil Salim and Arthur Gretton},
  title = {{Maximum Mean Discrepancy Gradient Flow}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=cApPqkN09tm},
}
Figure