Introduction
In machine learning, evaluating how similar two data distributions are is a fundamental task. Whether comparing images generated by a GAN to real photos or analyzing the representations learned by different neural networks, we need robust metrics. Current gold standards like Fréchet Inception Distance (FID) and Kernel Inception Distance (KID) are widely used, but they suffer from two major flaws:
- They are extrinsic: They depend on the specific coordinate representation of the data. If a dataset is rotated or translated, the score changes, even though the underlying "shape" of the distribution remains identical.
- They are uni-scale: They typically only evaluate the first few statistical moments (like mean and covariance). Consequently, they can be blind to global structural differences. Two distributions could have identical means and variances but completely different topological structures (e.g., a solid cloud of points versus a hollow ring).
Furthermore, existing metrics struggle to compare "unaligned" data—datasets that exist in entirely different vector spaces or possess different dimensionalities. To address these limitations, researchers have introduced Intrinsic Multi-scale Distance (IMD), a novel method that compares data distributions by analyzing the underlying geometry of the data manifold.
The IMD Methodology
IMD is grounded in the Manifold Hypothesis, which posits that high-dimensional data naturally resides on a lower-dimensional "surface" or manifold. Instead of comparing coordinates, IMD compares the intrinsic geometry of these manifolds.
The IMD pipeline operates in four main steps:
- Graph Construction: It builds a $k$-nearest-neighbor (kNN) graph from the data points to approximate the manifold.
- Spectral Analysis: It computes the Heat Kernel Trace (HKT) of the graph's Laplacian matrix. The heat kernel mathematically describes how information (or "heat") diffuses across the manifold over time.
- Multi-scale Comparison: By evaluating the HKT across different time scales, IMD captures both local, fine-grained details (short time scales) and global, topological structures (long time scales).
- Efficient Computation: Calculating the trace of a massive matrix exponential is notoriously expensive. To make IMD scalable to large datasets, the authors employ Stochastic Lanczos Quadrature (SLQ), estimating the trace in nearly linear time.
The resulting metric serves as a computationally efficient lower bound of the Spectral Gromov-Wasserstein distance, providing a mathematically rigorous way to compare Riemannian manifolds.
Key Insights and Applications
Comparing the Incomparable: Unaligned Data
Because IMD relies on the spectrum of the graph Laplacian, it is invariant to rotations and translations. More impressively, it can compare datasets with entirely different dimensions without requiring an alignment dictionary.
For example, the authors used IMD to compare word embeddings from Wikipedia across 16 different languages. IMD successfully identified linguistic "kinship" (e.g., grouping Slavic languages together) based purely on the intrinsic shape of their word distributions, a task where traditional metrics like FID and KID completely fail to capture meaningful variance.
Tracking Network Evolution
IMD can also be used to "watch" a neural network learn and process information. By comparing the data manifolds at intermediate layers of a network, researchers can track how representations evolve. The authors demonstrated that layers do not separate representations monotonically; instead, there is a distinct feature extraction phase before the manifolds stabilize.
Sensitivity to Topology and Noise
In synthetic "torus tests," IMD proved highly sensitive to topological errors. If a GAN generates points that statistically match a torus but erroneously fill in its "hole," FID and KID fail to notice the structural flaw. IMD, however, flags the topological discrepancy immediately.
Additionally, when images are subjected to Gaussian blur, IMD shows a gradual, stable increase in distance—accurately reflecting the slow destruction of the image manifold—whereas FID and KID scores explode erratically.
Limitations and Future Directions
While powerful, IMD has a few limitations. Its success heavily relies on the manifold assumption; if the data is purely high-dimensional noise lacking geometric structure, IMD provides less value. Additionally, because IMD computes a lower bound of the Gromov-Wasserstein distance rather than the exact value, it might miss extremely subtle geometric differences. Finally, the choice of hyperparameters, such as the number of neighbors ($k$) in the kNN graph, can impact results on highly specialized datasets.
Overall, IMD represents a significant step forward. By shifting from statistical matching to a geometrically-grounded approach, it paves the way for more expressive, robust, and versatile evaluation techniques in machine learning.
Summary updated