Abstract
Catastrophic forgetting in continual learning is a common destructive phenomenon in gradient-based neural networks that learn sequential tasks. Unlike humans, who accumulate knowledge throughout their lives, artificial models often suffer a sharp decrease in performance on previous tasks when learning new ones. To address this, we propose $ε$-SOFT-GEM, an evolution of Average Gradient Episodic Memory (A-GEM). By introducing a soft constraint $ε \in [0, 1]$, we balance learning new knowledge with preserving the old. Our method achieves state-of-the-art accuracy and efficiency, providing a superior trade-off between stability and plasticity.
Introduction
The "Stability-Plasticity Dilemma" is a fundamental hurdle in machine learning: a model must be plastic enough to integrate new information but stable enough to prevent new updates from overwriting existing knowledge. Standard artificial neural networks (ANNs) typically exhibit catastrophic forgetting, where weights optimized for Task A are drastically altered to minimize loss for Task B.
Problem Statement: Beyond "Do No Harm"
Existing approaches like Gradient Episodic Memory (GEM) and its efficient variant A-GEM utilize an episodic memory buffer to store samples from previous tasks. When training on a new task, these methods constrain the gradient update so it does not increase the loss on the buffered samples. Specifically, A-GEM ensures the angle between the current task gradient ($g$) and the average memory gradient ($g_{ref}$) is no more than 90 degrees.
However, A-GEM is inherently conservative; it merely aims to prevent performance degradation. The authors of this paper argue for knowledge consolidation, where learning a new task should ideally improve performance on previous ones—a phenomenon known as positive backward transfer.
Methodology: $ε$-SOFT-GEM
The proposed $ε$-SOFT-GEM algorithm introduces a soft constraint to actively align the update vector with the memory gradient.
As shown in Figure 1, the different strategies manage the relationship between the current gradient $g$ and the reference gradient $g_{ref}$ (or $g_1, g_2$ in GEM):
- GEM: Projects the current gradient onto a feasible region defined by all previous tasks' gradients individually.
- A-GEM: Projects the gradient to ensure it has a non-negative dot product with the average memory gradient $g_{ref}$.
- $ε$-SOFT-GEM: Introduces a balance factor $ε$. Instead of just requiring $\langle g, g_{ref} \rangle \ge 0$, it seeks an update $\tilde{g}$ that satisfies a stricter alignment, encouraging the model to find "win-win" directions that reduce loss for both current and past tasks.
- A-A-GEM: A simpler baseline where the update is the direct average of $g$ and $g_{ref}$.
The authors also utilize a heuristic search during cross-validation to determine the optimal $ε$ for a given task sequence, ensuring the model adapts its stability-plasticity trade-off to the data's nature.
Experimental Setup
The performance of $ε$-SOFT-GEM was evaluated against benchmarks like EWC, MAS, and RWALK across four sequential data streams:
- Permuted MNIST: Shuffled pixels for each task (independent tasks).
- Split CIFAR-100: 20 disjoint subsets of classes.
- Split CUB: Fine-grained bird classification (200 categories) split into 20 tasks.
- Split AWA: Incremental Animals with Attributes dataset with shared classes.
Key Results and Discussion
$ε$-SOFT-GEM demonstrated superior performance in a single training epoch across nearly all benchmarks. Notably, on the complex Split CUB dataset, it achieved 75.6% average accuracy, a significant jump from A-GEM's 61.1%.
A critical finding was the presence of Positive Backward Transfer (BWT) in datasets like Split CUB and Split AWA. This confirms that the soft constraint successfully facilitates knowledge consolidation, where learning new tasks helps the model refine its understanding of previous ones. Furthermore, the method maintains the computational and memory efficiency of A-GEM, making it suitable for real-time applications without the parameter growth seen in architecture-expanding methods.
Conclusion
$ε$-SOFT-GEM offers a robust solution to catastrophic forgetting by transforming episodic memory from a passive guardrail into an active guide for gradient updates. By tuning the soft constraint $ε$, models can achieve a better balance between learning and remembering, paving the way for more human-like lifelong learning systems. Future research may focus on optimizing buffer selection strategies to further enhance the accuracy of the reference gradients.
Summary updated