[Paper Review] Memory Efficient Continual Learning with Transformers
This paper proposes Adaptive Distillation of Adapters (ADA), a memory-efficient continual learning method for pre-trained Transformers that uses adapter modules and knowledge distillation to prevent catastrophic forgetting. ADA maintains high accuracy across sequential tasks with fixed parameter count, outperforms state-of-the-art methods in inference speed, and uses up to an order of magnitude fewer parameters than AdapterFusion while achieving comparable or better performance on both text and vision tasks.
In many real-world scenarios, data to train machine learning models becomes available over time. Unfortunately, these models struggle to continually learn new concepts without forgetting what has been learnt in the past. This phenomenon is known as catastrophic forgetting and it is difficult to prevent due to practical constraints. For instance, the amount of data that can be stored or the computational resources that can be used might be limited. Moreover, applications increasingly rely on large pre-trained neural networks, such as pre-trained Transformers, since the resources or data might not be available in sufficiently large quantities to practitioners to train the model from scratch. In this paper, we devise a method to incrementally train a model on a sequence of tasks using pre-trained Transformers and extending them with Adapters. Different than the existing approaches, our method is able to scale to a large number of tasks without significant overhead and allows sharing information across tasks. On both image and text classification tasks, we empirically demonstrate that our method maintains a good predictive performance without retraining the model or increasing the number of model parameters over time. The resulting model is also significantly faster at inference time compared to Adapter-based state-of-the-art methods.
Motivation & Objective
- Address catastrophic forgetting in continual learning settings where models must learn new tasks over time without forgetting prior knowledge.
- Enable efficient, scalable continual learning with pre-trained Transformers in real-world applications with limited memory and computational resources.
- Maintain high predictive performance across a growing number of tasks without increasing model size or retraining from scratch.
- Reduce inference time and memory footprint compared to existing adapter-based continual learning methods.
- Demonstrate effectiveness of the approach on both text and vision classification tasks using diverse pre-trained models.
Proposed method
- Introduces Adaptive Distillation of Adapters (ADA), a method that combines adapter modules with knowledge distillation to preserve knowledge from previous tasks.
- Uses a fixed pool of adapter modules that are dynamically selected and fine-tuned for new tasks, avoiding parameter growth with task count.
- Employs distillation loss to transfer knowledge from previous task-specific adapters to the current adapter, minimizing forgetting.
- Applies two distillation strategies—LEEP and TransRate—based on feature and logit-level distillation to improve knowledge transfer.
- Supports both binary and multi-class classification scenarios in continual learning, with evaluation on text (Arxiv, Reuters) and vision (CIFAR100, MiniImageNet) benchmarks.
- Extends adapter-based fine-tuning to Vision Transformers (DeiT, ViT), demonstrating generalization across model architectures.
Experimental results
Research questions
- RQ1Can a continual learning method based on adapters and distillation maintain high performance across a large number of sequential tasks without increasing model parameters?
- RQ2How does the proposed ADA method compare to state-of-the-art adapter-based methods in terms of memory efficiency, inference speed, and accuracy?
- RQ3To what extent does knowledge distillation in ADA reduce catastrophic forgetting in both text and vision continual learning tasks?
- RQ4Does ADA achieve forward and backward transfer benefits comparable to or better than existing methods, especially in few-shot settings?
- RQ5Can ADA be effectively applied to vision Transformers, and does it maintain performance across different pre-trained vision models?
Key findings
- ADA achieves predictive performance comparable to independent adapters, even outperforming them in few-shot settings with only 100 labeled examples on Arxiv and 160 on Reuters.
- On Arxiv with 200 labels, ADA-K=4 with TransRate matches the performance of independent adapters while using significantly fewer parameters.
- ADA reduces parameter count by an order of magnitude compared to AdapterFusion, with the number of parameters remaining constant regardless of the number of tasks.
- Inference speed is significantly faster than adapter-based state-of-the-art methods, due to fixed-size adapter pool and efficient distillation.
- On vision tasks using DeiT-B, ADA achieves low backward and forward transfer error, with BWT near zero and positive forward transfer, indicating effective knowledge retention and transfer.
- The method generalizes across models: similar performance trends are observed with DistilBERT, RoBERTa, and ViT/DeiT, confirming robustness across architectures.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.