Matching Normalizing Flows and Probability Paths on Manifolds

Heli Ben-Hamu, Samuel Cohen, Joey Bose, Brandon Amos, Maximilian Nickel, Aditya Grover, Ricky T. Q. Chen, Yaron Lipman

The Challenge of Non-Euclidean Generative Modeling

Generative modeling typically operates in flat, Euclidean spaces, such as the pixel grids of images. However, many real-world data types naturally reside on curved surfaces or manifolds. Examples include global weather patterns on a sphere, protein structures defined by dihedral angles, or the complex joint positions of a robotic arm.

Continuous Normalizing Flows (CNFs) are powerful tools for these tasks because they can transform a simple "noise" distribution into a complex data distribution by following a smooth vector field. Unfortunately, they suffer from a major computational bottleneck: training them via standard methods like maximum likelihood requires solving an Ordinary Differential Equation (ODE) for every single data point during every training iteration. This process is slow, memory-intensive, and notoriously difficult to implement on complex manifolds. While score-based or diffusion models serve as popular alternatives, they often rely on closed-form solutions to the heat equation, which simply do not exist for most manifolds.

A New Approach: CNF Matching (CNFM)

To overcome these limitations, researchers have introduced CNF Matching (CNFM), a novel training framework that utilizes a new objective called Probability Path Divergence (PPD).

1. Logarithmic Mass Conservation (LMC)

The theoretical foundation of CNFM is a specific partial differential equation (PDE) known as Logarithmic Mass Conservation. This equation relates the change in a probability density over time directly to the vector field that transports it.

2. The PPD Objective

Instead of computationally expensive ODE solving to track where a point ends up, the PPD objective measures how much the model's vector field violates the LMC equation at any given point in time and space. If this violation is zero, the model's vector field perfectly matches the target probability path. By shifting from an integration problem (solving the ODE) to a differentiation problem (checking the PDE violation), training becomes one to two orders of magnitude faster.

3. Target Paths

To train the model, a "target path" connecting the initial noise to the target data is required. The authors provide recipes for constructing these paths on manifolds using kernels—such as the von Mises-Fisher distribution for spheres. This allows the model to learn the path without ever needing to simulate the full flow during training.

Datasets and Performance

The researchers evaluated CNFM across several challenging domains, demonstrating its flexibility and scalability.

Toy 2D and spherical densities generated by the model
  • Toy 2D Densities: The model was tested on standard benchmarks on the Euclidean plane and the sphere ($S^2$), successfully capturing complex patterns like checkerboards and spirals.
  • Earth and Climate Dataset: The model was applied to real-world locations of earthquakes, floods, fires, and volcanic eruptions on the globe. In these tasks, CNFM achieved significantly better Negative Log-Likelihood (NLL) scores than previous state-of-the-art methods like Riemannian CNFs and Moser Flow.
Earth and climate datasets showing locations of fires, floods, volcanoes, and earthquakes
  • Higher-Dimensional Spheres: Pushing the limits of previous manifold-based models, CNFM successfully modeled a synthetic "checkerboard" density on a 15-dimensional sphere ($S^{15}$). Previous models typically struggled beyond 2 or 3 dimensions.
  • Robotics (MuJoCo): The method was also applied to state-space data for "Cheetah," "Walker," and "Humanoid" robots. These state spaces exist on complex product manifolds (combinations of Euclidean space and multiple spheres/circles representing joints).

Key Insights and Theoretical Guarantees

Beyond empirical success, CNFM offers strong theoretical backing. The authors proved that minimizing the PPD provides an upper bound on classical statistical distances, such as Total Variation and KL-divergence. Mathematically, this guarantees that minimizing PPD directly improves the model's fit to the data.

Furthermore, unlike diffusion models that are often locked into specific paths like Brownian motion, CNFM allows for a wide variety of target paths. This makes it highly adaptable to different geometric constraints. Crucially, the training time for CNFM remains relatively flat as model architecture grows, whereas standard CNF training sees an exponential increase in time per epoch.

Limitations and Future Directions

While CNFM represents a significant leap forward for manifold generative modeling, scaling to extremely high dimensions (e.g., 1024x1024 images) remains challenging. The logsumexp function used to approximate the target path can introduce numerical bias in these high-dimensional spaces. Additionally, the loss scales differently at various points in time ($t$), which can complicate optimization.

Future work will focus on refining these gradient estimations. The ultimate goal is to bring the speed and manifold-awareness of CNFM to high-resolution image generation and complex 3D molecular modeling.

Summary updated

BibTeX
@inproceedings{benhamu2022matching,
  author = {Heli Ben-Hamu and Samuel Cohen and Joey Bose and Brandon Amos and Maximilian Nickel and Aditya Grover and Ricky T. Q. Chen and Yaron Lipman},
  title = {{Matching Normalizing Flows and Probability Paths on Manifolds}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=LeJQ-qdaAPU},
}
Figure