SAFE: Slow and Fast Parameter-Efficient Tuning for Continual Learning with Pre-Trained Models

Linglan Zhao, Xuerui Zhang, Ke Yan, Shouhong Ding, Weiran Huang

Introduction

Continual Learning (CL) aims to train models on a non-stationary stream of data without suffering from catastrophic forgetting. While the use of large-scale Pre-Trained Models (PTMs) as a foundation has gained traction, standard fine-tuning often leads to knowledge overwriting, where the model's broad general knowledge is lost to task-specific features. Conversely, freezing the model to preserve stability often results in a "plasticity gap," limiting the ability to learn novel concepts. We propose SAFE (Slow And Fast parameter-Efficient tuning), a dual-learner framework that balances stability and plasticity by decoupling these objectives into separate pathways.

Methodology

SAFE is inspired by the Complementary Learning Systems theory of the human brain, which posits an interplay between a stable neocortex and a plastic hippocampus.

Conceptual comparison of SAFE with prevailing PTM-based continual learning methods.

Dual-Pathway Architecture

The framework consists of two primary components designed to handle different aspects of the learning process:

  • The Slow Learner (S-PET): During the initial training session, the slow learner is optimized to inherit generalizability from the PTM. This is achieved through a unique knowledge transfer loss that utilizes a cross-correlation matrix between PTM features and tuned features. By maximizing diagonal consistency and minimizing off-diagonal redundancy, the slow learner captures foundational knowledge. These parameters are subsequently frozen to ensure long-term stability.
  • The Fast Learner (F-PET): This module remains trainable throughout all subsequent sessions to absorb new information. To prevent the fast learner from drifting away from established knowledge, it is guided by the slow learner via feature alignment and cross-classification losses.
Detailed overview of the SAFE training and inference pipeline, illustrating the interaction between slow and fast learners.

Entropy-based Aggregation

At inference time, SAFE dynamically combines the predictions of both learners. Using an entropy-based strategy, the system evaluates the uncertainty of each learner's output. Predictions from the more confident learner (typically the slow learner for base classes and the fast learner for novel classes) are given higher weight in the final output.

Experimental Results

We evaluated SAFE across seven diverse benchmarks, including CIFAR100, ImageNet-R, ImageNet-A, and DomainNet. SAFE consistently achieved state-of-the-art (SOTA) performance:

  • Superior Accuracy: On ImageNet-A, SAFE reached a final accuracy of 66.6%, outperforming the previous best method (RanPAC) by 4.4%. Across six major datasets, SAFE improved average accuracy by 2.1%.
  • Replay-Free Efficiency: Unlike many competing methods, SAFE does not require the storage or replay of old data samples (exemplars). This makes the framework more memory-efficient and privacy-friendly for real-world applications.
  • Robustness: The dual-learner strategy proved effective in both class-incremental and domain-incremental learning scenarios, demonstrating its versatility.

Conclusion

SAFE effectively addresses the stability-plasticity dilemma in PTM-based continual learning. By leveraging a frozen slow learner for stability and a plastic fast learner for adaptation, the framework preserves general knowledge while maintaining high sensitivity to new concepts. Future work will explore mechanisms to periodically update the slow learner to further enhance long-term adaptability in evolving environments.

Summary updated

BibTeX
@inproceedings{zhao2024safe,
  author = {Linglan Zhao and Xuerui Zhang and Ke Yan and Shouhong Ding and Weiran Huang},
  title = {{SAFE: Slow and Fast Parameter-Efficient Tuning for Continual Learning with Pre-Trained Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Cjnirz5pan},
}
Figure