The Shape of Data: Intrinsic Distance for Data Distributions

Anton Tsitsulin, Marina Munkhoeva, Davide Mottin, Panagiotis Karras, Alex Bronstein, Ivan Oseledets, Emmanuel Müller

Abstract: Generative models are often used to sample high-dimensional data points from a manifold with small intrinsic dimension. Existing techniques for comparing generative models focus on global data properties such as mean and covariance; in that sense, they are extrinsic and uni-scale. We develop the first, to our knowledge, intrinsic and multi-scale method for characterizing and comparing underlying data manifolds, based on comparing all data moments by lower-bounding the spectral notion of the Gromov-Wasserstein distance between manifolds. In a thorough experimental study, we demonstrate that our method effectively evaluates the quality of generative models; further, we showcase its efficacy in discerning the disentanglement process in neural networks.

The Challenge of Comparing Unaligned Data

In machine learning, comparing data distributions is a fundamental task. Whether evaluating if a GAN matches a real data distribution or tracking how neural network representations evolve during training, we need robust metrics. Currently, the gold standards are the Fréchet Inception Distance (FID) and Kernel Inception Distance (KID).

However, these metrics rely on extrinsic properties—global statistics like mean and covariance within a specific embedding space. This makes them "uni-scale" and often blind to global structural or topological flaws. Crucially, extrinsic metrics cannot compare datasets that are unaligned (e.g., word embeddings from different languages without a dictionary) or have different dimensionalities.

Introducing Intrinsic Multi-scale Distance (IMD)

To address these limitations, this paper introduces Intrinsic Multi-scale Distance (IMD). Unlike previous methods, IMD relies purely on the internal "shape" of the data manifold.

How IMD Works

  1. Graph Construction: The data points are treated as a manifold approximated by a $k$-nearest-neighbor ($k$NN) graph.
  2. Heat Kernels: The method computes the normalized graph Laplacian and derives the Heat Kernel Trace (HKT). By observing how "heat" diffuses across the graph over time $t$, IMD captures geometric signatures at multiple scales: small $t$ for local geometry and large $t$ for global structure.
  3. Distance Calculation: IMD compares HKTs across a logarithmic grid of time scales, acting as a lower bound to the spectral Gromov-Wasserstein distance.

To ensure scalability, the authors use Stochastic Lanczos Quadrature (SLQ) to avoid the $O(n^3)$ cost of full eigendecomposition, achieving near-linear time complexity.

Key Insights: Geometry and Topology

  • Intrinsic > Extrinsic: By looking only at internal distances, IMD can compare spaces with no direct mapping, such as 64-dimensional vs. 512-dimensional representations.
  • Topological Awareness: Standard metrics can be fooled by topological failures. For instance, if a GAN generates points inside the "hole" of a torus, FID and KID might still report a good score. IMD, however, detects these structural errors through its multi-scale heat diffusion analysis.
  • Architectural Convergence: IMD reveals that networks with entirely different architectures (e.g., VGG-16 vs. ResNet-20) actually converge to highly similar intrinsic geometric structures in their final layers.
IMD tracks the convergence of neural network representations across layers (left) and training epochs (right).

Experimental Results

Language Affinity

One of the most striking results is IMD's ability to cluster 16 unaligned languages by their genealogical kinship using only word embeddings. While FID and KID failed to find meaningful structure in these unaligned spaces, IMD successfully grouped Slavic and Semitic languages together based on their intrinsic geometric signatures.

IMD captures language kinship in unaligned word embeddings (a) and significantly outperforms FID/KID in detecting these relationships (b).

Robustness and GAN Evaluation

IMD demonstrates superior robustness to noise. When applying Gaussian blur to CIFAR-10, FID and KID drift so significantly that blurred CIFAR-10 eventually appears closer to MNIST than to its original clean version. IMD remains stable, preserving correct dataset relationships. Furthermore, IMD correctly ranks WGAN-GP as superior to WGAN across image datasets, providing better topological guarantees than traditional metrics.

Conclusion

IMD provides a powerful, scalable, and theoretically grounded framework for manifold comparison. By moving from extrinsic statistics to intrinsic geometry, it opens new doors for evaluating generative models and understanding the internal representations of deep neural networks across disparate data spaces.

Summary updated

BibTeX
@inproceedings{tsitsulin2020shape,
  author = {Anton Tsitsulin and Marina Munkhoeva and Davide Mottin and Panagiotis Karras and Alex Bronstein and Ivan Oseledets and Emmanuel Müller},
  title = {{The Shape of Data: Intrinsic Distance for Data Distributions}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=9ODtNAxYxXF},
}
Figure