Dual-Phase Continual Learning: Supervised Adaptation Meets Unsupervised Retention

Vaibhav Singh, Rahaf Aljundi, Eugene Belilovsky

TL;DR

This paper introduces DoSAPP, a novel continual learning framework that leverages unlabeled test-time data to prevent catastrophic forgetting in vision-language models. By combining supervised adaptation with unsupervised retention using a teacher-student approach and sparse parameter updates, DoSAPP significantly improves performance on previous tasks without requiring memory buffers, offering a practical solution for real-world, evolving data scenarios.

What Problem Does This Paper Address?

Foundation models like CLIP have revolutionized computer vision, but adapting them to new domains or tasks without losing previously learned knowledge (catastrophic forgetting) remains a significant hurdle. Traditional Continual Learning (CL) methods often rely on storing or replaying past data, which can be memory-intensive and raise privacy concerns. While Test-Time Adaptation (TTA) uses unlabeled test data, it typically focuses on adapting to domain shifts or corruptions, not on retaining knowledge from prior tasks in a class-incremental learning (CIL) setting. This paper addresses the challenge of adapting large pre-trained models to new tasks in a CIL setting while mitigating forgetting, specifically by utilizing readily available, unlabeled test-time data without needing to store past examples.

Methods

DoSAPP employs a "Dual-Phase Continual Learning" approach:

  • Supervised Phase: Similar to standard CIL, the model undergoes supervised training on new task data. However, it uses sparse parameter updates, focusing only on a small subset (e.g., 10%) of parameters identified by gradient magnitude as most relevant. This prevents drastic changes that lead to forgetting.
  • Unsupervised Test Time Learning (TTL) Phase: After supervised training, the model encounters unlabeled test-time data. Here, DoSAPP uses a Teacher-Student framework. The student model (Ms) adapts using "pseudo-labels" generated by comparing the logits of the student and a teacher model (MT). The teacher model, which acts as a stable representation of past knowledge, is updated via weighted exponential smoothing with dual momentum. This dual momentum mechanism allows different update rates for masked (active) and unmasked (frozen) parameters, balancing plasticity and stability. The method also leverages a union of masks from previous tasks to maintain retention.

Datasets

The paper uses the following datasets for evaluation:

  • Aircraft
  • Cars
  • CIFAR100
  • CUB
  • GTSRB

These datasets were split into 10 tasks each to form class-incremental learning sequences. For each dataset, training data was used for supervised learning, and test data was split into $D_u$ (for unsupervised test-time learning) and $D_e$ (for evaluation).

Key Insights and Ideas

  • Unlabeled test data is a goldmine for retention: The paper demonstrates that unlabeled data encountered during deployment can be effectively used to reinforce knowledge from previous tasks, not just adapt to new ones.
  • Sparse updates are crucial for retention: Focusing updates on a small subset of parameters significantly reduces forgetting compared to updating the entire model.
  • Dual momentum for teacher-student stability: A single momentum for teacher updates is insufficient. Using dual momentum, which decouples update rates for active and frozen parameters, is key to balancing stability and plasticity in the teacher-student framework.
  • Memory-free CL is achievable: DoSAPP offers a viable alternative to memory-intensive replay buffers for continual learning, making it more practical for real-world applications.
  • Domain shift is a major challenge, but DoSAPP handles it: The method shows strong performance even when a domain shift occurs between task sequences, outperforming baselines that struggle significantly.

Key Results

  • DoSAPP achieves state-of-the-art or comparable results across multiple datasets in the challenging class-incremental learning (CIL) setting, outperforming methods like SPU, MAS, and prompt-based approaches.
  • On CIFAR100, DoSAPP achieved an average accuracy of 79.16% with only 7.73% forgetting, significantly better than baselines.
  • The method demonstrates strong performance even on imbalanced test data, a more realistic scenario.
  • DoSAPP achieves substantial gains over purely supervised CL methods, highlighting the utility of test-time data.
  • The framework is robust to noise in test-time data and scales effectively with varying amounts of unlabeled input.
  • Computational time is comparable to other methods, with sparse updates not introducing significant overhead.

Limitations and Future Work

  • Dependence on test data quality: The performance of DoSAPP is inherently tied to the quality and distribution of the test data used for unsupervised learning. Highly skewed or noisy test data can still pose challenges.
  • Generalization to other tasks: While experiments focus on vision-language classification, the authors suggest future work could investigate if DoSAPP's mechanisms generalize to generative tasks or other transformer-based architectures.
  • Practical mitigations for skewed data: The paper suggests practical mitigations for skewed test data, such as confidence-based update gating, balanced mask reactivation, and adaptive learning-rate scaling, which could be incorporated without modifying the core framework.

Summary updated

BibTeX
@article{singh2025dual,
  author = {Vaibhav Singh and Rahaf Aljundi and Eugene Belilovsky},
  title = {{Dual-Phase Continual Learning: Supervised Adaptation Meets Unsupervised Retention}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=GFrHdXzZwo},
}
Figure