When Prompt-based Incremental Learning Does Not Meet Strong Pretraining

Yu-Ming Tang, Yi-Xing Peng, Wei-Shi Zheng

Abstract

Existing prompt-based incremental learning (IL) methods, such as L2P and DualPrompt, have demonstrated remarkable performance by keeping a large pretrained backbone frozen and learning small task-specific prompts. However, this success is heavily contingent on "strong" pretraining (e.g., ImageNet-21k). This paper identifies a critical "semantic gap": when the pretraining data is insufficient or distant from the target tasks, the backbone's features cannot effectively query the prompt pool, leading to a performance collapse. We introduce an Adaptive Prompt Generator (APG) that unifies prompt learning and retrieval into a single learnable process, enabling robust incremental learning even in weakly pretrained or from-scratch scenarios.

The Challenge: The Semantic Gap in Prompting

Incremental Learning (IL) aims to teach neural networks new tasks sequentially without "catastrophic forgetting." Prompt-based methods have emerged as a leading paradigm because they avoid updating the backbone parameters, thus preserving old knowledge.

Figure 1: The performance of existing prompt-based methods (L2P, DualPrompt) collapses as the strength of pretraining decreases, revealing a semantic gap between pretraining and incremental tasks.

As shown in Figure 1, while SOTA methods excel with ImageNet-21k pretraining, their accuracy drops precipitously when moving to Tiny-ImageNet or non-pretrained (standard) setups. This is because these methods rely on a static retrieval mechanism; if the backbone doesn't already "understand" the input features well enough to select the correct prompt, the system fails.

Proposed Framework: Adaptive Prompt Generation

To bridge this gap, we propose a framework that moves away from static prompt retrieval toward dynamic prompt generation. The architecture consists of two primary components: the Adaptive Prompt Generator and an Exemplar-Free Knowledge Pool.

Figure 2: The proposed framework featuring the Adaptive Prompt Generator (APG) and the Knowledge Pool for exemplar-free incremental learning.

1. Adaptive Prompt Generator (APG)

Instead of selecting a fixed prompt from a pool based on similarity, the APG generates prompts tailored to the input. It utilizes a Multi-head Multi-output Attention (MMHA) mechanism that takes the current image's features and attends to a "Prompt Candidate List." This list grows as new tasks are added, allowing the model to adaptively aggregate knowledge from both historical and current tasks. This generative approach is significantly more robust than retrieval because the relationship between features and prompts is learned from scratch rather than assumed.

2. Exemplar-Free Knowledge Pool

To prevent forgetting without the privacy and storage costs of keeping old images (exemplars), we maintain a pool of class-specific statistics. We store the mean and covariance (Multivariate Normal distributions) of features for every seen class. During training, we sample from these distributions to perform "statistical rehearsal."

3. Regularization and Losses

To stabilize training, we employ several specialized losses:

  • Consistency Losses ($\mathcal{L}_{conA}$, $\mathcal{L}_{conC}$): These use samples from the Knowledge Pool to remind the APG and the classifier of old class distributions.
  • Triplet Loss ($\mathcal{L}_{tri}$): This ensures the APG generates similar prompts for images of the same class and distinct prompts for different classes, sharpening the model's discriminative power.

Experimental Results

We evaluated our method against standard benchmarks including CIFAR100, ImageNet-Subset, and ImageNet-R.

  • Superiority in Weak Pretraining: On ImageNet-Subset (B50-T10 setting), our method achieved 75.52% average accuracy. In contrast, previous exemplar-free leaders like SSRE reached 67.69%, and prompt-based methods like L2P struggled at 25.11% in the non-pretrained setup.
  • CIFAR100 Performance: In a 10-task setup without pretraining, our method reached 66.68% accuracy, nearly doubling the performance of L2P (36.55%).
  • Competitive with Strong Pretraining: Even when strong pretraining is available, our method remains competitive with or slightly outperforms DualPrompt, demonstrating that adaptive generation is a more general and robust solution than retrieval.

Conclusion

By identifying the dependency of prompt-based IL on massive pretraining, this work highlights a major bottleneck in the field. Our proposed Adaptive Prompt Generator shifts the paradigm from prompt retrieval to prompt generation, allowing models to bridge the semantic gap. Combined with an exemplar-free knowledge pool, this approach provides a privacy-preserving, efficient, and high-performance solution for incremental learning across all pretraining regimes.

Summary updated

BibTeX
@inproceedings{tang2023when,
  author = {Yu-Ming Tang and Yi-Xing Peng and Wei-Shi Zheng},
  title = {{When Prompt-based Incremental Learning Does Not Meet Strong Pretraining}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure