Spread Flows for Manifold Modelling

Mingtian Zhang, Yitong Sun, Chen Zhang, Steven McDonagh

Abstract

Normalizing flows (NFs) are powerful generative models but struggle when data lies on a lower-dimensional manifold, as their training objectives become mathematically ill-defined. This paper introduces Spread Flows, which employ a learnable manifold prior and a "spread divergence" objective to successfully model manifold-constrained data and automatically identify its intrinsic dimensionality.

Introduction

Normalizing flows transform simple probability distributions into complex ones via invertible mappings. A significant limitation of standard NFs is the assumption that the data distribution occupies the full dimensionality of the ambient space. In practice, high-dimensional datasets, such as natural images, often reside on a lower-dimensional manifold—a curved surface embedded within the larger space.

When standard NFs are applied to such data, the Kullback-Leibler (KL) divergence and Maximum Likelihood Estimation (MLE) become ill-defined because the data density is singular (infinite on the manifold and zero elsewhere). This often results in a "curling up" effect in the latent space, where the model inefficiently uses its capacity to contort a high-dimensional prior to fit a low-dimensional target, leading to degraded sample quality and poor representations.

Methodology

Spread Flows address these challenges through two primary innovations:

  1. Learnable Manifold Prior: Instead of a fixed $D$-dimensional Gaussian, the model uses a "generalized Gaussian" prior $p(z) = \mathcal{N}(0, AA^T)$, where $A$ is a learnable matrix. If $AA^T$ is low-rank (rank $K < D$), the prior effectively collapses onto a $K$-dimensional manifold.
  2. Spread KL Divergence: To ensure a well-defined training objective, the authors introduce "spread divergence." This involves convolving both the data and model distributions with small Gaussian noise (the "spread"). This blurring makes the singular distributions absolutely continuous, allowing for optimization via standard KL divergence.
Conceptual mapping between latent space $\mathbb{P}_Z$ and data space $\mathbb{P}_X$ manifolds.

The framework utilizes volume-preserving flows (such as incompressible affine coupling layers). By keeping the transformation volume-preserving and the spread noise small, the training objective simplifies into a tractable form that resembles a noisy version of MLE.

Experimental Evaluation

The authors evaluated Spread Flows on a mix of synthetic and real-world benchmarks:

  • Synthetic Toy Data: 2D sine waves and 3D "S-curves" to visualize manifold fitting.
  • Fading Square: 32x32 images where the only variation is square intensity (intrinsic dimension = 1).
  • Synthetic MNIST: Controlled versions of MNIST with known intrinsic dimensions (5 or 10).
  • Real-world Data: Standard MNIST, SVHN, CIFAR-10, and CelebA (resized to 32x32).

Key Insights

  • Intrinsic Dimension Discovery: The intrinsic dimensionality of the data is directly tied to the rank of the learned prior's covariance matrix ($AA^T$). By analyzing the eigenvalues of $AA^T$ after training, researchers can identify a "cliff" where eigenvalues drop to near-zero, revealing the data's true dimensionality.
  • Non-linear PCA: The invertible nature of the flow allows for a form of non-linear Principal Component Analysis. Data can be mapped to the latent space and projected onto the $K$ principal components of the learned prior to obtain a compressed representation.
  • Mitigating Latent Contortion: By utilizing a low-dimensional prior, the model avoids the "curling" problem. It can map the data manifold directly to the prior manifold without the mathematical friction seen in standard flows.

Results

Spread Flows successfully identified the intrinsic dimensions of the Fading Square (1) and Synthetic MNIST (5 and 10) datasets. For real-world 32x32 CelebA images, the model estimated an intrinsic dimension of approximately 2700 out of 3072.

Visualization of manifold fitting in 3D space (a), data space (b), and latent space (c).

Quantitatively, Spread Flows outperformed competing models like Conformal Embedding Flows (CEF) on CelebA, achieving a Fréchet Inception Distance (FID) of 44.8 compared to CEF's 105.1 at a manifold dimension of 512. Qualitatively, the generated samples were visually sharper and more accurate.

Conclusion and Future Work

Spread Flows provide a robust framework for modeling data on manifolds by aligning the prior's dimensionality with the data's intrinsic structure. While highly effective, the current formulation assumes the data lies on a single, continuous manifold. Future work may explore "mixing priors" to handle datasets like MNIST that likely reside on a union of disconnected manifolds, as well as more sophisticated noise annealing schedules for the spread parameter.

Summary updated

BibTeX
@inproceedings{zhang2023spread,
  author = {Mingtian Zhang and Yitong Sun and Chen Zhang and Steven McDonagh},
  title = {{Spread Flows for Manifold Modelling}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2023},
}
Figure