Learn or Recall? Revisiting Incremental Learning with Pre-trained Language Models

Junhao Zheng, Shengjie Qiu, Qianli Ma

Incremental Learning (IL) has long been a challenge in machine learning, particularly in the context of "catastrophic forgetting," where a model loses its ability to perform previous tasks as it learns new ones. This paper, presented at ACL 2024, challenges the prevailing wisdom that sequential fine-tuning (SEQ) inherently destroys the internal knowledge of Pre-trained Language Models (PLMs). Instead, the authors argue that the perceived forgetting is primarily a failure of the classifier head, not the model's backbone.

The Probing Perspective: Is Forgetting Truly Catastrophic?

To investigate the nature of forgetting, the researchers employed a "probing perspective." They compared observed performance (the model's actual output on a task) with probing performance (the accuracy achieved by training a simple linear classifier on top of the model's frozen backbone using all available data).

The probing perspective reveals that while observed performance drops significantly as new tasks are learned, the underlying backbone retains the necessary features to solve previous tasks, as evidenced by high probing performance.

As shown in the figure above, while the observed performance on early tasks often drops to near zero, the probing performance remains remarkably stable. This discovery suggests that the Transformer backbone is inherently resilient to forgetting; the "catastrophic" failure occurs because the classifier head's weights drift away from their optimal positions to accommodate new classes, effectively "hiding" the knowledge still present in the backbone.

The SEQ* Framework

Based on these insights, the authors propose SEQ, a "frustratingly easy" method that leverages the backbone's stability. SEQ consists of four key strategies:

  1. Warm-up & Freeze (S1): The model is fine-tuned on the first task for a few epochs to align its internal representations with the general domain, after which the backbone is frozen entirely.
  2. Freeze Old Classifiers (S2): When learning new tasks, the weights of previous classifier heads are kept static to prevent drift.
  3. Cosine Linear Classifiers (S3): By normalizing weights and features, these classifiers mitigate the bias that typically favors the most recently learned classes.
  4. Pre-allocation (S4): Initializing output layers for all future classes at the start improves forward compatibility.

Experimental Results and Efficiency

The researchers benchmarked SEQ across eight datasets covering text classification, intent recognition, relation extraction, and NER. The results demonstrate that SEQ consistently matches or outperforms complex state-of-the-art (SOTA) methods like LAMOL and PCLL.

A radar chart comparing SEQ* (green) against various SOTA methods across five major datasets. SEQ* shows superior performance and robustness across all tasks.

In addition to its performance, SEQ* is significantly more efficient than its competitors:

  • Accuracy: On the CLINC150 intent classification task, SEQ achieved 84.51% accuracy, nearly doubling the 43.37%* achieved by LAMOL_t.
  • Parameter Efficiency: For a Pythia-410m model, SEQ required only 10.24K trainable parameters per task, compared to the full 405M* required by standard SOTA methods.
  • Training Speed: SEQ proved to be 3x to 8x faster* to train than competing methods, reducing training time from hours to minutes in several instances.

Conclusion

The findings of this paper suggest that for many incremental classification tasks, the challenge is not teaching the model new features, but rather maintaining the mapping of existing features to the correct outputs. While SEQ* is highly effective when the model already possesses relevant knowledge from pre-training, the authors note that future research should focus on benchmarks that require the model to update its internal world knowledge, rather than just re-mapping its existing feature space.

Summary updated

BibTeX
@inproceedings{zheng2024learn,
  author = {Junhao Zheng and Shengjie Qiu and Qianli Ma},
  title = {{Learn or Recall? Revisiting Incremental Learning with Pre-trained Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.794},
}
Figure