TL;DR
DualPrompt is a breakthrough rehearsal-free continual learning framework that enables pre-trained models to learn a sequence of tasks without storing any past data. By decoupling learnable "prompts" into task-invariant and task-specific spaces, it achieves state-of-the-art performance while adding less than 1% additional parameters.
What Problem Does This Paper Address?
The "holy grail" of continual learning (CL) is a model that can learn new tasks sequentially without forgetting previous ones—a phenomenon known as catastrophic forgetting.
Currently, the best-performing methods rely on a "rehearsal buffer" to store and replay actual images from past tasks. However, this approach is often a non-starter in the real world due to strict memory constraints or data privacy regulations (e.g., healthcare or personal devices). While recent prompt-based methods like L2P tried to solve this by using a "prompt pool," they failed to distinguish between features shared across all tasks and those unique to a specific task. DualPrompt addresses this gap by explicitly modeling these two types of knowledge.
Methods
DualPrompt builds on a frozen, pre-trained Vision Transformer (ViT) backbone. Instead of fine-tuning the massive backbone, it learns a tiny set of parameters called prompts that "instruct" the model on how to process new data.
The core innovation is the use of two complementary prompt spaces:
- G-Prompt (General): A single set of prompts shared across all tasks to capture task-invariant knowledge (e.g., basic shapes or textures common to all objects).
- E-Prompt (Expert): A pool of task-specific prompts. During training, the model learns a unique E-Prompt for each task. At test time, a query mechanism matches the input image to the most relevant "expert" prompt.
Technically, the authors utilize Prefix Tuning, where prompts are split into key-value pairs and prepended to the Multi-Head Self-Attention (MSA) layers. This is more efficient than standard prompt tuning because it doesn't increase the sequence length as data moves through the model.
Datasets
The authors evaluate DualPrompt on several benchmarks:
- Split CIFAR-100: The standard CL benchmark divided into 10 tasks.
- Split ImageNet-R (New): A more challenging benchmark introduced in this paper. It contains 200 classes with significant intra-class diversity (e.g., different artistic styles like cartoons or origami), making it much harder for rehearsal-based methods to represent past tasks with just a few stored images.
- 5-datasets: A collection of diverse datasets including MNIST, SVHN, and Fashion-MNIST.
Key Insights and Ideas
- The "Where" Matters: One of the most significant findings is that the position of prompts in the transformer hierarchy is crucial. The authors discovered that G-Prompts perform best at shallower layers (capturing general features), while E-Prompts are most effective at deeper layers (capturing task-specific details).
- CLS Theory in Action: The design is inspired by the Complementary Learning Systems (CLS) theory of the human brain, which suggests a synergy between the neocortex (slowly learning generalities) and the hippocampus (rapidly learning specifics).
- Robustness to Errors: Interestingly, DualPrompt is robust to "query errors." Even if the model picks the wrong E-Prompt at test time, the shared G-Prompt provides enough general instruction to maintain high accuracy.
- Extreme Efficiency: DualPrompt adds only ~0.55% additional parameters and requires zero rehearsal buffer, yet it outperforms models using thousands of stored images.
Key Results
DualPrompt consistently sets a new state-of-the-art for rehearsal-free class-incremental learning:
- Superior Accuracy: On Split ImageNet-R, DualPrompt achieved 68.13% average accuracy, significantly outperforming the previous best prompt-based method, L2P (61.57%).
- Beating Rehearsal: Remarkably, DualPrompt outperformed rehearsal-based methods like DER++ even when those methods were given a buffer of 1,000 images.
- Minimal Forgetting: The "forgetting" rate was slashed to just 4.68% on ImageNet-R, compared to nearly 10% for L2P and over 30% for standard rehearsal methods with small buffers.
Limitations and Future Work
- Backbone Dependency: DualPrompt relies on a strong, pre-trained backbone (like ViT trained on ImageNet-21k). Its performance on tasks very far outside the pre-training distribution remains an open question.
- Heuristic Search: The optimal layers for attaching prompts were found via heuristic search. The authors suggest that automated architecture search for prompt positioning could be a fruitful future direction.
- Query Mechanism: While robust, the query mechanism for selecting E-Prompts at test time is a potential bottleneck for scaling to hundreds or thousands of tasks.
Summary updated