Skip to main content
QUICK REVIEW

[Paper Review] Generalized Few-Shot Continual Learning with Contrastive Mixture of Adapters

Yawen Cui, Zitong Yu|arXiv (Cornell University)|Feb 12, 2023
Domain Adaptation and Few-Shot LearningComputer Science5 citations
TL;DR

This paper proposes Generalized Few-Shot Continual Learning (GFSCL), a novel benchmarking protocol that unifies class- and domain-incremental learning with generalization evaluation on unseen domains. It introduces Contrastive Mixture of Adapters (CMoA), a rehearsal-free Vision Transformer framework using dynamic adapter mixing for class-incremental learning and prototype-calibrated contrastive learning to reduce domain shift, achieving performance comparable to rehearsal-based methods on mini-ImageNet and mini-DomainNet.

ABSTRACT

The goal of Few-Shot Continual Learning (FSCL) is to incrementally learn novel tasks with limited labeled samples and preserve previous capabilities simultaneously, while current FSCL methods are all for the class-incremental purpose. Moreover, the evaluation of FSCL solutions is only the cumulative performance of all encountered tasks, but there is no work on exploring the domain generalization ability. Domain generalization is a challenging yet practical task that aims to generalize beyond training domains. In this paper, we set up a Generalized FSCL (GFSCL) protocol involving both class- and domain-incremental situations together with the domain generalization assessment. Firstly, two benchmark datasets and protocols are newly arranged, and detailed baselines are provided for this unexplored configuration. We find that common continual learning methods have poor generalization ability on unseen domains and cannot better cope with the catastrophic forgetting issue in cross-incremental tasks. In this way, we further propose a rehearsal-free framework based on Vision Transformer (ViT) named Contrastive Mixture of Adapters (CMoA). Due to different optimization targets of class increment and domain increment, the CMoA contains two parts: (1) For the class-incremental issue, the Mixture of Adapters (MoA) module is incorporated into ViT, then cosine similarity regularization and the dynamic weighting are designed to make each adapter learn specific knowledge and concentrate on particular classes. (2) For the domain-related issues and domain-invariant representation learning, we alleviate the inner-class variation by prototype-calibrated contrastive learning. The codes and protocols are available at https://github.com/yawencui/CMoA.

Motivation & Objective

  • To address the lack of unified evaluation for class- and domain-incremental few-shot continual learning with generalization to unseen domains.
  • To propose a new benchmark protocol and dataset configuration that combines class-incremental and domain-incremental learning in alternating sessions.
  • To develop a rehearsal-free framework that mitigates catastrophic forgetting and improves domain generalization in few-shot continual learning.
  • To evaluate generalization performance on unseen domains, a gap in prior few-shot continual learning work.

Proposed method

  • Proposes a new GFSCL protocol that alternates between class-incremental and domain-incremental learning sessions, with 5-way 5-shot or 3-way 2-shot few-shot settings.
  • Introduces Contrastive Mixture of Adapters (CMoA), a ViT-based framework with a Mixture of Adapters (MoA) module for dynamic, task-specific knowledge learning.
  • Applies cosine similarity regularization and dynamic adapter weighting to ensure each adapter specializes in specific classes and avoids interference.
  • Employs prototype-calibrated contrastive learning to reduce intra-class variation and learn domain-invariant representations across domains.
  • Uses a two-branch contrastive loss: one for class-specific knowledge and one for domain-robust feature learning.
  • Evaluates performance on both seen and unseen domains using six metrics, including overall accuracy and generalization accuracy.

Experimental results

Research questions

  • RQ1Can a few-shot continual learning framework effectively handle both class-incremental and domain-incremental scenarios simultaneously?
  • RQ2How does the proposed CMoA framework perform in terms of generalization to unseen domains compared to existing rehearsal-based methods?
  • RQ3To what extent does dynamic adapter mixing with cosine similarity regularization improve specialization and reduce forgetting in few-shot continual learning?
  • RQ4Does prototype-calibrated contrastive learning enhance domain-invariant representation learning in a continual setting?
  • RQ5How does the framework perform when new classes from entirely new domains arrive in each session, without prior domain knowledge?

Key findings

  • CMoA achieves competitive performance with rehearsal-based methods on both mini-ImageNet and mini-DomainNet, demonstrating strong stability and plasticity.
  • On mini-ImageNet, CMoA achieves an overall accuracy of 78.4% under the 3-way 2-shot setting, outperforming existing FSCL baselines.
  • On mini-DomainNet, CMoA achieves 68.2% overall accuracy and 52.1% generalization accuracy on unseen domains, showing strong domain generalization capability.
  • Ablation studies confirm that both dynamic adapter weighting and prototype-calibrated contrastive learning are essential for performance, especially in reducing forgetting.
  • Visualization shows CMoA learns more focused attention maps on salient regions than standard ViT, indicating better feature learning.
  • In the more challenging scenario of new classes from new domains arriving each session, CMoA shows initial performance drops but eventually surpasses ViT and adapter baselines, suggesting room for future improvement.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.