Manifold Topology Divergence: a Framework for Comparing Data Manifolds

Serguei Barannikov, Ilya Trofimov, Grigorii Sotnikov, Ekaterina Trimbach, Alexander Korotin, Alexander Filippov, Evgeny Burnaev

Evaluating deep generative models like GANs has long been a challenging "black box" problem. While metrics like the Fréchet Inception Distance (FID) serve as the industry standard, they carry significant limitations: they rely heavily on pre-trained networks (restricting them primarily to 2D images), assume the underlying data follows a Gaussian distribution, and can be surprisingly blind to certain geometric distortions.

In Manifold Topology Divergence: a Framework for Comparing Data Manifolds, Barannikov et al. introduce a novel framework that shifts the focus away from feature-space statistics and toward the actual geometric "shape" (manifold) of the data.

The Core Problem and Existing Limitations

The "Manifold Hypothesis" posits that high-dimensional data (such as a $1024 \times 1024$ image) actually resides on a much lower-dimensional manifold. To accurately evaluate a generative model, we must determine if the manifold of the generated data faithfully matches the manifold of the real data.

Existing tools fall short in several ways. FID and Kernel Inception Distance (KID) rely on the "Inception" network, rendering them useless for domains without pre-trained classifiers, such as 3D medical scans or financial time-series. Conversely, earlier Topological Data Analysis (TDA) approaches like the Geometry Score (GScore) are "blind" to relative positions. For instance, if a dataset is shifted or flipped, the GScore remains identical, failing to detect that the data distribution has fundamentally changed.

Comparison of MNIST digits showing Geometry Score failing to distinguish between 5s and 2s, while MTop-Divergence captures the discrepancy.

The MTop-Divergence Solution

To overcome these hurdles, the authors propose a domain-agnostic metric called Manifold Topology Divergence (MTop-Divergence). The core innovation driving this metric is a mathematical tool called the Cross-Barcode($P, Q$).

In TDA, a "barcode" tracks how topological features (like connected components, holes, or voids) appear and disappear as one grows "balls" around data points—a process known as persistent homology. The authors adapt this by analyzing the discrepancy between two point clouds: $P$ (the real data) and $Q$ (the generated data). By constructing a specific filtered simplicial complex where distances within the generated cloud $Q$ are set to zero, the algorithm isolates the topological features of $P$ that are not covered by $Q$.

The MTop-Divergence score is calculated as the sum of the lengths of these "discrepancy intervals." Crucially, this algorithm scales almost linearly with the dimension of the ambient space, allowing it to efficiently process vectors with up to $10^7$ dimensions.

Key Results and Robustness

Because MTop-Divergence operates directly on point clouds in raw space, it is entirely domain-agnostic. The authors successfully tested it across a massive variety of domains, including 2D images (MNIST, CIFAR10, high-res FFHQ), 3D shapes (ShapeNet), and historical market stock data.

The metric proved highly sensitive to subtle geometric discrepancies like mode-dropping, intra-mode collapse, and "mode invention" (when a GAN hallucinates data types absent from the training set). On a modified CIFAR10 benchmark featuring artificial noise and mode dropping, MTop-Divergence demonstrated a robust 0.89 Kendall-tau rank correlation with the disturbance level, vastly outperforming the Geometry Score (0.36).

Graph demonstrating MTop-Divergence steadily tracking mode drop severity, whereas Geometry Score fluctuates unreliably.

Furthermore, in standard image tasks, MTop-Divergence rankings for different GAN architectures (such as WGAN vs. WGAN-GP) were consistent with FID, validating it as a reliable, classifier-free alternative. Despite its topological underpinnings, the method is highly efficient; evaluating a dataset with 3 million dimensions took only about 45 seconds using GPU acceleration.

Limitations and Future Directions

Like all point-cloud-based methods, MTop-Divergence is dependent on sampling. The score relies on the number of samples drawn, and very sparse manifolds might still present resolution challenges. Additionally, the metric exhibits some hyperparameter sensitivity, as prioritizing different "homology dimensions" ($H_0$ vs $H_1$) can alter which types of topological discrepancies are highlighted.

Looking forward, the authors suggest this framework could be extended to provide "precision" and "recall" analogs for manifolds. This would give researchers granular insights into whether a generative model is failing due to poor generation quality (precision) or a lack of diversity (recall), further cementing TDA as a powerful tool in the machine learning evaluation arsenal.

Summary updated

BibTeX
@inproceedings{barannikov2021manifold,
  author = {Serguei Barannikov and Ilya Trofimov and Grigorii Sotnikov and Ekaterina Trimbach and Alexander Korotin and Alexander Filippov and Evgeny Burnaev},
  title = {{Manifold Topology Divergence: a Framework for Comparing Data Manifolds}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=w6QIOqYQvc7},
}
Figure