AgraSSt: Approximate Graph Stein Statistics for Interpretable Assessment of Implicit Graph Generators

Wenkai Xu, Gesine Reinert

Deep generative models like GraphRNN and NetGAN have become powerful tools for simulating complex networks. However, evaluating these "black-box" graph generators presents a unique challenge: they are often implicit. While they can easily produce new graph samples, they do not provide an explicit mathematical formula (a probability density function) for the graphs they generate.

To address this, researchers introduced AgraSSt, a novel statistical framework designed to evaluate implicit graph generators by comparing them against a single observed real-world network. By leveraging Stein operators and kernel methods, AgraSSt provides a principled way to detect model misfit and offers interpretable "criticisms" to help researchers understand exactly where their generative models are failing.

The Core Challenges

Evaluating implicit graph generators typically runs into two major hurdles:

  1. The Single-Sample Problem: Standard statistical tests (like Maximum Mean Discrepancy) usually require a large set of "ground truth" graphs to compare against. In many fields—like sociology or biology—we might only have one observed network, such as the specific social ties of a single organization or historical group.
  2. The Interpretability Gap: Even if a test tells you a model is "bad," it rarely tells you why. Is the model missing triangles? Is the edge density wrong?
Conceptual diagram illustrating the challenge of comparing multiple generated graphs from a black-box model to a single observed real-world network.

AgraSSt bridges this gap by providing a goodness-of-fit test that works with implicit models and a single target graph.

How AgraSSt Works

The authors build on Stein’s Method, a mathematical technique used to bound the distance between probability distributions. The AgraSSt framework introduces several key innovations:

  • Approximate Stein Operators: Traditionally, Stein operators require an explicit probability function. The authors propose an approximate operator for conditional graph distributions. They estimate the probability of an edge existing (given the rest of the graph) by drawing many samples from the black-box generator.
  • Kernel Discrepancy: They use Reproducing Kernel Hilbert Spaces (RKHS) to transform this operator into a test statistic. This allows the test to be sensitive to a wide range of structural features without needing to manually specify every single one.
  • Graph Re-sampling: To make the method computationally feasible for larger networks, they introduce a randomized version of the statistic that sub-samples vertex pairs, ensuring the tool scales efficiently.
  • Interpretable Criticism: Because the method is based on conditional edge probabilities, researchers can compare the "learned" probabilities from the model against the "true" features of the observed graph to identify specific structural misfits.

Key Insights and Results

The authors evaluated AgraSSt using synthetic benchmarks (like the Edge-2Star-Triangle model) and classic real-world networks (Zachary’s Karate Club and Padgett’s Florentine Marriage Network). They tested state-of-the-art generators including GraphRNN, NetGAN, and CELL.

Competitive Power

In synthetic trials where the ground truth is mathematically known, AgraSSt performed nearly as well as "Exact" tests (which require knowing the model's internal math). Furthermore, it significantly outperformed other implicit-model baselines, such as the Mahalanobis distance on degree distributions (MDdeg).

Rejection rate plot demonstrating AgraSSt's competitive statistical power, closely tracking the 'Exact' test and outperforming baselines like MDdeg.

Real-World Detection and Interpretability

On the Karate Club network, AgraSSt correctly rejected GraphRNN and NetGAN (p-values $\approx$ 0.00), identifying that they failed to capture the distinct community split of the club. However, it found the CELL model to be a much better fit (p-value 0.34).

AgraSSt also revealed an interesting failure mode for GraphRNN: it often fails on Exponential Random Graph Models (ERGMs) because it over-generates edges. Because GraphRNN generates edges sequentially, it lacks a "look-forward" mechanism, causing it to lose track of global density while trying to match local patterns.

Beyond Pass/Fail: Sample Batch Selection

AgraSSt can be used practically for Sample Batch Selection. If a generator is inconsistent, researchers can use the AgraSSt p-value to rank generated batches and only keep the ones that most closely resemble the target distribution for downstream tasks, such as privacy-preserving data sharing.

Limitations and Future Work

While powerful, AgraSSt currently has a few limitations:

  • Undirected/Unweighted Focus: The framework is currently optimized for undirected, unweighted graphs. Extending this to directed or weighted edges is a key next step.
  • Choice of Statistics: The accuracy of the "approximate" part of the test depends on the summary statistics chosen for conditioning. While simple statistics like node degree work well, more complex graphs might require more sophisticated conditioning features.
  • Temporal Graphs: The current model treats graphs as static objects; applying Stein statistics to evolving, temporal networks remains an open research challenge.

Summary updated

BibTeX
@inproceedings{xu2022agrasst,
  author = {Wenkai Xu and Gesine Reinert},
  title = {{AgraSSt: Approximate Graph Stein Statistics for Interpretable Assessment of Implicit Graph Generators}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=_7bphw9JosH},
}
Figure