TL;DR
Memory-based methods are a popular approach in Continual Learning (CL) to combat catastrophic forgetting by replaying past data. However, this paper reveals that while replay improves performance on familiar data (in-distribution), it can significantly harm generalization to unseen data distributions (out-of-distribution) by encouraging the model to learn spurious correlations. This suggests a critical need to evaluate CL methods beyond standard benchmarks.
What Problem Does This Paper Address?
Continual Learning (CL) aims to enable models to learn sequentially from a stream of data without forgetting previously acquired knowledge. A major challenge is "catastrophic forgetting," where learning new tasks overwrites knowledge of old ones. Memory-based methods, a prominent CL strategy, address this by storing a subset of past data (a "replay buffer") and re-training on it alongside new data. While these methods have shown success in standard CL benchmarks, their ability to generalize to data that differs from the training distribution (out-of-distribution or OOD generalization) remains largely unexplored. This paper investigates whether these memory-based methods, despite their effectiveness on in-distribution data, might inadvertently hinder OOD generalization by learning superficial patterns or "shortcuts" in the data.
Methods
The authors propose a controlled experimental setup to specifically test OOD generalization in memory-based CL. They utilize the Synbol benchmark framework, a synthetic data generator, to create a dataset with controllable latent variables. This allows them to define distinct "tasks" (experiences) where each task has a unique set of features. Crucially, they construct an OOD test set by creating combinations of features and labels that were not present during training.
For their CL experiments, they employ the Experience Replay method with a reservoir sampling memory buffer. They systematically vary the memory buffer size (from 0 to 1000 samples) across different numbers of tasks (2, 4, 5, and 10) to observe its impact on both in-distribution (IID) and out-of-distribution (OOD) test performance. To understand where generalization issues arise, they also perform representation inspection using linear probes. These probes are trained on the learned representations to predict specific features (font, character, or both) and are evaluated on both IID and OOD test sets.
Datasets
The primary dataset used is generated by the Synbol benchmark framework. This framework allows for the creation of synthetic images with controllable attributes like characters, fonts, sizes, positions, and colors. For this study, the authors focus on a font prediction task, using English non-diacritic characters as the features. They create five CL scenarios by dividing the dataset into 1, 2, 4, 5, and 10 tasks.
Key Insights and Ideas
- Replay's Double-Edged Sword: While memory replay helps models achieve performance comparable to static training on in-distribution data, it consistently leads to a significant performance gap on out-of-distribution data.
- Spurious Correlations are the Culprit: The paper strongly suggests that memory-based methods, by reinforcing past data, can amplify the learning of spurious correlations. These shortcuts allow the model to perform well on familiar data but fail when faced with novel combinations of features.
- Classifier is the Bottleneck: Representation inspection experiments indicate that the model's learned representations often contain sufficient information to solve the task, even for OOD data. However, the final classifier layer struggles to utilize this information effectively, leading to poor OOD generalization.
- Memory Size Matters for IID, Not OOD: Increasing the memory buffer size improves in-distribution performance but does not significantly close the gap for out-of-distribution performance. In fact, it can sometimes widen the gap.
- OOD Generalization is Under-tested: The current standard for evaluating CL methods (IID test sets) is insufficient. This work highlights the critical need for benchmarks that specifically assess OOD generalization.
Key Results
- In scenarios with 2, 4, 5, and 10 tasks, memory-based methods (with replay) can match the in-distribution (IID) accuracy of static training (training on all data at once).
- However, for the out-of-distribution (OOD) test set, the accuracy achieved by memory-based methods is consistently lower than the IID accuracy, and this gap often widens with increasing memory size. For instance, in the 10-task scenario, the IID accuracy can reach ~0.9, while the OOD accuracy might hover around ~0.7, with the difference increasing as memory size grows.
- Representation probing experiments show that when probes are trained on both IID and OOD data, they can achieve high accuracy on both test sets, suggesting the representations themselves are capable of capturing relevant information. However, when trained only on IID data, the OOD performance of the probe drops significantly, mirroring the main model's behavior.
Limitations and Future Work
Limitations: * The study focuses on a specific type of OOD generalization (unseen combinations of features and labels) and a particular synthetic dataset (Synbol). * The paper primarily investigates a basic replay mechanism and a simple CNN architecture.
Future Work: * The authors emphasize the need for future research to develop CL methods that can better leverage learned representations to improve OOD generalization. * They aim to propose new methods specifically designed to address the challenges of spurious correlations and enhance generalization capabilities beyond the training distribution. * Further studies are encouraged to explore these issues on more complex, real-world datasets.
Summary updated