Learning Distributions on Manifolds with Free-Form Flows

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

Introduction

Real-world data rarely conforms to flat, Euclidean spaces. Earth science datasets naturally reside on spheres, robotics and computer vision rely on 3D rotations ($SO(3)$), and molecular biology models protein backbone angles on tori. Modeling such data with standard neural networks introduces topological artifacts, such as discontinuities at the poles of a sphere or "seams" where angles wrap around.

To address these geometric constraints, researchers typically rely on two types of models:

  1. Specialized Architectures: Custom-built models designed for one specific shape (e.g., exclusively for spheres). These are difficult to adapt to novel geometries.
  2. Continuous-Time Models: Approaches like Manifold Diffusion or Flow Matching. While mathematically elegant and highly generalizable, they are computationally expensive. Generating a single sample requires solving complex differential equations (ODEs/SDEs), often taking hundreds of sequential steps.

Manifold Free-Form Flows (M-FFF) bridges this gap. It introduces a generative model that is as general as diffusion but as fast as a single-step neural network, achieving up to a 100x speedup over continuous-time models without sacrificing accuracy.

M-FFF models data on diverse manifolds by operating in an embedding space and projecting the output back onto the manifold.

Methods: Generalizing Free-Form Flows

M-FFF builds upon the recently introduced Free-Form Flows (FFF) framework. Standard normalizing flows require the neural network to be strictly invertible and possess a "tractable Jacobian"—a mechanism to easily calculate how the network stretches or compresses space. FFF relaxes this strict architectural requirement by utilizing a pair of standard networks (an encoder and a decoder) alongside a reconstruction loss to ensure they act as approximate inverses.

The Projection Interface

The core innovation of M-FFF is extending this relaxed framework to Riemannian manifolds using a projection-based approach. Instead of engineering a complex, manifold-aware neural network, M-FFF employs a standard feed-forward network (like a ResNet) that operates in an embedding space (e.g., standard 3D space for a 2D sphere). The network's output is then simply projected back onto the target manifold.

The Manifold Gradient Estimator

Training via maximum likelihood requires tracking how volume changes during the transformation. On a manifold, this volume change occurs in the tangent space—the local "flat" plane at any given point.

Transformations between tangent spaces. M-FFF calculates volume changes by mapping tangent vectors through the embedding space.

To handle this, the authors developed a novel stochastic Manifold Gradient Estimator. This estimator calculates the gradient of the log-likelihood by sampling noise vectors directly within the tangent space. By mapping these vectors through the embedding space and back, M-FFF can optimize the exact manifold density without requiring an inherently invertible architecture.

Experimental Evaluation

The authors evaluated M-FFF across a diverse set of complex geometries:

  • $SO(3)$ (Rotations): Synthetic mixtures of 3D rotation matrices.
  • $S^2$ (Spheres): Real-world Earth science data, including the locations of volcanic eruptions, earthquakes, floods, and wildfires.
  • Tori ($T^n$): Torsion angles of protein backbones and RNA structures.
  • Hyperbolic Space ($H^n$): Toy datasets on the Poincaré ball, which is crucial for modeling hierarchical data.
  • Curved Surfaces: Synthetic distributions mapped onto complex 3D meshes, such as the Stanford Bunny.

Key Insights and Results

  • Massive Inference Speedup: Because M-FFF does not need to solve an ODE during inference, it is typically two orders of magnitude (100x-1000x) faster than manifold diffusion or flow matching models.
  • State-of-the-Art Likelihoods: The speed-accuracy tradeoff is largely circumvented. On $SO(3)$ and Earth datasets, M-FFF consistently outperformed previous single-step methods and frequently beat slower multi-step diffusion models, as it does not suffer from the accumulation of numerical integration errors.
  • Architectural Simplicity: Projection acts as a universal interface. By "squashing" a standard network's output onto the manifold and applying the correct tangent-space mathematics, practitioners can achieve state-of-the-art results using simple ResNets rather than complex, specialized coupling layers.

Limitations and Future Directions

While highly efficient, M-FFF has a few limitations. The model can struggle slightly compared to multi-step methods when the target data distribution features extremely sharp edges or massive "empty" regions. Additionally, the accuracy of the density estimation is heavily dependent on the reconstruction loss remaining very low; if the encoder and decoder are not near-perfect inverses, likelihood estimates become less reliable.

Future work will likely explore scaling the method to higher-dimensional latent spaces and applying M-FFF to more complex manifold topologies, potentially unlocking new capabilities for manifold-constrained image and molecular generation.

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