Introduction
Machine learning models traditionally operate under a static paradigm: they are trained on a fixed dataset and deployed. However, real-world applications often require Few-Shot Class-Incremental Learning (FSCIL), where a model must continuously integrate new classes from extremely limited data (e.g., only five examples) without forgetting previously learned ones.
This creates a "Catch-22" in model optimization. Fine-tuning a full backbone on a few samples leads to catastrophic overfitting, where the model loses its general feature representation. Conversely, keeping the model rigid prevents it from learning the nuances of new classes. While recent "prompt-based" methods—which keep a backbone frozen and only train small learnable tokens—show promise, they typically require large amounts of data to learn effective prompt selection. This paper introduces the Attention-aware Self-adaptive Prompt (ASP) framework to bridge this gap, enabling efficient incremental learning in data-scarce environments.
The ASP Framework
The ASP framework utilizes a frozen Vision Transformer (ViT) backbone. By keeping the backbone weights static, the model preserves the robust feature representations learned during pre-training. To adapt to new tasks, ASP introduces a dual-prompting strategy combined with Information Bottleneck theory.
1. Attention-Aware Task-Invariant Prompts (TIP)
In standard prompt tuning, prompts are often initialized randomly. This can cause the Transformer's attention mechanism to focus inconsistently on these tokens across different tasks, introducing task-specific noise. ASP addresses this by initializing Task-Invariant Prompts (TIP) with identical values. This uniform initialization forces the attention blocks to treat these tokens consistently regardless of the input, encouraging the model to capture universal, shared knowledge that remains stable as new classes are added.
2. Self-Adaptive Task-Specific Prompts (TSP)
To capture the unique characteristics of new classes, the framework employs a Prompt Encoder to generate Task-Specific Prompts (TSP). This encoder is governed by two key mechanisms:
- Information Bottleneck (IB) Objective: The encoder is trained to maximize the semantic information relevant to the class while minimizing extraneous "noise" from the input image. This constraint is vital in few-shot scenarios, as it prevents the prompt from memorizing specific image details that do not generalize to the broader class.
- Feature Blending and EMA: To ensure stability, the TSP for a specific sample is a blend of the individual image's features and a global average prompt feature ($p_{avg}$). As the model encounters new sessions, $p_{avg}$ is updated via an Exponential Moving Average (EMA). This acts as a lightweight memory mechanism, preserving a summary of past knowledge without the need for a large rehearsal buffer of old images.
3. Anchor Loss for Class Separation
To maintain clear decision boundaries between the growing number of classes, the authors implement an Anchor Loss. By identifying "anchor samples"—the most representative images for each class—the model pulls other features of the same class toward these anchors. This clustering effect ensures that the feature space remains organized and that new classes do not overlap with the representations of older ones.
Experimental Results
The ASP framework was evaluated on three major benchmarks: CIFAR100, CUB200 (Birds), and ImageNet-R. In all cases, ASP demonstrated superior performance in both accuracy and the mitigation of forgetting.
Performance Metrics
- Accuracy: On CIFAR100, ASP achieved a final accuracy of 86.7%, outperforming the previous state-of-the-art (TEEN) by 2.7%. The gains were even more pronounced on ImageNet-R, where ASP surpassed existing methods by 7.2%.
- Forgetting: The Performance Dropping (PD) rate measures how much accuracy is lost on old classes as new ones are learned. On CIFAR100, ASP recorded a PD of only 5.5%, a significant improvement over the 8.8% seen in TEEN and the >30% drop typical of classical methods like iCaRL.
- Harmonic Accuracy (HAcc): This metric evaluates the balance between old and new class performance. ASP achieved 85.3% on CIFAR100. In contrast, standard prompt-based methods like L2P or CodaP often score near 0% in this category because they fail to adapt effectively to the few-shot constraints of the incremental tasks.
Discussion and Future Work
The success of ASP highlights that attention consistency and information filtering are critical when learning from limited data. By using the Information Bottleneck to filter noise and EMA to maintain a stable memory, ASP overcomes the primary hurdles of FSCIL.
However, the method is currently dependent on the quality of the pre-trained ViT backbone. If the initial pre-training domain differs drastically from the target tasks, performance may decline. Future research may explore methods to adapt the prompt encoder more dynamically during incremental sessions without risking the overfitting that currently plagues few-shot learning.
Conclusion
ASP represents a significant step forward for Few-Shot Class-Incremental Learning. By combining task-invariant stability with self-adaptive, information-constrained prompts, the framework allows models to grow their knowledge base efficiently and accurately, even when data is at a premium.
Summary updated