Learning Distributions on Manifolds with Free-form Flows

Peter Sorrenson, Felix Draxler, Armand Rousselot, Sander Hummerich, Ullrich Köthe · DOI

Generative modeling has seen explosive growth, yet most standard tools—such as Diffusion Models or Normalizing Flows—are designed for Euclidean space. However, real-world data frequently resides on curved surfaces known as manifolds. Whether modeling global weather patterns on a sphere, the orientation of a robotic arm in 3D space, or the complex folding of proteins, the underlying geometry is a critical factor that Euclidean models often ignore.

In the NeurIPS 2024 paper, "Learning Distributions on Manifolds with Free-Form Flows," Peter Sorrenson and colleagues at Heidelberg University introduce Manifold Free-Form Flows (M-FFF). This framework provides a mathematically general and computationally efficient method for modeling complex distributions on manifolds, offering significant speed improvements over current state-of-the-art techniques.

M-FFF learns distributions across diverse manifolds (left) by projecting functions from an embedding space onto the target manifold (right).

The Challenge of Manifold Geometry

Treating manifold-structured data as flat Euclidean data leads to "topological artifacts," such as the extreme distortion seen at the poles of a map projection. To mitigate this, researchers use manifold-aware models. Current solutions typically fall into two categories:

  1. Specialized Models: Hand-crafted for specific shapes (e.g., spheres), these lack the flexibility to generalize to arbitrary geometries.
  2. Continuous-Time Models: Methods like Riemannian Diffusion or Flow Matching are general but rely on solving complex differential equations (ODEs or SDEs) to generate samples. This iterative process requires hundreds of function evaluations, making them too slow for real-time applications.

M-FFF offers a "Goldilocks" solution: a model that is general enough for any manifold but fast enough to sample in a single neural network step.

Methodology: Generalizing Free-Form Flows

M-FFF builds upon the Free-Form Flow (FFF) framework. Traditional Normalizing Flows require strictly invertible neural networks, which are difficult to design. FFF bypasses this by using a standard encoder-decoder pair ($f$ and $g$) and a reconstruction loss to encourage approximate invertibility.

The M-FFF framework maps tangent vectors through an embedding space using an encoder-decoder pair and projection operators.

The adaptation to manifolds involves three core innovations:

  • Embedding and Projection: The manifold is embedded in a higher-dimensional Euclidean space. The neural network operates in this space, and its outputs are mapped back to the manifold using a differentiable projection function ($\pi$).
  • Riemannian Change-of-Variables: The authors derived a generalized version of the probability change-of-variables formula that accounts for the curvature and metric of the manifold.
  • Tangent Space Gradient Estimation: To train via maximum likelihood, the model must calculate the "volume change" of the transformation. M-FFF does this efficiently by estimating the gradient of the log-likelihood specifically within the tangent space of the manifold, reducing both computational cost and variance during training.

Experimental Results and Versatility

The authors evaluated M-FFF across a diverse set of benchmark manifolds:

  • Synthetic SO(3): Distributions of 3D rotation matrices.
  • Earth Science ($S^2$): Real-world data including volcanic eruptions, earthquakes, and floods.
  • Structural Biology (Tori): Torsion angles of protein backbones ($T^2$) and RNA ($T^7$).
  • Hyperbolic Space ($H^2$): Data on the Poincaré ball, representing constant negative curvature.
  • Complex Meshes: The "Stanford Bunny," a manifold with non-trivial, varying curvature.

Key Insights

  • Massive Speedup: M-FFF is typically 100x faster at inference than multi-step methods like Riemannian Flow Matching or Diffusion because it avoids ODE/SDE integration.
  • State-of-the-Art Accuracy: On the $SO(3)$ rotation manifold, M-FFF outperformed specialized flows and matched multi-step diffusion models even on complex, multi-modal distributions.
  • Generalization: It is the first single-step method to perform effectively on complex 3D meshes like the Stanford Bunny, proving its utility beyond simple geometric primitives.

Limitations and Future Directions

While M-FFF represents a major advancement, its accuracy depends on the decoder's ability to reconstruct the encoder's input. High reconstruction error can lead to less reliable density estimations. Additionally, for extremely "spiky" or sharp distributions, multi-step methods still maintain a slight edge in capturing fine details. Future work will focus on scaling the framework to higher-dimensional manifolds, such as those encountered in high-energy physics, and refining projection methods for even more complex geometries.

Code Availability: https://github.com/vislearn/FFF

Summary updated

BibTeX
@inproceedings{sorrenson2024learning,
  author = {Peter Sorrenson and Felix Draxler and Armand Rousselot and Sander Hummerich and Ullrich Köthe},
  title = {{Learning Distributions on Manifolds with Free-form Flows}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=QbPHYPZKJI},
}
Figure