TL;DR
This paper introduces AFA, a novel framework for Continual Learning in Vision-Language Models (VLMs) that tackles the challenge of acquiring new knowledge without forgetting old information or degrading zero-shot capabilities. AFA achieves this by using two adapters: one to learn task-invariant knowledge for better generalization and another to enhance few-shot learning, outperforming existing methods and even surpassing the original CLIP's zero-shot performance.
What Problem Does This Paper Address?
Vision-Language Models (VLMs) like CLIP are incredibly powerful, capable of understanding and generating content across vision and language. However, when these models are trained incrementally on new tasks (Continual Learning), they suffer from "catastrophic forgetting." This means they tend to forget previously learned information. For VLMs, this problem is twofold: they can forget their pre-trained knowledge (forward forgetting), leading to a degradation of their zero-shot recognition abilities, and they can forget knowledge from earlier tasks in the sequence (backward forgetting). The specific challenge addressed here is Multi-Domain Task Incremental Learning (MTIL), where VLMs must learn from new datasets (domains) sequentially while retaining their ability to recognize concepts from all previously seen domains, all without explicit task identifiers during testing. Existing methods often struggle to improve generalization beyond the original CLIP's capabilities, merely preventing performance degradation.
Methods
The proposed framework, AFA (Against Forward&Backward Forgetting Adapter), consists of two core modules:
- Against Forward-Forgetting Adapter (AFFA): This module aims to enhance the VLM's generalization ability and zero-shot performance. It uses a parameter-efficient fine-tuning technique (specifically, LoRA) that is shared across all incremental tasks. AFFA fine-tunes the VLM on each new task using contrastive learning to better differentiate between classes and improve recognition of unseen data. This helps retain task-invariant knowledge.
- Against Backward-Forgetting Adapter (ABFA): This module focuses on strengthening the VLM's performance in few-shot scenarios and preventing backward forgetting. It employs a dynamic, expanding architecture based on a Mixture-of-Experts (MoE) structure, utilizing multiple LoRA experts. A task-specific router selects the appropriate expert for each task. This design aims to capture richer task-specific details and improve parameter efficiency.
A Domain Distribution Selector (DDS) is also introduced. During inference, DDS uses K-Means clustering to create task prototypes and a similarity score to route test samples to either the ABFA (for known domains) or AFFA (for unseen domains), eliminating the need for explicit task IDs.
Datasets
The paper evaluates AFA on several benchmarks and tasks:
- Multi-Domain Task Incremental Learning (MTIL): This involves learning from 11 sequential datasets. The Order-I protocol is used, and a few-shot version (MTIL-FS) is also tested with only 5 samples per class.
- Class-Incremental Learning (CIL): Datasets like CIFAR100 and TinyImageNet are split into tasks with varying numbers of classes.
- Domain-Incremental Learning (DIL): Datasets like CORe50 and DomainNet are used to evaluate adaptation to domain shifts.
Key Insights and Ideas
- Task-Invariant Knowledge is Key to Generalization: The core idea is that by explicitly learning and retaining knowledge that is common across different tasks (task-invariant knowledge), VLMs can achieve better generalization and even surpass their original zero-shot capabilities.
- Dual Approach for Dual Forgetting: The paper effectively addresses both forward (zero-shot degradation) and backward (forgetting past tasks) forgetting by proposing specialized modules (AFFA and ABFA) for each.
- Few-Shot Learning Enhancement: The ABFA module's MoE architecture proves particularly effective in improving performance in low-data (few-shot) scenarios, a common challenge in continual learning.
- Beyond Performance Retention: Unlike many IL methods that focus solely on preventing performance drops, AFA actively aims to improve generalization, demonstrating that continual learning can lead to better models.
- Efficient Adaptation: The use of parameter-efficient fine-tuning techniques like LoRA is crucial for making these adaptations computationally feasible and scalable.
Key Results
- MTIL Performance: AFA significantly outperforms state-of-the-art methods on the MTIL benchmark, achieving a "Transfer" score of 70.3% (improving zero-shot capability by 0.9% over CLIP) and a "Last" score of 87.2% (demonstrating strong retention of past knowledge).
- Few-Shot MTIL: In few-shot MTIL tasks, AFA also leads, with a Transfer score of 70.2%, surpassing CLIP's zero-shot performance and other SOTA methods.
- CIL and DIL: AFA shows strong performance on Class-Incremental and Domain-Incremental Learning tasks, outperforming traditional IL and MTIL approaches.
- Computational Efficiency: AFA significantly reduces training parameters, GPU burden, and iteration time compared to other methods, particularly ZSCL and BCL.
Limitations and Future Work
- Hyperparameter Sensitivity: While the paper explores hyperparameter sensitivity (e.g., number of experts, threshold for DDS), optimal settings might still require tuning for specific applications. The paper notes that performance plateaus beyond a certain number of experts (2T) and that excessive activation of experts can degrade performance.
- Future Work: The paper suggests further exploration of application strategies for AFFA, as applying it to both visual and textual branches yielded the best results. The effectiveness of the multi-head structure in ABFA for few-shot learning is highlighted, suggesting potential for further research in optimizing this aspect. The authors also mention that the code is provided, encouraging further research and application of their framework.
Summary updated