Graph model improves learning new classes with few examples quickly

MAGIC: Topology-Aware Analytic Graph Few-Shot Class-Incremental Learning

Machine Learning

Summary

Learning to recognize new kinds of objects in networks from only a few examples is hard because the model can forget what it learned before and can get confused by changing connections in the network. The authors developed MAGIC, a method that uses a fixed graph understanding combined with smart math tricks to remember old knowledge and avoid overfitting new classes. MAGIC uses network structure to guide learning new classes and safely updates old knowledge when the network changes. Tests show it works better and faster than other methods for adding new classes with little data.

What this means in practice

  • For network security teams: Quickly integrate detection of new types of attacks in network graphs with very few examples while retaining past threat knowledge.
  • For social media analysts: Update user community or topic models efficiently when new user classes emerge, using minimal labeled data without retraining from scratch.

Authors

Junlin Chen, Yuhan Wang, Xuefei Wang, Xiao Wang, Ruijie Wang, Jianxin Li

Abstract

Graph few-shot class-incremental learning (GFSCIL) requires a model to continually recognize emerging classes from only a few labeled nodes while preserving previously acquired knowledge. Beyond the catastrophic forgetting inherited from conventional graph continual learning, GFSCIL presents two distinctive challenges: extremely limited novel-class supervision causes severe overfitting, while cross-session edges---edges connecting newly arriving nodes with historical nodes---alter historical propagation neighborhoods and thereby induce representation drift. We propose MAGIC, a replay-free GFSCIL framework that combines a frozen graph representation backbone (e.g., an intrinsically parameter-free backbone such as SGC or a pretrained graph foundation model) with closed-form analytic continual learning. To alleviate novel-session overfitting, MAGIC learns a topological prior from the base graph that can characterize both homophilous and heterophilous relations, and injects this prior through Potts Markov random field inference to refine supervision for novel classes. To mitigate representation drift, MAGIC transfers previous predictions from the old representations of affected historical nodes to their updated representations through drift-aware analytic distillation. Experiments across five datasets and eight baselines demonstrate the effectiveness of MAGIC. Under the 5-shot setting, MAGIC improves Mean Accuracy and Final Accuracy by 5.48 percentage points and 9.33 percentage points on average, and reduces Performance Drop by 10.78 percentage points on average compared with the best baselines. MAGIC also shows clear advantages under the 1- and 3-shot settings, with larger gains as the number of supports increases. Moreover, MAGIC requires substantially less training time.