TL;DR
In continual learning, complex algorithms are often designed to prevent neural networks from forgetting past tasks. This paper reveals a surprising twist: a dead-simple Experience Replay (ER) baseline—which simply trains jointly on current data and a tiny episodic memory buffer—significantly outperforms state-of-the-art approaches. Remarkably, repeatedly training on as little as a single example per class does not cause catastrophic overfitting; instead, learning subsequent tasks acts as an implicit regularizer that dramatically improves generalization.
What Problem Does This Paper Address?
When deep learning models learn new tasks sequentially, they suffer from catastrophic forgetting—they rapidly overwrite the knowledge required to perform previously learned tasks.
To tackle this, the continual learning (CL) community has developed sophisticated methods, many of which use an "episodic memory" buffer to store past examples. However, evaluating these methods often happens under relaxed conditions (e.g., multiple passes over the data). This paper tackles a strict, highly realistic online CL setting:
- Single-pass data stream: The model sees each training example exactly once.
- Fixed network architecture: No expanding the network size over time.
- Tiny episodic memory: The memory buffer is severely constrained, down to just a few samples per class.
The authors set out to rigorously evaluate how complex CL methods stack up against a simple baseline under these tight constraints.
Methods
The authors evaluate Experience Replay (ER), a straightforward baseline that modifies standard fine-tuning in two simple ways:
- It maintains a tiny episodic memory buffer of past tasks.
- During training, it samples a mini-batch from the current task, stacks it with a mini-batch randomly sampled from the episodic memory, and takes a standard Stochastic Gradient Descent (SGD) step.
They compare ER against complex optimization-constrained methods like A-GEM and MER. Additionally, they explore four standard memory-population strategies and propose a new one:
- Reservoir Sampling: Randomly samples from the data stream with uniform probability.
- Ring Buffer: A FIFO-style queue per class ensuring equal class representation.
- k-Means & Mean of Features (MoF): Selects examples closest to cluster centroids or class means in feature space.
- Hybrid Strategy (Proposed): Uses reservoir sampling initially but dynamically switches to a ring buffer scheme once the memory per class shrinks to a critical threshold, guaranteeing minimum representation for every class.
Datasets
The methods were evaluated on four supervised learning benchmarks adapted for continual learning:
- Permuted MNIST: 23 tasks, each with a unique random pixel permutation.
- Split CIFAR-100: 20 sequential tasks, each containing 5 random classes.
- Split miniImageNet: 20 sequential tasks, each containing 5 random classes.
- Split CUB (Caltech-UCSD Birds): 20 sequential tasks for fine-grained classification.
- MNIST Rotations: Used specifically for an isolated two-task analysis on task relatedness.
Key Insights and Ideas
- Simplicity Wins: ER consistently beats complex methods like A-GEM and MER. While A-GEM treats memory as an optimization constraint to project gradients, ER directly trains on it, which proves far more effective.
- The Overfitting Paradox: Standard machine learning intuition suggests that repeatedly training a model on a tiny memory buffer (e.g., 1 sample per class) would cause severe overfitting to those specific samples. The authors show the opposite occurs.
- Subsequent Tasks as Regularizers: Why doesn't ER overfit? The authors demonstrate that training on subsequent tasks acts as a powerful, data-dependent regularizer. The loss on the memory samples drops to zero, but the features learned from new tasks prevent the network from losing its ability to generalize on the old tasks.
- A-GEM Underfits: Methods like A-GEM actually underfit the memory because their highly constrained weight updates prevent them from fully exploiting this implicit regularization benefit.
- Class Balance Matters for Tiny Memories: When memory is extremely limited (< 3 samples per class), uniform random strategies like Reservoir Sampling fail because they accidentally evict entire classes. Explicitly balancing classes (via Ring Buffer or the proposed Hybrid approach) is crucial.
Key Results
- Massive Accuracy Gains: When the episodic memory was populated with just one example per class, ER achieved absolute accuracy gains between 7% and 17% over standard fine-tuning and EWC across the benchmarks.
- Substantially Less Forgetting: On Split CIFAR, ER-Ringbuffer limited the forgetting metric to 0.13, compared to 0.27 for standard fine-tuning and 0.14 for A-GEM (Table 1).
- High Computational Efficiency: ER is incredibly fast. For example, on Split CIFAR, ER took 116 seconds to train, compared to 230 seconds for A-GEM and a massive 755 seconds for MER (Table 2).
Limitations and Future Work
- Adversarial Tasks Break the Magic: The implicit regularization effect relies on tasks being somewhat related or neutral. In an isolated analysis using MNIST Rotations, the authors found that if a subsequent task is completely adversarial to the past task (e.g., an upside-down '2' looking like a '5'), the regularization becomes harmful, and accuracy drops.
- Memory Management Open Questions: The authors note that future work is needed to determine the absolute optimal inputs to store to mitigate forgetting, as well as smarter eviction strategies when the memory buffer is completely full.
Summary updated