Constructing Sample-to-Class Graph for Few-Shot Class-Incremental Learning

Fuyuan Hu, Jian Zhang, Fan Lyu, Linyan Li, Fenglei XuarXiv 2023

Abstract

Few-shot class-incremental learning (FSCIL) aims to build machine learning models that can continually learn new concepts from a few data samples, without forgetting knowledge of old classes. The challenges of FSCIL lie in the limited data of new classes, which not only lead to significant overfitting issues but also exacerbates the notorious catastrophic forgetting problems. As proved in early studies, building sample relationships is beneficial for learning from few-shot samples. In this paper, we promote the idea to the incremental scenario, and propose a Sample-to-Class (S2C) graph learning method for FSCIL. Specifically, we propose a Sample-level Graph Network (SGN) that focuses on analyzing sample relationships within a single session. This network helps aggregate similar samples, ultimately leading to the extraction of more refined class-level features. Then, we present a Class-level Graph Network (CGN) that establishes connections across class-level features of both new and old classes. This network plays a crucial role in linking the knowledge between different sessions and helps improve overall learning in the FSCIL scenario. Moreover, we design a multi-stage strategy for training S2C model, which mitigates the training challenges posed by limited data in the incremental process. The multi-stage training strategy is designed to build S2C graph from base to few-shot stages, and improve the capacity via an extra pseudo-incremental stage. Experiments on three popular benchmark datasets show that our method clearly outperforms the baselines and sets new state-of-the-art results in FSCIL.

Introduction

Human intelligence is characterized by the ability to learn new concepts from minimal examples while retaining previously acquired knowledge. In machine learning, this is termed Few-Shot Class-Incremental Learning (FSCIL). However, artificial models typically struggle with two primary issues: overfitting to the sparse data of new classes and catastrophic forgetting, where the representations of older classes are distorted during the update process.

Existing approaches often address these problems in isolation. This research proposes the Sample-to-Class (S2C) framework, which models the relationships between samples and classes as a dynamic graph to bridge the gap between learning new information and preserving the old.

Methodology

The S2C model utilizes a nested architecture consisting of two specialized Graph Neural Networks (GNNs) and a robust three-stage training pipeline.

Sample-level Graph Network (SGN)

The SGN focuses on intra-session relationships. By analyzing the similarities between samples within a single learning session, the network uses iterative aggregation to cluster similar samples. This process produces "refined" class prototypes that are more robust than simple averages. To further ensure distinct boundaries between classes, the SGN is optimized using a triplet loss function.

Class-level Graph Network (CGN)

The CGN serves as the inter-session bridge. It employs a Transformer-based attention mechanism to link new class prototypes with the base classes established at the start of training. This global attention allows the model to calibrate new knowledge against the old, ensuring that new class embeddings find a unique niche in the feature space without encroaching on established representations.

The S2C multi-stage training pipeline, illustrating the transition from base graph pre-construction to pseudo-incremental training and final few-shot incremental learning.

Multi-Stage Training Strategy

To mitigate the data scarcity inherent in FSCIL, the authors designed a three-stage training strategy:

  1. Graph Pre-construction: Training the initial backbone on a large-scale base dataset.
  2. S2C Pseudo-incremental Training: A critical simulation phase where the model practices incremental tasks using manifold mixup. By blending features from base classes, the model learns to construct effective graphs even when data is limited.
  3. Few-shot Incremental Training: The final deployment stage where the model encounters actual novel classes.

Experimental Results

The S2C method was evaluated on three standard benchmarks: CIFAR100, miniImageNet, and the fine-grained CUB200-2011 dataset. Across all benchmarks, S2C consistently outperformed previous state-of-the-art (SOTA) methods.

  • CIFAR100: Achieved a final accuracy of 53.19%, a 2.12% improvement over the previous best.
  • miniImageNet: Reached a final accuracy of 52.00%.
  • CUB200-2011: Achieved 57.46% final accuracy, demonstrating high performance even on fine-grained tasks where class differences are subtle.
Performance comparison on the CUB-200-2011 dataset across multiple incremental sessions, showing the superior stability of the SGN+CGN approach.

Beyond raw accuracy, the model showed a significantly lower Performance Dropping (PD) rate. This metric tracks the loss of accuracy from the first session to the last, confirming that the S2C framework is highly resilient against catastrophic forgetting.

Conclusion

The Sample-to-Class (S2C) framework demonstrates that modeling relationships—both between individual samples and between evolving classes—is a powerful strategy for FSCIL. By refining features through SGN and stabilizing the embedding space through CGN, the model effectively balances plasticity and stability. Future work may explore incorporating explicit edge information within the graphs and developing more complex mapping relationships to handle increasingly diverse data distributions.

Summary updated

BibTeX
@misc{hu2023constructing,
  author = {Fuyuan Hu and Jian Zhang and Fan Lyu and Linyan Li and Fenglei Xu},
  title = {{Constructing Sample-to-Class Graph for Few-Shot Class-Incremental Learning}},
  year = {2023},
  eprint = {2310.20268},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.20268},
}
Figure