Introduction
In the field of Continual Learning (CL), models are expected to learn a sequence of tasks without forgetting what they learned previously. Historically, Deep Learning models—including Large Language Models (LLMs) like BERT—suffer from catastrophic forgetting. As soon as they start learning a new task, their performance on previous tasks plummets, often to near-zero accuracy.
Recent research found that "sparse experience replay" (re-training on a tiny fraction of old data) could miraculously restore performance. This raises a fundamental question: If a model can recover its knowledge of an old task using only a handful of examples in just a few training steps, did it ever really forget the task, or was the knowledge just misplaced? This paper reveals that BERT might be a better lifelong learner than previously thought. The encoder actually retains high-quality representations of old tasks; the failure is primarily a "misalignment" in the decoder.
Probing the Encoder's Memory
To peek under the hood of BERT during sequential training, the researchers employed a probing study with the following steps:
- Sequential Fine-tuning: Training BERT on a sequence of tasks (e.g., News Classification $\rightarrow$ Sentiment Analysis $\rightarrow$ Topic Classification) without any memory replay.
- Frozen Encoder Probing: After training, the BERT encoder's parameters were frozen, and a brand-new, simple linear "probe" decoder was trained on the old tasks. High accuracy from this new decoder proves the encoder still generates distinct, high-quality representations for old tasks.
- Geometric Analysis: To understand how representations changed, the "sub-space" of each class was modeled as a convex cone, calculating the narrowest cone containing 95% of a class's representation vectors.
- Topological Tracking: Pearson correlation was used to verify if the relative positions of examples within a class (their "topological order") remained stable even as the entire task's representation shifted.
Key Insights: Intra-task vs. Inter-task Forgetting
The study's most significant conceptual contribution is distinguishing between two types of forgetting:
- Intra-task forgetting: Losing the ability to distinguish classes within a task. The authors found this rarely happens in BERT; the internal structure of the task remains intact.
- Inter-task forgetting: This is the real culprit. As BERT learns new tasks, the representations of old tasks "rotate" in the high-dimensional space. They eventually overlap with the new task's space, causing the original decoder to get confused.
Even when a model shows 0% accuracy on an old task, the frozen encoder acts as a "hoarder." It still holds enough information to reach ~76% accuracy (near the 78% multi-task ceiling) if provided with a fresh, aligned decoder. Memory replay, therefore, doesn't "re-teach" the encoder; it acts as a signal that forces the task's representation cone to rotate back into alignment with the decoder's weights.
Experimental Results
The study evaluated these phenomena across two major NLP categories: Text Classification (AGNews, DBPedia, Amazon, Yelp, Yahoo) and Extractive Question Answering (SQuAD, TriviaQA, QuAC).
- Probing Accuracy: In the sequential training setting with zero replay, BERT's performance on the first task dropped significantly. However, the probing decoders recovered macro-averaged accuracies of 75.19% to 76.76% across different task orders, remarkably close to the multi-task learning baseline of 78.89%.
- Topological Stability: Pearson correlation coefficients for the relative positions of representations before and after learning new tasks were consistently above 0.483 (often above 0.7). This proves that the "internal map" of a task remains stable even as it moves through the parameter space.
- Rotation Angles: During replay, the "rotation angle" of old task cones moved significantly closer to the decoder's weight vectors, confirming the realignment theory. Furthermore, larger models (BERT-base vs. BERT-tiny) proved better at retaining this hidden knowledge, regardless of whether the architecture was encoder-only, decoder-only, or encoder-decoder.
Limitations and Future Directions
While groundbreaking, the study focused on sequences of 4-5 tasks. It remains unclear at what point BERT's capacity would be reached, triggering true intra-task forgetting. Additionally, while classification and QA were covered, more complex generative or reasoning tasks might behave differently. Future work will likely explore extending this probing method to longer task sequences and finding ways to "lock" representation sub-spaces without needing explicit memory replay.
Summary updated