TL;DR
This paper introduces ENGINE, a novel framework for Class-Incremental Learning (CIL) that leverages the power of pre-trained vision-language models like CLIP. ENGINE addresses the challenge of catastrophic forgetting in CIL by injecting external knowledge, obtained from large language models like GPT-4, into both visual and textual representations, leading to state-of-the-art performance.
What Problem Does This Paper Address?
Class-Incremental Learning (CIL) is a crucial area of research that aims to enable machine learning models to continuously learn new information from a stream of data without forgetting previously acquired knowledge. A major hurdle in CIL is "catastrophic forgetting," where learning new classes leads to a significant degradation of performance on older classes. While pre-trained models like CLIP have shown great promise for CIL due to their strong generalization capabilities, they primarily rely on matching visual embeddings to class names. This approach overlooks the rich, fine-grained semantic information present in visual features (e.g., "a cat" can be described by "whiskers," "tail," "fur"). As CIL models are updated, these detailed features can be overwritten, leading to a mismatch between visual and textual representations and further exacerbating forgetting. This paper tackles this problem by proposing a method to inject external, detailed knowledge into CLIP to enhance its ability to learn incrementally.
Methods
ENGINE introduces a two-pronged approach to inject external knowledge:
- On-the-fly Knowledge Injection: This is the core training-time mechanism.
- External Knowledge Acquisition: The authors leverage GPT-4 to generate detailed, discriminative textual descriptions for each class (e.g., instead of "a photo of a cat," descriptions like "long, thin tail that aids in balance" are generated).
- Dual-Branch Injection Units: Two new "injection units" are introduced:
- Visual Injection Unit: This unit enhances visual features by maximizing similarity with augmented versions of the input image, encouraging the model to learn more robust visual representations.
- Textual Injection Unit: This unit takes the generated textual descriptions from GPT-4 and injects them into the model, making the textual features more informative and aligned with fine-grained class attributes.
- Task-Specific Injection: To prevent forgetting, new injection units are created for each incremental task, while previous units are frozen.
- Loss Functions: The training involves a combination of similarity losses to align injected features with external knowledge and a contrastive loss to maintain cross-modal alignment.
- Prototype-Based Regularization: To further combat forgetting, prototypes (average visual embeddings) of previously learned classes are used, with added noise to encourage robustness.
- Post-tuning Knowledge Injection: This is an inference-time mechanism to refine predictions.
- Top-k Prediction Refinement: After an initial prediction, the top-k most likely classes are identified.
- Pair-wise Discriminative Features: GPT-4 is used again to generate discriminative features that highlight the differences between these top-k candidate classes.
- Local Comparison: The model then performs a local comparison using these pair-wise features to disambiguate similar classes and improve the final prediction. This step does not require incremental updates.
Datasets
The paper evaluates ENGINE on nine benchmark datasets known for domain gaps with CLIP's pre-training data: CIFAR100, CUB200, ObjectNet, ImageNet-R, FGVC-Aircraft, StanfordCars, Food101, SUN397, and UCF101. The authors follow established CIL protocols for data splitting, using 'B-m Inc-n' notation to define the number of classes at each stage.
Key Insights and Ideas
- Beyond Class Names: The core insight is that relying solely on class names for CLIP-based CIL is insufficient. Fine-grained, descriptive features are crucial for robust recognition and preventing forgetting.
- Leveraging LLMs for Knowledge: Using large language models like GPT-4 to generate rich, task-specific textual descriptions is a powerful way to inject external knowledge into CIL models.
- Dual-Branch Injection: Injecting knowledge into both visual and textual modalities simultaneously leads to more significant improvements than focusing on one alone.
- Inference-Time Refinement: Post-tuning knowledge injection, by focusing on local pairwise comparisons of similar classes, offers a practical way to improve accuracy without further model training.
- Task-Specific Injection Units: The strategy of creating new, task-specific injection units for each incremental stage is key to mitigating catastrophic forgetting.
Key Results
ENGINE demonstrates state-of-the-art performance across the evaluated benchmark datasets, outperforming existing methods by a significant margin (3%-10%). The paper shows that:
- ENGINE consistently achieves higher accuracy (Ā and Āb metrics) compared to other CLIP-based CIL methods like ZS-CLIP, RAPF, L2P, DualPrompt, and CODA-Prompt.
- The proposed on-the-fly knowledge injection (visual and dual injection) significantly boosts performance over baseline ZS-CLIP.
- Post-tuning knowledge injection further enhances the results, leading to the best overall performance.
- ENGINE outperforms traditional exemplar-based CIL methods when initialized with the same CLIP model, even without using exemplars.
- Ablation studies confirm that each component of ENGINE contributes to its effectiveness.
Limitations and Future Work
The authors acknowledge a key limitation: the reliance on GPT-4 to provide expert knowledge. This approach may not be feasible or generalizable for all specific tasks where GPT-4 might struggle.
Future work directions suggested include:
- Designing alternative formats for external knowledge, such as knowledge graphs, to overcome the limitations of LLM-generated text.
- Exploring other LLMs or knowledge sources for broader applicability.
Summary updated