Unsupervised Episode Generation for Graph Meta-learning

Jihyeong Jung, Sangwoo Seo, Sungwon Kim, Chanyoung Park

Introduction

Few-Shot Node Classification (FSNC) is the task of classifying nodes in a graph when only a handful of labeled examples are available for new classes. To tackle this, researchers have developed Neighbors as Queries (NAQ), a model-agnostic method that enables unsupervised meta-learning for FSNC. By generating training "episodes" using feature or structural similarity instead of ground-truth labels, NAQ allows models to utilize every node in a graph. This approach outperforms traditional supervised methods, which are often crippled by label scarcity, and unsupervised contrastive methods, which struggle with class imbalance.

The Challenge: Scarcity, Noise, and Imbalance

Currently, two main approaches exist for FSNC, both with significant flaws:

  1. Supervised Graph Meta-learning: Methods like MAML or ProtoNet learn "how to learn" by training on many labeled "episodes." However, they require a massive amount of labeled data to start with. Consequently, they are highly sensitive to label scarcity, noisy labels, and a lack of diverse base classes.
  2. Graph Contrastive Learning (GCL): These methods are unsupervised and use all nodes in a graph to learn general embeddings. However, because they are "task-agnostic"—meaning they do not know they are being trained for classification—they perform poorly on graphs with high class imbalance (where some classes have many more nodes than others).
Impact of label scarcity, label noise, and class imbalance on Amazon-Electronics.

The authors aim to bridge this gap by creating an unsupervised episodic learning framework that is "task-aware" but does not require any manual labels for training.

The NAQ Framework

The core innovation of this paper is NAQ (Neighbors as Queries). In meta-learning, an "episode" consists of a support set (the examples the model learns from) and a query set (the examples the model must then classify).

NAQ generates these episodes without labels using a three-step process:

  1. Support Set Generation: Randomly sample $N$ nodes from the graph and assign them distinct "pseudo-labels."
  2. Similarity Calculation: Determine which nodes are "similar" to each other. The paper offers two variants:
  3. NAQ-FEAT: Uses raw feature similarity (e.g., Cosine similarity or Euclidean distance).
  4. NAQ-DIFF: Uses graph diffusion (Personalized PageRank) to find nodes that are structurally close in the graph.
  5. Query Set Generation: For each node in the support set, find its "Top-Q" most similar neighbors and assign them the same pseudo-label.
The Neighbors as Queries (NAQ) episode generation process.

Because NAQ only changes how training data is sampled, it is entirely model-agnostic. Practitioners can take an existing supervised algorithm like ProtoNet or TENT and simply swap the labeled episodes for NAQ-generated ones.

Key Insights and Experimental Highlights

The authors evaluated NAQ across six diverse benchmarks, including product networks (Amazon-Clothing, Amazon-Electronics), citation networks (Cora-Full, DBLP, ogbn-arxiv), and a massive large-scale benchmark (ogbn-products with over 2.4 million nodes).

The "Class-Level Similarity" Hypothesis

The authors argue that for meta-learning to work, the query set does not need to belong to the exact same class as the support set; it just needs to be "class-level similar." Their experiments prove that feature and structural neighbors are "similar enough" to provide a strong training signal. The choice between NAQ-FEAT and NAQ-DIFF depends on the domain: in citation networks, structural similarity (NAQ-DIFF) is a better proxy for class, while in product networks, raw features (NAQ-FEAT) are more reliable.

Beating Supervision and GCL

In many cases, NAQ-trained models outperformed their supervised counterparts. For example, on the Amazon-Electronics dataset (5-way 1-shot), NAQ-FEAT achieved 76.46% accuracy, while the supervised ProtoNet achieved only 69.48%.

Furthermore, unlike GCL, NAQ is highly robust to class imbalance. Because the episodic framework forces the model to distinguish between $N$ classes in every training step—regardless of how many nodes those classes actually have in the real graph—the model learns more discriminative features for minority "tail" classes. NAQ significantly outperformed state-of-the-art GCL methods (like BGRL and SUGRL) on imbalanced graphs.

Scalability

NAQ-FEAT successfully scaled to the massive ogbn-products dataset (2.4M nodes), achieving 53.82% accuracy in a 5-way 1-shot setting. In contrast, many baseline meta-learning and GCL methods crashed due to out-of-memory (OOM) constraints.

Limitations and Future Work

While highly effective, the approach has a few limitations:

  • Computational Bottleneck: Calculating the full diffusion matrix for NAQ-DIFF is computationally expensive on massive graphs. While truncated sums mitigate this, it remains a challenge for billion-scale graphs.
  • Naive Support Sampling: Currently, support nodes are sampled purely at random. There is a small chance that two nodes of the same "true" class are assigned different pseudo-labels in the same episode, potentially confusing the model. More sophisticated support set selection is a promising area for future work.
  • K-shot Generation: The current method focuses on 1-shot support sets. Extending this to generate high-quality $K$-shot ($K>1$) unsupervised episodes could further boost downstream performance.

Summary updated

BibTeX
@inproceedings{jung2024unsupervised,
  author = {Jihyeong Jung and Sangwoo Seo and Sungwon Kim and Chanyoung Park},
  title = {{Unsupervised Episode Generation for Graph Meta-learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=9zdTOOgutk},
}
Figure