On Evaluation Metrics for Graph Generative Models

Rylee Thompson, Boris Knyazev, Elahe Ghalebi, Jungtaek Kim, Graham W. Taylor

Evaluating graph generative models (GGMs) has long been a slow, fragmented process that often ignores crucial node and edge features. While image generation benefits from standard, unified metrics like the Fréchet Inception Distance (FID), the graph domain has struggled to find a universally accepted equivalent. This paper demonstrates that features extracted from untrained, random Graph Neural Networks (GNNs) provide a fast, scalable, and domain-agnostic way to rank GGMs, significantly outperforming traditional structural metrics.

The Problem with Current GGM Evaluation

Currently, the standard practices for evaluating GGMs suffer from three major bottlenecks:

  1. No Single Score: Researchers usually report a "buffet" of metrics (e.g., Maximum Mean Discrepancy (MMD) on degree distributions, clustering coefficients, and orbit counts). If one model excels at clustering but another perfectly matches the degree distribution, model selection becomes highly subjective.
  2. Feature Blindness: Most traditional metrics only analyze the graph's topology. They ignore node and edge attributes, which are critical for domains like drug discovery where chemical labels matter just as much as the structural bonds.
  3. Prohibitive Speed: Calculating these classical metrics on large datasets is agonizingly slow, often relying on expensive graph kernels or Earth Mover’s Distance (EMD) calculations.

A Neural-Network-Based Approach

To resolve these issues, the authors propose shifting toward Neural-Network-based (NN-based) metrics. Instead of manually selecting and computing individual graph statistics, they utilize a GNN—specifically a Graph Isomorphism Network (GIN)—to extract high-dimensional embeddings of the graphs.

Proposed evaluation pipeline using GNN feature extractors

The core innovation is the use of untrained random GNNs. In image generation, metrics typically rely on a pretrained Inception network. However, a "universal" pretrained graph model doesn't exist due to varying node and edge dimensions across different datasets. The authors discovered that a GNN initialized with random weights is inherently powerful enough to distinguish graph structures and features without any training.

Using these extracted embeddings, they tested several distance measures:

  • Fréchet Distance (FD): The graph equivalent of FID.
  • MMD (with RBF and Linear kernels): Measuring the distance between embedding distributions.
  • Precision & Recall / Density & Coverage: Metrics designed to specifically decouple the "fidelity" (realism) and "diversity" (variety) of the generated graphs.

Key Insights: Randomness is a Feature

Surprisingly, random GNNs perform almost identically to pretrained ones for evaluation purposes. This is a massive win for usability, allowing the metrics to be domain-agnostic. Because the random GNN can handle any node or edge feature dimension, these metrics can be applied out-of-the-box to molecules, social networks, or citation graphs.

PCA embeddings showing Random GIN performs similarly to Pretrained GIN

Furthermore, the study revealed a major failure mode in classical metrics: they are often "diversity-blind." Traditional metrics like MMD on degree or clustering are terrible at detecting mode collapse—a scenario where a generator simply outputs the same "safe" graph repeatedly. The NN-based metrics easily flag this lack of diversity.

Results and Recommendations

After testing across six diverse datasets (including structural graphs, biological networks, and feature-rich molecular datasets like ZINC), the authors identified clear winners:

  • Recommended Metrics: The authors recommend MMD RBF and F1 PR (the harmonic mean of Precision and Recall) computed on random GNN features.
  • Superior Performance: MMD RBF achieved a median rank correlation close to 1.0 across fidelity and diversity experiments, whereas classical metrics frequently fell below 0.5 in diversity tests.
  • Massive Speedup: NN-based metrics are orders of magnitude faster. While classical MMD metrics become prohibitively slow as sample sizes grow, the proposed random-GNN metrics remain inexpensive and easily scale to datasets of 10,000+ graphs.
  • Feature Sensitivity: Unlike traditional methods, the random GNN metrics successfully detected subtle perturbations in continuous and discrete node/edge features.

Limitations

While these metrics are excellent for ranking models and measuring general distribution quality, they are not a complete replacement for domain-specific validity checks. For instance, in molecule generation, a high MMD RBF score indicates the generated distribution matches the training distribution well, but it doesn't strictly guarantee that every individual molecule is chemically stable or adheres to the laws of valency. Nonetheless, as a scalable, unified benchmark, random-GNN metrics represent a significant leap forward for GGM evaluation.

Summary updated

BibTeX
@inproceedings{thompson2022evaluation,
  author = {Rylee Thompson and Boris Knyazev and Elahe Ghalebi and Jungtaek Kim and Graham W. Taylor},
  title = {{On Evaluation Metrics for Graph Generative Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=QMdT_Btb_S},
}
Figure