Abstract
In the setting of continual learning, a network is trained on a sequence of tasks, and suffers from catastrophic forgetting. To balance plasticity and stability of network in continual learning, in this paper, we propose a novel network training algorithm called Adam-NSCL, which sequentially optimizes network parameters in the null space of previous tasks. We first propose two mathematical conditions respectively for achieving network stability and plasticity in continual learning. Based on them, the network training for sequential tasks can be simply achieved by projecting the candidate parameter update into the approximate null space of all previous tasks in the network training process, where the candidate parameter update can be generated by Adam. The approximate null space can be derived by applying singular value decomposition to the uncentered covariance matrix of all input features of previous tasks for each linear layer. For efficiency, the uncentered covariance matrix can be incrementally computed after learning each task. We also empirically verify the rationality of the approximate null space at each linear layer. We apply our approach to training networks for continual learning on benchmark datasets of CIFAR-100 and TinyImageNet, and the results suggest that the proposed approach outperforms or matches the state-ot-the-art continual learning approaches.
Introduction
Deep neural networks face a significant challenge in continual learning: catastrophic forgetting. When a network is trained on a sequence of tasks, learning new information often overwrites the weights essential for previous tasks. This creates a fundamental plasticity-stability dilemma. Plasticity is required to integrate new knowledge, while stability is necessary to preserve old knowledge. Existing solutions often rely on storing old data, which raises privacy and memory concerns, or complex regularization terms that are difficult to tune.
Methodology: Adam-NSCL
The proposed Adam-NSCL (Null Space of Feature Covariance for Continual Learning) algorithm addresses this dilemma by restricting parameter updates to the approximate null space of previous tasks' feature covariance.
Conceptual Framework
The core idea is rooted in linear algebra: if weight updates are orthogonal (perpendicular) to the inputs of previous tasks, the output for those tasks remains unchanged, ensuring stability. This allows the network to find a path to a low-loss region for the current task while staying within a low-loss region for previous ones.
Implementation Workflow
The algorithm follows a structured process to manage sequential tasks:
- Uncentered Covariance Matrices: For each linear layer, the model maintains an uncentered covariance matrix of input features, capturing the "territory" of previous tasks.
- Incremental Updates: These matrices are updated incrementally after each task, avoiding the need to store raw data.
- Approximate Null Space via SVD: Using Singular Value Decomposition (SVD), the algorithm identifies the "approximate null space" by selecting singular vectors corresponding to the smallest singular values.
- Projection Step: During training on a new task, the candidate gradient update from the Adam optimizer is projected into this approximate null space before updating the weights.
Experimental Results
The authors evaluated Adam-NSCL on standard benchmarks, including 10-split and 20-split CIFAR-100, and 25-split TinyImageNet.
- Accuracy (ACC): On 10-split CIFAR-100, Adam-NSCL achieved 73.77% accuracy, significantly outperforming methods like OWM (68.89%) and GEM (49.48%).
- Forgetting (BWT): The method maintained a very low "Backward Transfer" (BWT) of -1.6%, indicating minimal forgetting. For comparison, some distillation-based methods saw forgetting as high as -18%.
- Scalability: On the challenging 25-split TinyImageNet, it achieved 58.28% accuracy, surpassing the next best non-replay method by nearly 2%.
Conclusion
Adam-NSCL provides a robust framework for continual learning by leveraging the mathematical properties of feature covariance null spaces. By using SVD-based projection instead of matrix inversion, it achieves higher numerical stability and superior performance compared to previous state-of-the-art methods. Future work will focus on optimizing the computational cost of SVD for larger models and refining hyperparameter selection for the approximate null space.
Summary updated