TL;DR
This paper introduces CoLoR, a novel continual learning method for transformers that leverages Low-Rank Adaptation (LoRA) instead of prompt tuning. CoLoR achieves state-of-the-art performance on domain- and class-incremental learning benchmarks while maintaining parameter efficiency comparable to prompt-based methods.
What Problem Does This Paper Address?
Modern machine learning models, especially large pre-trained transformers, excel at tasks they are fine-tuned on. However, when faced with new data that has different characteristics (continual learning), they often suffer from "catastrophic forgetting," where performance on previously learned data degrades significantly. This is a major hurdle for deploying reliable AI systems that need to adapt over time. While prompt tuning has been a popular approach for parameter-efficient continual learning with transformers, this paper questions its optimality and explores the potential of Low-Rank Adaptation (LoRA) for this task.
Methods
The core of this work is the application of Low-Rank Adaptation (LoRA) to continual learning. LoRA is a parameter-efficient fine-tuning technique that constrains weight updates to a low-rank matrix. Instead of updating all weights of a pre-trained transformer, LoRA introduces small, trainable matrices (A and B) that represent the update (ΔW = BA). This significantly reduces the number of trainable parameters.
The proposed method, CoLoR (Continual Low Rank Adaptation), extends this by using dataset-specific LoRA modules for each new dataset encountered. The pre-trained transformer's weights are frozen, and only these dataset-specific LoRA modules and a classification layer are trained.
For inference, since the dataset identity is not known, CoLoR employs an unsupervised method to infer it. This involves estimating prototype vectors for each dataset using k-means clustering on feature embeddings from the pre-trained model. At inference, an instance's nearest cluster center determines which LoRA module to use.
A further enhancement, CoLoR++, is proposed to improve representation quality for dataset identification by using features from the fine-tuned model after the first dataset update.
Datasets
The paper evaluates CoLoR on the following benchmarks:
- CORe50: A benchmark for continual object recognition with 50 classes across 11 datasets.
- DomainNet: A large-scale image classification benchmark with 345 classes and 6 datasets.
- Split CIFAR-100: Used for class-incremental learning, splitting CIFAR-100 into 10 datasets of 10 contiguous classes each.
Key Insights and Ideas
- LoRA is a strong alternative to prompt tuning for continual learning: The paper challenges the common practice of using prompt tuning for parameter-efficient continual learning with transformers, demonstrating that LoRA can achieve superior or comparable results with similar parameter efficiency.
- Dataset identification is crucial for memory-free continual learning: The performance of memory-free methods heavily relies on accurately identifying the current dataset to select the appropriate model adaptation. CoLoR's unsupervised clustering approach is effective, and CoLoR++ further refines this by leveraging better representations.
- Parameter efficiency doesn't necessitate performance compromise: CoLoR shows that it's possible to achieve state-of-the-art results in continual learning while keeping the number of trainable parameters very low, making it practical for resource-constrained scenarios.
- CoLoR bridges the gap between Domain-Incremental Learning (DIL) and Task-Incremental Learning (TIL): By improving the dataset identification mechanism, CoLoR significantly closes the performance gap between these two settings, suggesting that LoRA-based modules can be highly effective even when task identity is not explicitly provided.
Key Results
- State-of-the-art performance: CoLoR achieves state-of-the-art results on domain-incremental learning benchmarks like CORe50 and DomainNet, outperforming its closest memory-free competitor by 2% and 19% respectively.
- Competitive with replay-based methods: CoLoR performs on par with or better than replay-based methods, which typically require storing previous data.
- Parameter efficiency: CoLoR is as parameter-efficient as prompt-tuning methods, requiring a similar number of additional trainable parameters per dataset. For example, with a LoRA rank of 1, it requires only 52.22K additional parameters per dataset on average.
- Class-incremental learning improvements: On Split CIFAR-100, CoLoR shows significant improvements over S-Prompts (over 5%), and CoLoR++ achieves new state-of-the-art results.
- Rank vs. Performance trade-off: Increasing the LoRA rank (r) generally leads to improved performance, but the gains diminish significantly beyond 2-digit ranks, suggesting that even small ranks can be highly effective.
Limitations and Future Work
- Dataset identification accuracy: While CoLoR's unsupervised dataset identification is effective, its performance can still lag behind methods that have explicit task identification (Task-Incremental Learning). The CoLoR++ enhancement aims to mitigate this by using better representations.
- Ablation on cluster number: The paper ablates the effect of the number of clusters (k) for dataset identification, showing that performance saturates once k is sufficient to represent the new classes.
- Future work: The paper suggests that the CoLoR++ approach, which uses representations from the fine-tuned model for dataset identification, is a promising direction and could lead to further improvements. The authors also note that while their method is effective, further research into more robust dataset identification strategies could be beneficial.
Summary updated