Scaling Riemannian Diffusion Models

Aaron Lou, Minkai Xu, Adam Farris, Stefano Ermon

Overview

Riemannian diffusion models struggle to scale to high dimensions because the heat kernel—the manifold equivalent of a Gaussian transition—lacks a closed-form solution, forcing researchers to rely on poor approximations. This paper leverages the geometric properties of Riemannian symmetric spaces to develop a fast, highly accurate heat kernel estimator. This breakthrough allows diffusion models to scale to hundreds of dimensions on complex manifolds, unlocking new applications in lattice Quantum Chromodynamics (QCD) and contrastive learning.

The Challenge of Riemannian Manifolds

Standard diffusion models are incredibly powerful, but they are designed for flat, Euclidean spaces (like the pixel space of an image). However, in many scientific domains, data lives on curved surfaces known as Riemannian manifolds—think of Earth science data on a sphere, robotics states on a torus, or physics data on Lie groups.

To train a diffusion model, you need to know the transition probability between states over time (i.e., how the data diffuses). In Euclidean space, this is a simple, tractable Gaussian distribution. On a manifold, this transition is governed by the heat equation, and the resulting "heat kernel" has no closed-form mathematical expression.

Previously, researchers either used computationally explosive workarounds (like sliced score matching) or relied on rough approximations of the heat kernel that completely break down in high dimensions. Because of this mathematical bottleneck, Riemannian diffusion models have largely been stuck on low-dimensional toy problems.

A Geometric Solution: Symmetric Spaces & Heat Kernels

The authors bypass this bottleneck with a clever geometric observation: almost all manifolds used in practical machine learning (spheres, tori, Lie groups) belong to a special class called Riemannian symmetric spaces.

Because these spaces "look the same" in all directions, the complex heat kernel computations can be mathematically reduced to a simpler subspace called the maximal torus. This drastically cuts down the dimensionality of the math (e.g., reducing an $O(n^2)$ matrix computation to an $O(n)$ one).

Using this maximal torus perspective, the authors build a unified, highly accurate heat kernel estimator by combining two distinct mathematical approaches based on the diffusion time step ($t$):

  • For large time steps ($t$): They use an eigenfunction expansion restricted to the maximal torus.
  • For small time steps ($t$): Eigenfunctions become numerically unstable at small $t$, requiring thousands of terms. Instead, the authors use advanced asymptotic approximations (Schwinger-Dewitt and Sum Over Paths) that explicitly account for the manifold's curvature.
Heat Kernel Approximations

Finally, they introduce exact sampling methods to generate data from the heat kernel without relying on slow, error-prone geodesic random walks, utilizing rejection sampling and probability flow ODEs.

Key Insights and Results

Symmetry is the Key to Scalability By restricting the problem to Riemannian symmetric spaces, the intractable infinite sums of the heat kernel collapse into manageable computations. The realization that eigenfunction expansions blow up numerically at small time steps is crucial; swapping to curvature-aware approximations for small $t$ prevents the NaN errors that plagued prior work.

Smoothness Matters Concurrent methods like Riemannian Flow Matching (RFM) create non-smooth vector fields that fail on complex distributions (like dense checkerboards). Score matching naturally produces smooth paths, leading to better density estimation.

Flow Matching Paths

High-Dimensional Physics The model successfully scaled to model the Wilson action on a 128-dimensional $SU(3)$ lattice, achieving an effective sample size of 0.62. This is one of the first times differential equation-based manifold models have scaled to hundreds of dimensions.

Rescuing Contrastive Embeddings In contrastive learning, theoretical work focuses on the hyperspherical embedding, but practitioners usually discard it for the penultimate layer because the hypersphere representation performs poorly on downstream tasks. On CIFAR-100, using the raw hyperspherical embeddings for Out-of-Distribution (OOD) detection yielded a terrible 93.53% False Positive Rate. Applying the authors' diffusion model likelihoods slashed this FPR to 28.95%, making it highly competitive with state-of-the-art penultimate layer methods and bridging a major gap between theory and practice.

Limitations and Future Work

While a significant step forward, the method strictly applies to Riemannian symmetric spaces. While this covers almost all practical use cases, it remains a limitation for arbitrary, highly irregular manifolds.

Additionally, for the $SU(3)$ lattice task, the model currently learns from precomputed samples rather than directly optimizing a separate simulation-based objective. Future work could couple these score matching techniques with diffusion guidance to directly improve variational inference samplers for lattice QCD, as well as incorporate data symmetries (e.g., gauge equivariance) directly into the neural network architectures.

Summary updated

BibTeX
@inproceedings{lou2023scaling,
  author = {Aaron Lou and Minkai Xu and Adam Farris and Stefano Ermon},
  title = {{Scaling Riemannian Diffusion Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=FLTg8uA5xI},
}
Figure