Graph Generative Model for Benchmarking Graph Neural Networks

Minji Yoon, Yue Wu, John Palowitch, Bryan Perozzi, Russ Salakhutdinov

Introduction: The "Data Desert" in GNN Research

Graph Neural Networks (GNNs) are highly effective for complex industrial applications such as fraud detection and social recommendation. However, GNN research is currently bottlenecked by a "data desert." Because real-world graph datasets are often proprietary and heavily privacy-restricted, researchers are forced to rely on a handful of small, public datasets (like Cora or PubMed) that fail to reflect the scale and complexity of real-world systems.

Existing graph generators fall short of solving this problem for three main reasons:

  1. Scalability: Most deep generative models, such as those designed for molecules, cannot handle graphs with millions of nodes.
  2. Feature Integration: Many models focus exclusively on graph structure (edges) while ignoring node attributes and labels, which are critical for GNN performance.
  3. Benchmark Effectiveness: A synthetic graph is only useful if it acts as a reliable proxy. If GNN Model A outperforms Model B on the synthetic graph, that exact ranking must hold true on the original, private graph.

To address these limitations, researchers introduce the Computation Graph Transformer (CGT), a novel generative model designed to create synthetic, privacy-preserving versions of large-scale graph datasets.

Methodology: The Computation Graph Transformer

CGT shifts the generative focus from the "global graph" to the "local computation graph." Instead of attempting to generate a massive $N \times N$ adjacency matrix, CGT generates a set of "egonets"—the local neighborhoods a GNN actually "sees" during message passing.

Key components of the CGT methodology include:

  • Duplicate Encoding: To handle variable neighborhood sizes and cycles, CGT "unrolls" these egonets into fixed-shape $s$-nary trees. If a node has too few neighbors, it is padded; if it contains cycles, nodes are duplicated. This clever trick makes the graph structure a constant, transforming the complex problem of topology generation into a simpler sequence-prediction task for node features.
  • Quantization: Node features are clustered using $k$-means, and each node is represented by a discrete "cluster ID." This simplifies modeling and provides a baseline for $k$-anonymity privacy.
  • Transformer Architecture: CGT utilizes a modified XLNet (an auto-regressive Transformer) tailored for graphs. It incorporates layer-based position embeddings (nodes at the same depth in the egonet tree share the same embedding), ancestor-based attention masks (nodes only attend to direct ancestors, mirroring GNN aggregation), and label conditioning (generation is conditioned on the root node's label to align synthetic features with the downstream task).

Key Insights

The most profound insight of this work is the GNN-Centric View: we do not need to perfectly replicate a global graph to benchmark GNNs; we only need to replicate the distribution of local computation graphs.

By using duplicate encoding to force every neighborhood into a perfect tree, the authors bypass the hardest part of graph generation and turn it into a feature-prediction task. Furthermore, the paper demonstrates a highly effective privacy-utility trade-off. Using $k$-anonymity via feature quantization protects underlying data while maintaining "benchmark effectiveness"—even with high $k$ values, the performance rankings of different GNN architectures remain remarkably stable.

Experimental Results and Scalability

The model was evaluated on seven diverse public datasets, ranging from citation networks (Cora, Citeseer, Pubmed) and co-purchase graphs (Amazon Computer/Photo) to massive benchmarks like ogbn-arxiv (170k nodes) and ogbn-products (2.4M nodes).

  • Benchmark Effectiveness: CGT achieved up to 33% lower Mean Squared Error (MSE) and significantly higher Spearman correlations (up to 1.03 higher than baselines) when comparing GNN accuracies on real versus synthetic graphs.
  • Scalability: CGT was the only model capable of scaling to the ogbn-products dataset (2.4M nodes, 61M edges), completing the generation task in about 14.7 hours. Most baseline models either crashed due to Out-of-Memory errors or timed out on much smaller datasets.
  • Preserving Graph Statistics: CGT outperformed molecule-based generators (like GraphAF and GraphDF) in preserving structural properties, such as node degree and edge density, as measured via Wasserstein distance.

Limitations and Future Directions

While CGT represents a massive leap forward for synthetic graph generation, the authors note a few limitations. First, while the model supports Differential Privacy (DP), training Transformers with DP-SGD is currently unstable and can lead to a significant drop in utility, marking a major area for future research.

Second, because CGT focuses entirely on local egonets, it may not perfectly capture global graph properties (like the overall graph diameter) if those properties are not reflected in the local samples. Finally, the current framework is optimized for GNNs that use neighbor sampling; extending this approach to GNNs that operate on the full, un-sampled graph remains an open challenge.

Summary updated

BibTeX
@inproceedings{yoon2023graph,
  author = {Minji Yoon and Yue Wu and John Palowitch and Bryan Perozzi and Russ Salakhutdinov},
  title = {{Graph Generative Model for Benchmarking Graph Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=SpA7YFu02k},
}
Figure