TL;DR
This paper investigates how "representation forgetting" – the drift of learned representations during continual learning – impacts the general knowledge stored in pre-trained language models (LMs). They introduce metrics to quantify this forgetting and find that generality is indeed destroyed, with both syntactic and semantic knowledge being lost. The authors propose that prioritizing general linguistic tasks early in training and using hybrid continual learning methods can help mitigate this knowledge loss.
What Problem Does This Paper Address?
Pre-trained language models (LMs) like BERT have revolutionized NLP by learning rich, general-purpose representations from massive datasets. However, when these models are adapted to new tasks sequentially (continual learning), they often suffer from "catastrophic forgetting," where performance on earlier tasks degrades significantly. This paper focuses on a related phenomenon: "representation forgetting" or "representation drift." This refers to how the internal representations learned by the LM change over time as it's trained on new tasks. While it's intuitive that this drift might harm the model's general capabilities (its ability to perform well on tasks it wasn't explicitly trained on), the concrete effects and how to measure them remain unclear. This work aims to quantify this generality destruction and explore ways to alleviate it.
Methods
The authors introduce three novel metrics to quantify representation forgetting and its impact on general knowledge:
- Overall Generality Destruction (GD): This metric measures the drop in a model's performance on previously learned tasks after it has been trained on new ones. It's calculated by comparing the performance on a task after continual training versus training solely on that task.
- Syntactic Knowledge Forgetting (SynF): This metric uses probing tasks to specifically assess the loss of syntactic understanding.
- Semantic Knowledge Forgetting (SemF): Similarly, this metric uses probing tasks to evaluate the loss of semantic understanding.
They employ a "probing" approach, where a frozen pre-trained LM encoder is used with a simple classifier to evaluate its linguistic capabilities on specific tasks. They also analyze the impact of different task sequences and compare various continual learning strategies (rehearsal, regularization, and hybrid methods).
Datasets
The experiments utilize a combination of standard NLP benchmark datasets:
- GLUE benchmark tasks: Including COLA (linguistic acceptability), MNLI (natural language inference), QNLI (question answering), QQP (question synonymy), and MRPC (semantic equivalence).
- Other tasks: Yelp and Yahoo for sentiment analysis and categorization, respectively.
These tasks are arranged into different sequences to study the effect of task order on forgetting.
Key Insights and Ideas
- Generality is indeed destroyed: Continual training consistently leads to a degradation of the general knowledge stored in pre-trained LMs, as evidenced by the GD metric.
- Syntactic and semantic knowledge are lost: Both SynF and SemF metrics confirm that specific linguistic capabilities are forgotten during sequential training.
- Task order matters significantly: The sequence in which tasks are learned has a substantial impact on the degree of generality destruction. Learning general linguistic tasks before specific application tasks appears to mitigate forgetting.
- Hybrid continual learning methods are superior: Combining rehearsal and regularization techniques (like DERPP) offers a better balance between maintaining performance on previous tasks and adapting to new ones, leading to less generality destruction and better overall performance.
- Probing is a powerful tool: The proposed probing metrics (SynF and SemF) provide a more nuanced understanding of what kind of general knowledge is lost, complementing the overall GD metric.
Key Results
- Across various pre-trained models (BERT, DistilBERT, ALBERT, RoBERTa) and task orders, generality destruction (GD) was consistently observed.
- ALBERT showed the most fragility, with the highest GD values, while BERT demonstrated the strongest ability to retain general knowledge.
- In experiments comparing continual learning strategies, BERT-FT (fine-tuning without strategy) performed the worst, while BERT-DERPP (hybrid method) achieved the best average performance and lowest GD.
- Training on general linguistic tasks like COLA first led to improved performance and less forgetting on subsequent tasks. For instance, in Order 2 (starting with COLA), probing results significantly increased on upper layers, outperforming initial BERT representations.
Limitations and Future Work
The authors acknowledge that their study primarily offers a "post-hoc" analysis of representation forgetting. Their method might be less effective for analyzing seq2seq models and the in-context learning paradigm. Future work could explore knowledge-forgetting in these emergent paradigms. They also suggest that their findings can serve as a foundation for developing methods to actively inject general knowledge into LMs during continual learning.
Summary updated