NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Steering Prototypes with Prompt Tuning for Rehearsal-free Continual Learning

Zhuowei Li, Long Zhao, Zizhao Zhang, Han Zhang, Ting Liu, Dimitris N. Metaxas

TL;DR

This paper introduces Contrastive Prototypical Prompt (CPP), a novel method for continual learning that uses task-specific prompts and a contrastive loss to improve prototype-based learning. CPP achieves state-of-the-art results on several benchmarks without needing to store old data, significantly reducing memory usage and closing the gap between continual and offline learning.

What Problem Does This Paper Address?

Continual learning aims to enable models to learn new information sequentially without forgetting previously acquired knowledge. A common challenge is "catastrophic forgetting," where models degrade on old tasks after learning new ones. Prototypes, which represent class embeddings, have been proposed as a memory-efficient way to retain knowledge and mitigate forgetting. However, existing prototype-based methods struggle with two main issues: semantic drift, where a sample's embedding shifts away from its prototype over time, and prototype interference, where new class prototypes become too close to existing ones, causing confusion. These issues lead to performance drops, especially in rehearsal-free settings where old data cannot be stored.

Methods

The proposed method, Contrastive Prototypical Prompt (CPP), tackles these challenges by combining two key ideas:

  • Task-Specific Prompt Tuning: Instead of relying on a single, static embedding function for all tasks, CPP uses small, learnable "prompts" that are prepended to the input of a frozen Transformer backbone. These prompts adapt the embedding function dynamically for each task, effectively creating task-specific "model snapshots." This helps to align the embedding function used for prototype generation with the one used at inference, thus mitigating semantic drift.
  • Contrastive Prototypical Loss (CPL): To address prototype interference, CPP introduces a novel contrastive loss. This loss encourages intra-class samples to cluster together while pushing them away from prototypes of other classes. Crucially, it uses prototypes from previous tasks as negative anchors, actively preventing new prototypes from interfering with old ones.
  • Multi-Centroid Prototypes: To better capture the distribution of a class, CPP can optionally use multiple "centroids" per class instead of a single mean embedding. This provides a richer representation and helps in handling outliers.

Datasets

The paper evaluates CPP on several standard continual learning benchmarks:

  • Split CIFAR-100: A common benchmark where CIFAR-100 is divided into multiple tasks.
  • 5-datasets: A diverse set comprising CIFAR-10, MNIST, Fashion-MNIST, SVHN, and notMNIST, each treated as a separate task.
  • Split ImageNet-subset: A subset of ImageNet partitioned into tasks.
  • Split ImageNet-R: A challenging benchmark with varied image styles and intra-class diversity.

Key Insights and Ideas

  • Decoupling Prototypes for Inference: The paper elegantly decouples prototypes into "key" and "value" prototypes. Key prototypes are used for initial coarse retrieval of relevant task-specific prompts during inference, while value prototypes are used for the final fine-grained classification. This two-stage inference process is crucial for efficiently handling many tasks.
  • Prompt Tuning as a Regularizer: The task-specific prompts, when combined with the contrastive loss, act as a powerful regularizer in the parameter space, ensuring that the model learns new tasks without disrupting old knowledge.
  • Rehearsal-Free Advantage: CPP's ability to achieve strong performance without storing any past data is a significant advantage, especially for applications with strict memory or privacy constraints.
  • Bridging the Gap: CPP significantly narrows the performance gap between continual learning and offline joint learning, suggesting it's a step towards truly lifelong learning systems.

Key Results

  • CPP achieves 3% to 6% absolute improvements over state-of-the-art methods on challenging benchmarks like split CIFAR-100, 5-datasets, and split ImageNet-R.
  • It operates without a rehearsal buffer, requiring significantly less memory (e.g., 5x less than some rivals).
  • The method demonstrates strong performance across various pre-training backbones (ViT, Deit, Dino, MAE).
  • Visualizations show that CPP effectively clusters intra-class samples and separates inter-class prototypes, both in training and testing phases.

Limitations and Future Work

  • Inference Overhead: While generally efficient, the inference process can involve multiple forward passes, especially when inter-task divergences are small. The authors suggest this overhead is manageable and can be tuned by adjusting parameters like centroid number and neighbor radius.
  • Future Directions: The authors suggest extending CPP to handle more complex scenarios like blurred task boundaries, few-shot learning, and open-vocabulary settings. They also propose exploring automatic embedding function selection strategies.

Summary updated

BibTeX
@inproceedings{li2024steering,
  author = {Zhuowei Li and Long Zhao and Zizhao Zhang and Han Zhang and Ting Liu and Dimitris N. Metaxas},
  title = {{Steering Prototypes with Prompt Tuning for Rehearsal-free Continual Learning}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00251},
}
Figure