Principal Manifold Flows

Edmond Cunningham, Adam D. Cobb, Susmit JhaarXiv 2022

Abstract

Normalizing flows map an independent set of latent variables to their samples using a bijective transformation. Despite the exact correspondence between samples and latent variables, their high-level relationship is not well understood. In this paper, we characterize the geometric structure of flows using principal manifolds and understand the relationship between latent variables and samples using contours. We introduce a novel class of normalizing flows, called principal manifold flows (PF), whose contours are its principal manifolds, and a variant for injective flows (iPF) that is more efficient to train than regular injective flows. PFs can be constructed using any flow architecture, are trained with a regularized maximum likelihood objective, and can perform density estimation on all of their principal manifolds. In our experiments, we show that PFs and iPFs are able to learn the principal manifolds over a variety of datasets. Additionally, we show that PFs can perform density estimation on data that lie on a manifold with variable dimensionality, which is not possible with existing normalizing flows.

Introduction

Normalizing flows (NFs) are powerful generative models that use bijective mappings to transform simple distributions (like a Gaussian) into complex data distributions. However, they are often treated as "black boxes." Because the latent space can be transformed by any volume-preserving function without changing the output density, the relationship between a specific latent variable and a feature in the data is usually arbitrary.

Furthermore, standard flows struggle with the "manifold hypothesis"—the idea that high-dimensional data actually lies on a lower-dimensional surface. Most flows assume the data has the same dimensionality as the latent space. While "injective flows" exist to handle lower-dimensional data, they are computationally expensive and require prior knowledge of the data's dimensionality. Principal Manifold Flows (PFs) address these issues by aligning their internal latent structure with the geometric "skeleton" (principal manifolds) of a data distribution.

Methodology

The core innovation of PFs is ensuring that the flow's contours—the paths traced in data space when one latent variable is changed while others are held constant—align with the data's principal manifolds (directions of maximum variance).

Principal Manifold Flows (PF) align contours with the data's principal manifolds, avoiding the "tangled" latent mappings seen in standard Normalizing Flows (NF).

To achieve this, the authors enforce an orthogonality constraint. They prove that if the contours of a flow are mutually orthogonal, they correspond to the principal manifolds. They define a "Pointwise Mutual Information" (PMI) metric, $\mathcal{I}_{\mathcal{P}}$, which measures how much these contours deviate from orthogonality. The PF objective adds this PMI metric as a regularizer to the standard maximum likelihood objective.

For high-dimensional cases like images, the authors introduce Injective PFs (iPFs). By deriving a version of their objective that uses the Jacobian of the inverse mapping $g(x)$, they make training practical for complex architectures. Notably, setting the regularization hyperparameter $\alpha=1$ makes the iPF objective significantly cheaper to compute than standard injective flows, requiring only a single vector-Jacobian product.

Experimental Evaluation

The paper evaluates PFs on synthetic 2D datasets, a variable-dimension 3D manifold, and the MNIST dataset.

Qualitative comparison of NF and PF on synthetic datasets. PFs successfully recover the "skeleton" of complex distributions like the Swiss Roll and Pinwheel.

On 2D tasks, PFs achieved nearly zero PMI ($\mathcal{I}_{\mathcal{P}} \approx 0.00$), meaning their contours were perfectly orthogonal and followed the data's shape. In contrast, standard NFs produced tangled contours. On a custom 3D dataset that transitions from 1D (a line) to 2D (a surface), the PF correctly recovered the true density and identified the local rank with high accuracy (KL divergence of 0.0146). This ability to handle variable rank is a significant advancement over existing flows.

On MNIST, the iPF variant was 10x more computationally efficient to train than standard injective flows while showing much stronger alignment between latent dimensions and true principal components.

Discussion and Limitations

PFs provide significant geometric interpretability: moving along a latent axis corresponds to moving along a principal manifold. However, the orthogonality constraint is strict, requiring highly expressive flow architectures to satisfy $\mathcal{I}_{\mathcal{P}} = 0$ while fitting the data. Additionally, the index of a latent dimension might jump across different regions of space, potentially leading to discontinuities. Scaling these geometric constraints to extremely high-dimensional datasets remains a challenge for future work.

Conclusion

Principal Manifold Flows bridge the gap between generative modeling and geometric manifold learning. By enforcing orthogonality between latent dimensions, PFs enable interpretable generative paths and allow for accurate density estimation on data that lives on manifolds with varying dimensionality.

Summary updated

BibTeX
@misc{cunningham2022principal,
  author = {Edmond Cunningham and Adam D. Cobb and Susmit Jha},
  title = {{Principal Manifold Flows}},
  year = {2022},
  eprint = {2202.07037},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.07037},
}
Figure