TL;DR
This paper investigates the "stability gap" in continual learning, a phenomenon where models temporarily forget previously learned tasks before recovering some performance. They pinpoint the linear classification head as the primary culprit, not the feature representations. By introducing and evaluating the Nearest-Mean Classifier (NMC), they demonstrate a significant improvement in stability and final performance across various benchmarks.
What Problem Does This Paper Address?
Continual learning (CL) aims to enable AI models to learn sequentially from new data without forgetting what they've already learned (catastrophic forgetting). However, a curious phenomenon called the "stability gap" has been observed: during training on a new task, models often experience a sharp drop in performance on older tasks before partially recovering. This behavior is counter-intuitive to what we'd expect from a stable learning system. The authors want to understand why this stability gap occurs and, specifically, whether it's due to the model's feature extraction capabilities (the "backbone") or the final classification layer.
Methods
The core of this paper's methodology is the introduction and use of the Nearest-Mean Classifier (NMC) as a tool to disentangle the contributions of the backbone and the classification head.
- Standard Approach (Linear Head): In typical CL setups, a neural network's features are extracted by a backbone, and a linear layer (trained with cross-entropy loss) is used for classification. This is what the authors refer to as "finetuning."
- Nearest-Mean Classifier (NMC): Instead of a linear classifier, NMC classifies samples based on their proximity to class "prototypes" (average feature representations of each class) in the feature space. This is a non-parametric approach, meaning it doesn't learn weights in the same way as a linear head but relies on storing and comparing these prototypes.
- Oracle NMC: To establish an upper bound on performance and stability achievable with the backbone's representations, the authors use an "oracle" NMC. This version has access to all training data seen so far to construct perfect class prototypes. By comparing the oracle NMC's performance to the linear head, they can isolate the stability gap attributable to the classifier itself.
They then compare finetuning with NMC across various CL benchmarks and metrics, including average accuracy, minimum accuracy, worst-case accuracy, and the stability gap itself.
Datasets
The paper uses several standard image classification datasets to create continual learning scenarios:
- CIFAR100: Used for both 5-task and 10-task splits.
- ImageNet100: Used for both 5-task and 10-task splits.
- CUB-200-2011 Birds (CUB): Used for fine-grained classification.
- FGVC Aircraft (Aircrafts): Used for fine-grained classification.
These datasets are split into sequential tasks, where each task introduces new classes.
Key Insights and Ideas
- The Linear Head is the Villain: The most significant finding is that the stability gap is primarily caused by the linear classification head, not by poor feature representations from the backbone. The oracle NMC, which uses the same backbone features but a non-parametric classifier, shows dramatically improved stability.
- NMC as a Stability Enhancer: The Nearest-Mean Classifier (NMC) consistently leads to more stable training dynamics and higher final accuracy compared to standard linear heads, even when using a limited memory buffer.
- Task-Recency Bias Mitigation: NMC also effectively reduces "task-recency bias," where models tend to favor predictions from the most recently learned tasks. NMC's predictions are more balanced across all learned tasks.
- Robustness Across Architectures: The benefits of NMC are not tied to a specific backbone architecture; it improves stability and performance when used with various CNNs like ResNet, MobileNetV2, EfficientNet, and VGG.
Key Results
- Stability Gap Reduction: The stability gap for the linear head can be 2 to 4 times larger than that observed with NMC.
- Performance Improvement: NMC consistently outperforms finetuning with a linear head across all tested benchmarks and scenarios. For example, on the Aircrafts dataset, NMC improved stability threefold and final accuracy by about 10 percentage points.
- Task-Recency Bias: Figures and metrics (like the task confusion matrix and Latest Task Prediction Bias - LTB) show that NMC significantly reduces the bias towards recent tasks, making its predictions more evenly distributed across all learned tasks.
- Memory Buffer Impact: NMC's stability advantages hold true regardless of the memory buffer size (fixed or growing) or the method of exemplar selection.
Limitations and Future Work
- Exemplar-Based Focus: The current study primarily focuses on CL scenarios that use exemplars (a subset of old data). The authors suggest that extending the analysis to regularization-based and exemplar-free methods would be a valuable direction for future work.
- Transfer Learning Nuances: While a "warm-up" protocol for linear heads showed no benefit in their CL setup, they note that in transfer learning contexts, this protocol might be beneficial if source dataset performance isn't evaluated. This highlights a subtle difference in evaluation objectives.
The paper provides a clear and compelling argument for the role of the classification head in the stability gap and offers NMC as a practical and effective solution for more stable and robust continual learning systems.
Summary updated