PL-FSCIL: Harnessing the Power of Prompts for Few-Shot Class-Incremental Learning

Songsong Tian, Lusi Li, Weijun Li, Hang Ran, Xin Ning · DOI

TL;DR

This paper introduces PL-FSCIL, a novel approach for Few-Shot Class-Incremental Learning (FSCIL) that leverages prompts within a Vision Transformer (ViT) architecture. By employing a "Domain Prompt" for general dataset adaptation and a "FSCIL Prompt" for task-specific knowledge, PL-FSCIL effectively learns new classes with limited data while mitigating catastrophic forgetting, achieving competitive performance on benchmark datasets.

What Problem Does This Paper Address?

Deep neural networks (DNNs) excel at learning from large datasets but struggle with human-like continuous learning. Specifically, they suffer from "catastrophic forgetting," where learning new tasks erases knowledge of previous ones, and "overfitting" when learning from limited data. Few-Shot Class-Incremental Learning (FSCIL) aims to bridge this gap by enabling models to learn new classes incrementally using only a few examples per class, without forgetting previously learned information. This is crucial for real-world applications where data is scarce and learning environments are dynamic. Existing methods, often based on CNNs like ResNet, face performance bottlenecks. The paper explores the potential of Vision Transformers (ViTs) for FSCIL, but fine-tuning these large models is computationally expensive.

Methods

PL-FSCIL introduces a prompt-based learning strategy integrated into a pre-trained ViT. The core innovation lies in two types of learned prompts:

  • Domain Prompt (PD): This prompt is designed to help the ViT model adapt its feature representation to the general domain of the dataset. It's embedded into an attention layer of the ViT.
  • FSCIL Prompt (PF): This prompt is task-specific, capturing knowledge for each incremental session. It's also embedded into the ViT's attention layers.

These prompts are integrated using a "prefix-tuning" mechanism, where they are prepended to the input tokens in specific Transformer layers. To ensure that the Domain Prompt captures general knowledge and the FSCIL Prompt captures task-specific knowledge without interference, a prompt regularization loss is introduced to enforce orthogonality between them. Instead of a standard softmax classifier, PL-FSCIL uses a Prototype Classifier. This classifier computes class prototypes (mean feature vectors of samples) and assigns new samples to the nearest prototype, which is more robust for few-shot scenarios.

Datasets

The proposed PL-FSCIL method was evaluated on three widely used benchmark datasets for FSCIL:

  • CUB-200: A fine-grained dataset of bird images.
  • CIFAR-100: A dataset of 100 object classes.
  • MiniImageNet: A subset of ImageNet with more complex images.

The paper follows standard experimental setups for these datasets, typically involving a base session with sufficient data followed by multiple incremental sessions with limited samples (e.g., 5-way, 5-shot).

Key Insights and Ideas

  • Visual Prompts for FSCIL: This work pioneers the use of visual prompts (specifically, learned vector embeddings) within the FSCIL paradigm, adapting a technique successful in NLP to computer vision.
  • Dual Prompting for Enhanced Learning: The separation of concerns into a "Domain Prompt" (general adaptation) and an "FSCIL Prompt" (task-specific learning) allows for more effective knowledge integration and retention.
  • Orthogonality for Knowledge Separation: The prompt regularization mechanism is crucial for preventing interference between general domain knowledge and specific task knowledge, which is key to mitigating catastrophic forgetting.
  • ViT as a Powerful Backbone: The paper demonstrates that ViTs, when augmented with prompts, can effectively handle the complexities of FSCIL, surpassing previous CNN-based approaches.
  • Prototype Classifier Synergy: Combining prompts with a prototype classifier proves to be a simple yet highly effective strategy for few-shot classification in an incremental setting.

Key Results

  • Competitive Performance: PL-FSCIL achieves competitive performance across benchmark datasets like CUB-200 and CIFAR-100, often outperforming state-of-the-art methods. For instance, on CUB-200, it achieved an average accuracy of 74.94% with a low performance dropping rate of 14.73%.
  • Efficiency: By leveraging pre-trained ViTs and prompt learning, PL-FSCIL avoids extensive fine-tuning, making it computationally more efficient than full model retraining.
  • Ablation Studies: Experiments confirm the efficacy of each component: the Domain Prompt significantly improves performance on base classes, and combining both prompts with the prototype classifier yields the best results. The prompt regularization mechanism is shown to be effective in balancing domain and task-specific knowledge.

Limitations and Future Work

The authors acknowledge that the simplicity of the prototype classifier might limit performance in scenarios with highly complex data distributions. Future work will focus on refining the prototype classifier and exploring more efficient ways to incorporate prompts to further enhance the learning process.

Summary updated

BibTeX
@misc{tian2024pl,
  author = {Songsong Tian and Lusi Li and Weijun Li and Hang Ran and Li Li and Xin Ning},
  title = {{PL-FSCIL: Harnessing the Power of Prompts for Few-Shot Class-Incremental Learning}},
  year = {2024},
  eprint = {2401.14807},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.14807},
}
Figure