Geometry Score: A Method For Comparing Generative Adversarial Networks

Valentin Khrulkov, Ivan V. Oseledets

Introduction: The Challenge of GAN Evaluation

Evaluating Generative Adversarial Networks (GANs) remains a significant hurdle in deep learning. Standard loss functions, such as the discriminator's loss, often fail to correlate with the visual quality or diversity of generated samples. While metrics like the Inception Score (IS) and Fréchet Inception Distance (FID) are widely used, they rely on pre-trained deep networks (typically trained on ImageNet). This dependency limits their effectiveness for non-visual data—such as physics or medical datasets—and introduces potential biases toward features prioritized by the pre-trained model.

A particularly difficult challenge is mode collapse, where a GAN learns to produce only a limited subset of the data distribution (e.g., generating only a single digit class in MNIST). Existing metrics frequently struggle to distinguish between a model that produces high-quality but repetitive images and one that captures the true underlying diversity of the dataset.

The manifold hypothesis suggests that generated data $p_{model}(\\mathbf{x})$ lies on a lower-dimensional manifold $\\mathcal{M}_{model}$.

Methodology: Topological Data Analysis

To address these limitations, we propose the Geometry Score, a domain-agnostic metric that compares the topological structure of generated data to that of real data. This approach leverages the Manifold Hypothesis, which posits that high-dimensional data points actually lie on a lower-dimensional manifold with a complex, characteristic shape.

The core of the method involves Persistent Homology:

  1. Simplicial Complexes: The manifold is approximated by "connecting the dots" between data points. When points are within a certain distance $\\epsilon$, they form edges; groups of close points form triangles (simplices), and so on, creating a simplicial complex.
  2. Witness Complexes: To maintain computational efficiency on large datasets, a small subset of "landmark" points is used. The remaining data points act as "witnesses" to determine which simplices should be constructed.
  3. Persistence Barcodes: As the connection radius $\\epsilon$ increases, topological features (like "holes") appear and eventually disappear. A barcode tracks the "persistence" of these features across different scales.
  4. Mean Relative Living Times (MRLT): We calculate the relative duration for which a specific number of holes exists. By averaging this over multiple random landmark selections, we derive a probability distribution representing the topological signature of the data.
  5. Geometry Score Calculation: The final score is the $L_2$ distance between the MRLT distribution of the real data and that of the generated data. A lower score indicates that the GAN's output successfully mimics the topological "shape" of the ground truth.
Construction of a simplicial complex $\\mathcal{R}_\\epsilon$ from a point cloud $X$ by growing balls of radius $\\epsilon$.

Experimental Validation

The Geometry Score was validated across several diverse domains:

  • Synthetic 2D Data: Experiments on simple shapes (circles, figure-eights) confirmed the algorithm's ability to correctly identify 1D holes (loops).
  • MNIST: Used to compare WGAN and WGAN-GP architectures, providing a quantitative basis for observed qualitative differences.
  • CelebA: High-resolution face data used to demonstrate the metric's sensitivity to mode collapse.
  • CaloGAN: A non-visual dataset from particle physics (calorimeter responses), demonstrating the metric's utility in scientific domains where pre-trained classifiers are unavailable.

Discussion: Topology as a Proxy for Diversity

The Geometry Score treats topology as a proxy for diversity. If real data contains many "loops" (representing distinct modes or variations) and the GAN output lacks them, the model has likely collapsed. By focusing on $H_1$ (one-dimensional holes), the metric captures essential topological features, analogous to how the first few terms of a Taylor series capture the essence of a function. Furthermore, the use of landmark stochasticity ensures that the resulting MRLT is a robust statistical measure rather than a sensitive, one-off topological calculation.

Results and Key Insights

  • WGAN-GP vs. WGAN: The Geometry Score quantitatively confirmed that WGAN-GP better captures the topology of MNIST digits than standard WGAN, aligning with community consensus.
  • Detecting Mode Collapse: In CelebA experiments where mode collapse was intentionally induced, the Inception Score failed to signal a problem. In contrast, the Geometry Score remained high, clearly indicating a loss of topological diversity.
  • Scientific Utility: The metric successfully validated CaloGAN, showing its output has a topological structure nearly identical to real physics data.

Conclusion and Future Directions

While the Geometry Score excels at measuring global structure and diversity, it does not directly measure the visual sharpness of individual images. A GAN could theoretically produce blurry images that still form the correct manifold shape. Future work may involve exploring higher-dimensional topological features ($H_2, H_3$, etc.) to provide deeper insights, albeit at a higher computational cost. Despite its intensity, the Geometry Score provides a vital, domain-independent tool for the rigorous evaluation of generative models.

Summary updated

BibTeX
@inproceedings{khrulkov2018geometry,
  author = {Valentin Khrulkov and Ivan V. Oseledets},
  title = {{Geometry Score: A Method For Comparing Generative Adversarial Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=H14EZjbO-r},
}
Figure