Key-value pair-free continual learner via task-specific prompt-prototype

Haihua Luo, Xuming Ran, Zhengji Li, Huiyan Xue, Tingting Jiang, Jiangrong Shen, Tommi Kärkkäinen, Qi Xu, Fengyu Cong

TL;DR

Mainstream prompt-based continual learning methods rely on error-prone key-value matching to select task-specific prompts during inference, which causes inter-task interference. This paper introduces ProP (Prompt-Prototype), a framework that eliminates key-value pairs entirely by binding task-specific prompts directly to class prototypes. ProP achieves state-of-the-art performance in exemplar-free class-incremental learning, particularly on challenging out-of-distribution datasets.

What Problem Does This Paper Address?

Continual learning (CL) requires neural networks to learn new tasks sequentially without forgetting previously acquired knowledge—a challenge known as catastrophic forgetting. Recently, prompt-based methods (like L2P and DualPrompt) have dominated this space. They keep a large pre-trained model frozen and only train a small set of prompt vectors for downstream tasks.

However, these methods typically maintain a "prompt pool" and rely on a key-value pairing mechanism during inference. When a new image comes in, the model queries the pool to match the input to the most similar "key" and retrieve the corresponding prompt.

The authors identify two major flaws in this setup:

  1. Inter-task Interference: If two tasks share similar visual features (e.g., distinguishing a Persian cat in Task 1 vs. a tabby cat in Task 2), the key-value lookup can easily fail, leading to the wrong prompt selection and catastrophic misclassifications.
  2. Scalability Issues: As the number of tasks grows, the key pool expands, increasing computational overhead and retrieval times.

Methods

To solve these issues, the authors propose ProP (Prompt-Prototype), which completely removes the key-value lookup step.

Comparison between traditional prompt pools (a) and the proposed ProP framework (b).

Here is how ProP works:

  • Task-Specific Prompts: Instead of selecting from a shared pool, each task initializes its own dedicated prompt during training.
  • Dual-Feature Prototypes: After a task is trained, the model computes a "prototype" (the mean feature vector) for each class. To balance general knowledge with task-specific adaptation, ProP concatenates two types of features to form the final prototype: features from the frozen pre-trained backbone, and features from the prompt-tuned model.
  • Inference via Subspace Binding: During testing, the task ID is unknown. Instead of guessing the task upfront via keys, the input embedding is processed through all task prompts. The model calculates the cosine similarity between these extracted features and the stored class prototypes. The highest similarity score determines the final prediction.
  • Stable Initialization: The authors found that random prompt initialization can lead to extreme values that derail feature learning. They introduce an $L_2$ regularization loss during initialization to penalize excessively large values, ensuring more stable training.

Datasets

The authors evaluated ProP on seven widely recognized image classification benchmarks under a strict Class-Incremental Learning (CIL) setting without rehearsal (meaning no old data samples were stored):

  • CIFAR-100
  • CUB-200
  • ImageNet-A & ImageNet-R (highly challenging, out-of-distribution datasets)
  • ObjectNet
  • OmniBenchmark
  • VTAB (Visual Task Adaptation Benchmark)

Key Insights and Ideas

  • Flipping the Inference Pipeline: Traditional methods try to predict the task ID before extracting task-specific features. ProP extracts features across the parallel task spaces simultaneously, allowing the nearest class prototype to naturally surface the correct prediction.
  • The Power of Concatenation: Rather than blending or averaging features, directly concatenating the frozen pre-trained features with the prompt-tuned features yielded the best results (Table 3 in the paper). This effectively preserves diverse information from both general and task-specific sources.

Key Results

ProP consistently outperformed both traditional continual learning methods and state-of-the-art prompt-based approaches across all seven datasets.

ProP achieves higher average accuracy with significantly fewer trainable parameters compared to exemplar-based methods.
  • OOD Superiority: On datasets where pre-trained models typically struggle due to domain gaps (ImageNet-A and ImageNet-R), ProP demonstrated an average accuracy improvement of over 5% compared to previous state-of-the-art methods like CODA-Prompt and APER.
  • Zero-Exemplar Efficiency: Remarkably, ProP achieved higher accuracy without storing any past data samples (zero exemplars) compared to traditional rehearsal-based methods (like iCaRL and DER) that store 20 samples per class.

Limitations and Future Work

The primary trade-off in ProP is inference complexity. Because the key-value matching step is removed, an input sample must perform a forward pass through the model layers associated with all task prompts during inference. While the authors note that these computations are highly parallelizable, the computational footprint still scales linearly ($O(T)$) with the number of tasks $T$. Future work will likely need to address how to prune or compress these parallel task spaces to maintain efficiency when scaling to hundreds of sequential tasks.

Summary updated

BibTeX
@article{luo2026key,
  author = {Haihua Luo and Xuming Ran and Zhengji Li and Huiyan Xue and Tingting Jiang and Jiangrong Shen and Tommi Kärkkäinen and Qi Xu and Fengyu Cong},
  title = {{Key-value pair-free continual learner via task-specific prompt-prototype}},
  journal = {Neural Networks},
  year = {2026},
  doi = {10.1016/j.neunet.2026.108576},
}
Figure