GSHOT: Few-shot Generative Modeling of Labeled Graphs

Sahil Manchanda, Shubham Gupta, Sayan Ranu, Srikanta Bedathur · OpenReview

Abstract

Deep graph generative modeling has gained enormous attraction in recent years due to its impressive ability to directly learn the underlying hidden graph distribution. Despite their initial success, these techniques, like much of the existing deep generative methods, require a large number of training samples to learn a good model. Unfortunately, large number of training samples may not always be available in scenarios such as drug discovery for rare diseases. At the same time, recent advances in few-shot learning have opened door to applications where available training data is limited. In this work, we introduce the hitherto unexplored paradigm of few-shot graph generative modeling. Towards this, we develop GSHOT, a meta-learning based framework for few-shot labeled graph generative modeling. GSHOT learns to transfer meta-knowledge from similar auxiliary graph datasets. Utilizing these prior experiences, GSHOT quickly adapts to an unseen graph dataset through self-paced fine-tuning. Through extensive experiments on datasets from diverse domains having limited training samples, we establish that GSHOT generates graphs of superior fidelity compared to existing baselines.

Introduction

Deep generative modeling has transformed how we create synthetic data, yet its application to graph structures—representing social networks, proteins, or drug molecules—remains constrained by high data requirements. While state-of-the-art models show promise, they are notoriously "data-hungry." In high-impact fields like drug discovery for rare diseases or rapid pandemic response, large labeled datasets are often unavailable. Existing graph generators typically fail under these data-scarce conditions, either producing unrealistic structures or overfitting to the few available examples. GSHOT addresses this gap by enabling high-fidelity labeled graph generation with as few as 50 training samples.

Methodology

GSHOT integrates three core components to achieve efficient few-shot learning:

  1. Graph-to-Sequence Encoding: Graphs are converted into Minimum Depth-First Search (DFS) codes. This transforms complex 2D structures into unique sequences of edge tuples, allowing neural networks to learn the structural "grammar" of graphs more effectively.
  2. Meta-Learning via REPTILE: Instead of training from scratch, GSHOT utilizes the REPTILE algorithm to learn from auxiliary datasets. This process identifies a high-quality parameter initialization (theta) that captures general graph features, facilitating rapid adaptation to new, small target datasets.
  3. Self-Paced Fine-Tuning: During the adaptation phase, GSHOT employs a curriculum learning strategy. It initially focuses on "easy" samples that the model can already represent well, gradually introducing more complex graphs. This prevents noise or outliers in small datasets from destabilizing the learning process.
The GSHOT framework overview, illustrating the transition from auxiliary meta-learning to few-shot target adaptation and final graph generation.

Experimental Results

GSHOT was evaluated across biological (Enzyme), chemical (AIDS-CA, Leukemia), and physics (N-body simulations) domains. Performance was measured using Maximum Mean Discrepancy (MMD), where lower scores indicate higher statistical similarity to real graphs.

Key findings include:

  • Superior Fidelity: On the Leukemia dataset with 500 samples, GSHOT achieved an NSPDK MMD score of 0.032, significantly outperforming the best baseline (0.116).
  • Robustness to Scarcity: GSHOT maintains stable performance even when training data is reduced to 50 samples, whereas baseline error rates increase sharply.
  • Novelty and Diversity: The model consistently maintained near 100% novelty and uniqueness, demonstrating that it learns the underlying distribution rather than simply memorizing training examples.
MMD performance metrics (NSPDK, Joint Degree-Node label, and Node label) as the number of training samples decreases.

Conclusion

GSHOT establishes a new paradigm for few-shot graph generation by combining meta-learning with self-paced adaptation. While highly effective at capturing topological and label distributions, future work will focus on incorporating domain-specific constraints, such as chemical valency or physical laws, to ensure generated graphs are scientifically valid as well as statistically realistic.

Summary updated

BibTeX
@misc{manchanda2023gshot,
  author = {Sahil Manchanda and Shubham Gupta and Sayan Ranu and Srikanta Bedathur},
  title = {{GSHOT: Few-shot Generative Modeling of Labeled Graphs}},
  year = {2023},
  eprint = {2306.03480},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.03480},
}
Figure