Graph Few-shot Class-incremental Learning

Zhen Tan, Kaize Ding, Ruocheng Guo, Huan Liu

TL;DR

This paper introduces Graph Few-shot Class-incremental Learning (Graph FCL), a framework designed to help Graph Neural Networks (GNNs) learn new node categories from just a few examples without forgetting what they already know. The authors propose HAG-Meta, a hierarchical attention-based meta-learning framework that uses task-level and node-level attention to balance new knowledge acquisition with old knowledge retention.

What Problem Does This Paper Address?

In the real world, graphs are dynamic. E-commerce platforms like Amazon constantly add new product categories, and social networks see the emergence of new community types. Standard GNNs struggle with this because they are typically trained on a fixed set of classes. When forced to learn new ones, they face two major hurdles:

  1. Catastrophic Forgetting: Learning new classes often "erases" the model's ability to recognize old ones.
  2. The Stability-Plasticity Dilemma: A model needs to be "plastic" enough to integrate new information but "stable" enough to keep old knowledge. This is exacerbated in the "few-shot" scenario, where new classes have very few labeled examples, leading to severe class imbalance and overfitting.

Unlike images, graph data is non-i.i.d. (independent and identically distributed); nodes are interconnected. If a new node is linked to an old one, their representations overlap, making it even harder to maintain clear boundaries between old and new categories.

Methods

The authors propose a two-pronged approach: a new training paradigm and a specific model architecture.

1. Graph Pseudo Incremental Learning (GPIL)

To prepare the model for incremental tasks, the authors use GPIL. During training, they split the "base" classes into two groups: one to act as known knowledge and another to act as "pseudo-novel" classes. By repeatedly simulating the incremental learning process during training, the model "practices" how to adapt to new classes while preserving old ones.

2. HAG-Meta Framework

The core architecture consists of a GNN encoder and two hierarchical attention modules:

  • Task-Level Attention (TLA): This module calculates the importance of different tasks. It generates a dynamically scaled loss regularizer that down-weights "easy" tasks and forces the model to focus on "hard" or important ones, preventing the model from becoming biased toward the data-rich base classes.
  • Node-Level Attention (NLA): Since graph structure matters, NLA uses a GCN-based module to adjust the "prototypes" (representative embeddings) of each class. It considers the local neighborhood of a node to ensure that the boundaries between classes remain distinct, even when nodes are densely connected across class lines.

Datasets

The framework was evaluated on three diverse, real-world datasets:

  • Amazon-Clothing: A product network where nodes are products and edges represent "also viewed" relationships.
  • DBLP: A citation network where nodes are papers and edges are citations; classes are defined by the publication venue.
  • Reddit: A large-scale social graph where nodes are posts and edges represent user comments; classes are community IDs.

Key Insights and Ideas

  • Decoupling is Dangerous for Graphs: In computer vision, a common strategy for incremental learning is to "freeze" the feature encoder after initial training. The authors argue this fails on graphs because new nodes depend on their neighbors. If the encoder is frozen, the model cannot adapt to the structural shifts that occur when new classes emerge.
  • Hierarchical Importance: The "aha moment" here is treating the problem as a hierarchy: nodes form classes, and classes form tasks. By applying attention at both the node and task levels, the model can mitigate the class imbalance problem that usually causes GNNs to ignore few-shot novel classes.
  • Meta-Learning as a Bridge: By using meta-learning (learning to learn), the model finds a robust initialization that is specifically tuned for the act of incrementing, rather than just being tuned for a static set of labels.

Key Results

HAG-Meta significantly outperformed state-of-the-art baselines (including Meta-GNN, GPN, and iCaRL) across all datasets.

  • Accuracy: On the Amazon-Clothing dataset (3-way 5-shot), HAG-Meta maintained a final session accuracy of ~50.8%, while the closest non-incremental GNN baseline dropped to ~25.4%.
  • Stability: The authors measured the Relative Performance Dropping rate (RPD). HAG-Meta showed the lowest RPD, indicating it is much more resistant to catastrophic forgetting than existing methods.
  • Visualization: t-SNE plots of the embeddings showed that HAG-Meta produced much tighter, more discriminative clusters for novel classes compared to the best-performing baselines.

Limitations and Future Work

The authors identify several areas for future exploration:

  • Dynamic Topology: While the model handles new classes, it doesn't explicitly focus on graphs where the edges are constantly appearing and disappearing in real-time.
  • Causality: The authors suggest that incorporating causal inference into the regularizer design could further improve the model's ability to distinguish between relevant and irrelevant features.
  • Data Privacy: In some scenarios, old data cannot be stored at all due to privacy concerns. Future work could investigate "exemplar-free" versions of this framework that don't require caching any old nodes.

Summary updated

BibTeX
@inproceedings{tan2022graph,
  author = {Zhen Tan and Kaize Ding and Ruocheng Guo and Huan Liu},
  title = {{Graph Few-shot Class-incremental Learning}},
  booktitle = {WSDM},
  year = {2022},
  doi = {10.1145/3488560.3498455},
}
Figure