NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Generated Graph Detection

Yihan Ma, Zhikun Zhang, Ning Yu, Xinlei He, Michael Backes, Yun Shen, Yang Zhang

Introduction

As graph generative models become increasingly sophisticated, they offer powerful tools for data distribution approximation and data augmentation. However, this progress brings a growing risk of "Deepfake graphs" in critical domains like social networks and drug discovery. While the dangers of Deepfake images and videos are well-documented, the underlying data structures that power our digital and physical worlds are also vulnerable. Synthetic social networks, e-commerce transaction logs, and molecular structures can be weaponized for misinformation, model-stealing attacks, or pharmaceutical fraud.

The primary challenge in combating this threat is that most detection methods are designed for specific, known distributions. In real-world applications, a detector is likely to encounter a graph generated by an unseen algorithm or based on a dataset it was never trained on. To address this gap, researchers have formulated the Generated Graph Detection problem, proposing the first systematic framework to detect synthetic graphs and testing how well machine learning models generalize across "seen" and "unseen" environments.

Methodology: Evaluating the Unknown

To rigorously test detection capabilities, the framework evaluates performance across four increasingly difficult scenarios:

  1. Closed World: Both the dataset and the generator are known from the training phase.
  2. Open Generator: The dataset is known, but the generator is entirely new.
  3. Open Set: The generator is known, but the dataset domain (e.g., social versus chemical) is new.
  4. Open World: Both the dataset and the generator are completely unseen.

Model Architectures

The study investigates three representative Graph Neural Network (GNN) architectures to tackle these scenarios:

  • End-to-End Classifier: A standard Graph Convolutional Network (GCN) trained specifically for binary classification.
  • Contrastive Learning-based Model: Utilizing GraphCL, this model learns general graph representations in a self-supervised manner before employing an SVM for final classification.
  • Metric Learning-based Model: A Siamese Network approach that maps graphs into a metric space, ensuring that "real" and "generated" clusters are distinctly separated.

Datasets and Generators

The evaluation leverages seven diverse benchmark datasets from the TUDataset repository, covering Social Networks (Deezer, GitHub, Twitch), Collaboration Networks (DBLP, COLLAB), and Bioinformatics/Molecules (AIDS, Alchemy).

To create the synthetic counterparts, eight different generators were employed, ranging from traditional random models (Erdös-Rényi, Barabási-Albert) to advanced deep learning models (GRAN, GraphRNN, VGAE, Graphite, SBMGNN, and GraphVAE). To ensure the detection task was highly rigorous, the researchers selected only the top 20% most realistic generated graphs based on statistical similarity.

Key Insights and Results

The evaluation revealed several critical insights into how different models handle the synthetic graph detection problem:

  • Generalists vs. Specialists: There is a distinct trade-off between model architectures. Metric learning acts as a "specialist"—it excels in the Closed World scenario (achieving up to 0.98 accuracy on the Deezer dataset) because it can memorize specific distributions. Conversely, Contrastive learning is the "generalist." It dominates in Open World scenarios because it learns fundamental structural features that transcend specific datasets.
  • Robustness to the Unknown: Even in the most challenging Open World scenario, the contrastive learning model demonstrated remarkable resilience, maintaining an accuracy of 0.83 and an F1-score of 0.83. Furthermore, in Open Set tests (unseen datasets), the contrastive model outperformed baseline feature-based classifiers by nearly 30 percentage points (0.85 vs. 0.57 accuracy).
  • Dataset Obliviousness: Surprisingly, models trained on a "mixed" dataset—combining social, chemical, and citation graphs—could still detect fakes effectively. This implies that "fakeness" leaves a universal structural fingerprint independent of the specific domain.
  • Visualizing the Fingerprint: Using t-SNE visualizations, the researchers demonstrated that contrastive encoders create significantly cleaner clusters for unseen data compared to end-to-end models. This structural clarity explains why contrastive methods remain robust even when the underlying "rules" of the graph change.

Limitations and Future Directions

While these findings establish a strong foundation for generated graph detection, the landscape is rapidly evolving. The researchers note several areas for future exploration:

  • The Generative Arms Race: As generators become more sophisticated—potentially optimizing to bypass these very detectors—detection accuracy may drop. This will necessitate a continuous, "cat-and-mouse" evolution of detection models.
  • Computational Overhead: The highly accurate metric learning approach requires pairing testing samples with known samples, which can be computationally prohibitive for large-scale, real-time detection systems.
  • Expanding Scope: The current framework focuses on homogeneous graphs. Future research must extend these detection capabilities to heterogeneous graphs and dynamic graphs that evolve over time.

Ultimately, while graph generative models are becoming incredibly powerful, their synthetic "fingerprints" remain distinct enough today. GNN-based detectors, particularly those leveraging contrastive learning, can serve as reliable regulatory tools to secure our graph-based data ecosystems for the foreseeable future.

Summary updated

BibTeX
@inproceedings{ma2023generated,
  author = {Yihan Ma and Zhikun Zhang and Ning Yu and Xinlei He and Michael Backes and Yun Shen and Yang Zhang},
  title = {{Generated Graph Detection}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=tGz3RIH31e0},
}
Figure