Structure-enhanced meta-learning for few-shot graph classification

Shunyu Jiang, Fuli Feng, Weijian Chen, Xiang Li, Xiangnan He

Introduction

Graph classification is a critical task in domains ranging from molecular property prediction to social network analysis. While Graph Neural Networks (GNNs) have shown remarkable success, they typically require large amounts of labeled data. In many real-world applications, such as identifying the efficacy of a drug against a novel pathogen, we only have access to a few labeled examples. This "few-shot" challenge necessitates specialized meta-learning approaches.

Standard few-shot methods often treat the GNN as a black-box encoder, overlooking two vital structural characteristics:

  1. Global Structure Sensitivity: The optimal depth of a GNN varies; deep layers can lead to "over-smoothing" in small graphs, while shallow layers may miss long-range dependencies in large ones.
  2. Local Substructure Importance: In chemistry, specific functional groups (substructures) often determine a molecule's overall behavior.

The SMF-GIN Framework

To address these issues, the authors propose SMF-GIN, a metric-based meta-learning framework built upon the Graph Isomorphism Network (GIN). The model utilizes a Prototypical Network strategy, where a distance metric is learned to classify query graphs based on their proximity to class "prototypes" in the embedding space.

The metric-based meta-learning pipeline used in SMF-GIN, showing the support set, query set, and L2 distance-based classification.

The core innovation of SMF-GIN lies in its two attention-based modules:

Global Structure Attention

Instead of a fixed aggregation of GNN layers, SMF-GIN learns to weight each layer's output. This allows the model to adaptively prioritize features from different depths based on the graph's complexity, effectively mitigating the over-smoothing problem.

Local Structure Attention

This module focuses on identifying and weighting key substructures. By extracting representative sub-graphs (such as molecular scaffolds) and processing them alongside the global graph, the model ensures that critical local information is preserved in the final representation.

The process of extracting sub-graphs and generating embeddings to capture local structural information.

Experimental Evaluation

The framework was evaluated on two benchmarks:

  • TRIANGLES: A synthetic dataset for counting triangles in graphs.
  • ChEMBL (New): A large-scale chemical benchmark introduced by the authors, containing 136,500 molecules across 273 categories.

Key Results

The ensemble version, SMF-GIN-E, demonstrated superior performance over state-of-the-art baselines:

  • ChEMBL (5-way 5-shot): Achieved 75.27% accuracy, significantly outperforming vanilla GIN (64.85%) and MAML (61.69%).
  • TRIANGLES (3-way 5-shot): Reached 79.85% accuracy.

Ablation studies confirmed that both global and local attention modules are essential, as removing either led to a noticeable performance decline.

Conclusion

SMF-GIN demonstrates that explicitly incorporating structural nuances—both global layer-wise information and local substructures—is key to effective few-shot graph classification. Future work may involve automating the discovery of crucial substructures and exploring more sophisticated graph-specific distance metrics.

Summary updated

BibTeX
@article{jiang2021structure,
  author = {Shunyu Jiang and Fuli Feng and Weijian Chen and Xiang Li and Xiangnan He},
  title = {{Structure-enhanced meta-learning for few-shot graph classification}},
  journal = {AI Open},
  year = {2021},
  doi = {10.1016/j.aiopen.2021.08.001},
}
Figure