Learning to Prompt for Continual Learning
Zifeng WangZizhao ZhangChen-Yu LeeHan ZhangRuoxi SunXiaoqi RenGuolong SuVincent PerotJennifer DyTomas Pfister
Introduces a prompt-based continual learning framework that dynamically selects learnable prompts to guide pre-trained models across sequential tasks, matching rehearsal-based performance without storing past data or requiring task identities at test time.
Modern artificial intelligence models struggle to learn new tasks sequentially because training on new information typically overwrites previously acquired knowledge, a phenomenon known as catastrophic forgetting. Conventional solutions mitigate this by storing past user data in memory buffers to periodically retrain the system or by relying on explicit task indicators during testing to select task-specific components. However, retaining historical data introduces significant data privacy risks and memory costs, while requiring explicit task labels at test time makes systems impractical for real-world scenarios where incoming data streams lack predefined boundaries.
The article evaluates a new continual learning framework called Learning to Prompt (L2P). The primary objective is to demonstrate that a pre-trained vision model can sequentially learn diverse tasks without updating its core weights, without relying on stored past examples, and without needing task identity labels at test time.
To achieve this, the article establishes a method that keeps a large pre-trained transformer model completely frozen and instead trains a small external memory space termed a prompt pool. Prompts act as compact, learnable instructions that guide the frozen model to perform specific tasks. Using an automated query-key matching mechanism, the system dynamically retrieves the most relevant prompt instructions for each input image. The framework was evaluated across standard image classification benchmarks covering class-incremental, domain-shifting, and boundary-free streaming environments, comparing performance against leading regularization, memory buffer, and architecture-expanding methods.
The evaluation revealed several key findings. First, L2P achieved state-of-the-art results across all evaluated benchmarks without retaining any past training data, reaching an average accuracy of 83.83% on Split CIFAR-100 and 81.14% on a diverse 5-dataset benchmark. Second, the system maintained low forgetting rates between 4.64% and 7.63%, vastly outperforming baseline methods without replay buffers, which suffered from severe forgetting rates between 27.77% and 94.63%. Third, in buffer-free settings, L2P performed competitively against or outperformed sophisticated rehearsal-based methods that required storing up to 50 samples per class. Fourth, prompt memory required minimal overhead, adding between 0.05% and 0.11% in additional parameters relative to the original model. Finally, the framework succeeded in continuous, task-agnostic streaming settings where task boundaries were entirely absent, achieving 88.34% accuracy.
These findings indicate that continual learning can be effectively achieved by learning dynamic instructions rather than continually retraining large model weights. For organizations deploying machine learning, this approach offers substantial reductions in computational training costs and eliminates the compliance and security liabilities associated with storing sensitive historical user data. Furthermore, decoupling shared and task-specific instructions enables fine-grained knowledge transfer across related tasks while preserving model flexibility.
Organizations seeking to maintain adaptable computer vision models in privacy-sensitive or resource-constrained environments should consider adopting prompt-pool architectures over traditional data-replay buffers. Before broad operational deployment, teams should conduct internal pilots to calibrate hyperparameter settings, particularly prompt pool capacity and selection sizes, based on task diversity. Future work should expand validation to non-transformer architectures, test modalities outside of vision such as natural language or audio, and evaluate the robustness of the system against adversarial security threats.
- Paper: The Power of Scale for Parameter-Efficient Prompt Tuning, Brian Lester et al. (2021). Introduces continuous soft prompt tuning for frozen models, which provides the underlying parameter-efficient adaptation mechanism that L2P extends to continual learning.
- Paper: GPT Understands, Too, Xiao Liu et al. (2021). Establishes continuous prompt optimization as an effective and stable alternative to model fine-tuning, laying the groundwork for prompt-based knowledge isolation.
- Paper: Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing, Pengfei Liu et al. (2021). Provides a comprehensive taxonomy and formulation of prompt-based learning methods that motivate prompting as a memory and task instruction mechanism.
- Paper: Dark Experience for General Continual Learning: a Strong, Simple Baseline, Pietro Buzzega et al. (2020). Offers a key baseline in general continual learning against which non-rehearsal prompt memory frameworks are compared.
- Paper: Gradient Episodic Memory for Continual Learning, David Lopez-Paz et al. (2017). Defines core principles of episodic memory and knowledge transfer in continual learning that motivated alternative, buffer-free memory designs like prompt pools.
- Paper: A Continual Learning Survey: Defying Forgetting in Classification Tasks, Matthias De Lange et al. (2019). Provides a structured overview and taxonomy of traditional continual learning paradigms, setting up the catastrophic forgetting challenges L2P seeks to resolve.
- Paper: iCaRL: Incremental Classifier and Representation Learning, Sylvestre-Alvise Rebuffi et al. (2016). Serves as the foundational exemplar-based incremental learning approach that L2P seeks to surpass without using replay buffers.
- Paper: Learning without Forgetting, Zhizhong Li et al. (2016). Presents early foundational work on adapting neural networks sequentially without storing past task training data.
- Paper: Visual Prompt Tuning, Menglin Jia et al. (2022). Extends prompt-based parameter-efficient adaptation systematically across vision Transformer backbones.
- Paper: Conditional Prompt Learning for Vision-Language Models, Kaiyang Zhou et al. (2022). Builds upon prompt learning concepts by generating dynamic, instance-conditioned prompts to enhance generalization across novel categories.
- Paper: Towards a Unified View of Parameter-Efficient Transfer Learning, Junxian He et al. (2022). Unifies prompt tuning with other parameter-efficient adaptation methods to analyze their functional components.
- Paper: A Comprehensive Survey of Continual Learning: Theory, Method and Application, Liyuan Wang et al. (2023). Synthesizes modern continual learning approaches, framing prompt-based and representation-based memory systems within the broader theoretical landscape.
- Paper: LIBERO: Benchmarking Knowledge Transfer for Lifelong Robot Learning, Bo Liu et al. (2023). Applies and benchmarks lifelong learning transfer mechanisms across complex multi-task decision-making domains.
- Paper: Learning, Fast and Slow: Towards LLMs That Adapt Continually, Rishabh Tiwari et al. (2026). Explores combining slow parameter adaptation with fast prompt optimization for continual learning in large language models.
