Introduction
Most machine learning models, including standard normalizing flows, operate under the assumption that data lives in flat, Euclidean space ($\mathbb{R}^D$). However, many real-world datasets possess inherently "non-Euclidean" geometries. For instance, protein structures are defined by sequences of angles, robotics involves periodic joint positions, and fields like geology and astronomy frequently deal with directional data on a sphere.
Attempting to model an angle (which lives on a circle) using a standard Gaussian distribution on a line introduces significant problems at the boundaries (e.g., $0$ and $2\pi$). Previous workarounds—such as "wrapping" a distribution around a circle or projecting from a higher-dimensional space—often result in intractable integrals, numerical instabilities, or limited expressivity.
This paper introduces a framework for building normalizing flows natively on non-Euclidean manifolds, specifically tori and spheres. By constructing these flows recursively from simple transformations on circles and intervals, the authors provide a numerically stable and expressive method to model complex, multi-modal distributions for angular and directional data.
Methodology
The authors propose building complex flows using a modular, "Lego-block" approach, beginning with the simplest non-Euclidean manifold: the circle ($\mathbb{S}^1$).
1. Flows on the Circle ($\mathbb{S}^1$)
To model data on a circle, the authors define three types of circular diffeomorphisms (invertible, differentiable maps) that strictly respect periodic boundary conditions:
- Möbius Transformations: Simple, elegant maps that can shift and "squish" a distribution to model peaked data.
- Circular Splines (CS): Piecewise rational-quadratic functions that offer high flexibility and are exactly analytically invertible.
- Non-Compact Projections (NCP): A technique that maps the circle to a real line, applies a standard transformation, and maps it back. This is handled carefully to avoid numerical "blow-ups" at the boundaries.
2. Generalizing to the Torus ($\mathbb{T}^D$)
Because a torus is mathematically just a product of circles (like the surface of a donut), the authors extend their circular flows using autoregressive flows. They transform one angle at a time, making the parameters of each transformation conditionally dependent on the previously generated angles.
3. Generalizing to the Sphere ($\mathbb{S}^D$)
The sphere presents a greater challenge because it cannot be decomposed into a simple product of circles. The authors propose two distinct solutions:
- Recursive Construction: They map the $D$-dimensional sphere to a cylinder (which is a product of a $(D-1)$-sphere and an interval). This clever topological trick allows them to use their 1D circle and interval flows as building blocks to "unroll" the sphere's dimensions one by one.
- Exponential-Map Flows: Alternatively, they propose a method that stays "intrinsic" to the sphere, utilizing the gradient of a scalar field to move points along the sphere's curved surface.
Experiments and Results
The authors evaluate their methods primarily on inference problems designed to test specific geometric challenges, including synthetic manifold targets (unimodal, multi-modal, and highly correlated densities), a 6-dimensional robot arm posterior, and Earth data projected onto a sphere.
Key Insights
- Topology Matters: It is mathematically impossible to create a smooth, one-to-one mapping between a Euclidean space and a sphere without hitting "singularities." The authors circumvent this by using recursive projections that are invertible almost everywhere.
- Recursion is Efficient: By breaking a high-dimensional sphere into a cylinder, the authors can reuse 1D spline and Möbius transformations. This makes the math significantly more manageable and computationally efficient.
- The Expressivity Trade-off: While individual Möbius and NCP flows are excellent for sharp distributions, composing them doesn't inherently increase expressivity (they form a mathematical "group"). To achieve greater flexibility, the authors successfully employ convex combinations (mixtures) of these flows.
Performance Highlights
- Superior Density Modeling: On both tori and spheres, the proposed flows significantly outperformed traditional directional statistics (like the von Mises-Fisher distribution) in capturing complex, multi-modal, and correlated data.
- Stability and Efficiency: The recursive flows remained numerically stable even when modeling extremely "sharp" distributions where previous methods failed. Furthermore, the recursive construction for spheres scales much better ($O(D)$ density updates) than the exponential-map approach ($O(D^3)$).
- Effective Sample Size (ESS): In importance sampling tests, the proposed flows achieved exceptionally high ESS (often near 90-100%) compared to baselines, proving they accurately captured the target distributions.
Limitations and Future Work
While highly effective, the framework has a few limitations. The recursive construction for spheres depends on the choice of coordinate axes, which might introduce an "axis-aligned" bias in very high dimensions. Additionally, while circular splines are analytically invertible, Möbius and NCP mixtures require numerical methods (like bisection search) to invert, potentially slowing down sampling.
Future work may explore extending these principles beyond tori and spheres to other Lie groups (such as $SU(n)$ used in particle physics), though handling the boundary conditions for more complex manifolds remains an open research challenge.
Summary updated