Towards a General Framework for Continual Learning with Pre-training

Liyuan Wang, Jingyi Xie, Xingxing Zhang, Hang Su, Jun Zhu

Abstract

In this work, we present a general framework for continual learning of sequentially arrived tasks with the use of pre-training, which has emerged as a promising direction for artificial intelligence systems to accommodate real-world dynamics. From a theoretical perspective, we decompose its objective into three hierarchical components, including within-task prediction, task-identity inference, and task-adaptive prediction. Then we propose an innovative approach to explicitly optimize these components with parameter-efficient fine-tuning (PEFT) techniques and representation statistics. We empirically demonstrate the superiority and generality of our approach in downstream continual learning, and further explore the applicability of PEFT techniques in upstream continual learning. We also discuss the biological basis of the proposed framework with recent advances in neuroscience.

Introduction

Continual Learning (CL) aims to enable artificial intelligence models to learn from a sequence of tasks without suffering from "catastrophic forgetting"—the tendency of neural networks to lose previously acquired knowledge when learning new information. Recent advancements have shifted the focus toward leveraging large-scale pre-trained models (PTMs) as backbones. By using Parameter-Efficient Fine-Tuning (PEFT) techniques such as prompts or adapters, researchers have attempted to steer these models toward new tasks. However, existing methods often lack generality, performing poorly when transitioning from supervised to self-supervised pre-training or when applied to fine-grained datasets.

The Proposed Framework

We address these limitations by introducing a theoretical framework that decomposes the Class-Incremental Learning (CIL) objective into three manageable sub-tasks:

  1. Within-Task Prediction (WTP): The ability to correctly classify an input given the correct task identity.
  2. Task-Identity Inference (TII): The ability to identify which task a given input belongs to.
  3. Task-Adaptive Prediction (TAP): The final objective of correctly classifying an image across all classes seen so far.

Our framework is PEFT-agnostic, meaning it can be implemented using various techniques such as Prompts, LoRA (Low-Rank Adaptation), or Adapters. To maintain performance without the privacy and memory costs of a replay buffer, we utilize Pseudo-Representations. By storing only the statistics (means and centroids) of class representations, we can sample synthetic data to train lightweight auxiliary layers for task inference.

Experimental Results

We evaluated our framework on challenging benchmarks, including Split ImageNet-R and the fine-grained Split CUB-200 (bird species). We tested across different pre-training paradigms, specifically supervised (Sup-21K) and self-supervised (iBOT-21K) models.

Comparison of our framework against state-of-the-art methods on Split ImageNet-R and Split CUB-200 benchmarks.

As shown in the results above, our approach significantly outperforms previous state-of-the-art (SOTA) methods like CODA-Prompt. For instance, on the self-supervised iBOT-21K benchmark for ImageNet-R, our "Ours-Prompt" method achieved a Final Average Accuracy (FAA) of 70.63%, compared to 61.22% for CODA-Prompt. Furthermore, on the fine-grained CUB-200 dataset, our method achieved near-zero forgetting, with a Final Forgetting Measure (FFM) as low as 0.21%.

Few-Shot and Upstream Learning

A key insight of this work is the role of backbone updates in knowledge accumulation. While prompt-based methods are effective for simple task steering, updating backbone parameters via LoRA allows the model to better accumulate knowledge for future tasks.

Few-shot performance (5W1S and 5W5S) of our framework using different PEFT techniques across multiple datasets.

The few-shot evaluation (5-way 1-shot and 5-way 5-shot) demonstrates that our framework, particularly when using LoRA, maintains high accuracy even with minimal data. This suggests that the framework is not just preventing forgetting but is also enhancing the model's ability to generalize to new, unseen tasks.

Discussion and Conclusion

Our framework provides a solid theoretical foundation for continual learning by proving that optimizing WTP, TII, and TAP separately is both sufficient and necessary for high performance. This "divide and conquer" strategy mirrors biological processes in the brain, specifically the switching between cells dedicated to new acquisition and those dedicated to memory retention. By combining theoretical rigor with PEFT flexibility, this work moves toward a more general and robust framework for lifelong machine learning.

Summary updated

BibTeX
@inproceedings{wang2023towards,
  author = {Liyuan Wang and Jingyi Xie and Xingxing Zhang and Hang Su and Jun Zhu},
  title = {{Towards a General Framework for Continual Learning with Pre-training}},
  booktitle = {IMOL @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=scD9otIPoF},
}
Figure