Continual Learning with Recursive Gradient Optimization

Hao Liu, Huaping Liu

Abstract

Catastrophic forgetting remains a significant hurdle in sequential task learning, where neural networks abruptly lose performance on previously learned tasks when trained on new data. This paper introduces Recursive Gradient Optimization (RGO), a novel approach that prevents forgetting without the need for data replay or dynamic network expansion. RGO utilizes a projection matrix to steer gradient updates into directions that minimize loss increases for past tasks. Coupled with a parameter-free Feature Encoding Layer (FEL) that reduces inter-task interference, RGO achieves state-of-the-art performance across multiple benchmarks, including Permuted MNIST, Rotated MNIST, Split CIFAR-100, and Split miniImageNet.

Introduction

Standard deep learning optimizers, such as Stochastic Gradient Descent (SGD), are designed for independent and identically distributed (i.i.d.) data. In continual learning scenarios, where the data distribution shifts as new tasks are introduced, these optimizers often overwrite weights critical for previous tasks, leading to catastrophic forgetting. Existing mitigation strategies typically rely on memory-based methods (storing old data) or expansion-based methods (increasing network capacity). However, these approaches face challenges related to privacy, storage, and "parameter explosion." RGO offers a fixed-capacity solution that learns indefinitely within a single network without re-accessing historical data.

Methodology

The proposed framework consists of two synergistic components: Recursive Gradient Optimization (RGO) and the Feature Encoding Layer (FEL).

Recursive Gradient Optimization (RGO)

RGO modifies the standard gradient update rule. Instead of updating weights directly along the current task's gradient, it projects the gradient onto a subspace that preserves performance on all prior tasks. This is achieved using a projection matrix ($P$) derived from a second-order Taylor expansion of the loss function, aiming to minimize the "Recursive Least Loss" (RLL). A key theoretical contribution is the "Local-Global Equivalence" proof, which demonstrates that this global optimization can be decomposed into efficient, layer-wise updates, keeping computational complexity comparable to standard backpropagation.

Feature Encoding Layer (FEL)

To further mitigate interference, the authors introduce a "virtual" Feature Encoding Layer. FEL uses the task ID as a random seed to permute the order of feature maps between layers. This process does not add any parameters but ensures that each task utilizes a distinct "virtual structure" within the shared network. By decorrelating the gradients of different tasks, FEL makes it significantly easier for the RGO optimizer to identify non-interfering update paths.

Experimental Evaluation

The effectiveness of RGO was evaluated on four standard continual learning benchmarks, each consisting of 20 sequential tasks: Permuted MNIST, Rotated MNIST, Split CIFAR-100, and Split miniImageNet.

Performance of RGO compared to baselines across four benchmarks: (a) Permuted MNIST, (b) Rotated MNIST, (c) Split CIFAR-100, and (d) Split miniImageNet.

Key Results

RGO established new state-of-the-art records for fixed-capacity continual learning. On Split CIFAR-100, it achieved an average accuracy of 82.22%, significantly outperforming established methods like GPM (60.41%) and EWC (47.71%). On Split miniImageNet, it reached 72.63% average accuracy. Notably, RGO often outperformed Single-Task Learning (STL)—the traditional upper bound where a dedicated model is trained for each task—indicating positive knowledge transfer between tasks. Backward Transfer (BWT) metrics remained remarkably low, confirming nearly perfect preservation of old knowledge.

Discussion and Conclusion

RGO demonstrates that effective continual learning is possible within a fixed-capacity network without data replay. The combination of a projection-based optimizer and virtual architectural shuffling provides a robust defense against catastrophic forgetting.

However, the method relies on certain assumptions, such as the proximity of optimal weights for sequential tasks and the presence of sufficient network over-parameterization to allow for non-interfering gradient updates. Future research could explore RGO's applicability to non-classification domains and its performance over much longer task sequences.

Summary updated

BibTeX
@inproceedings{liu2022continual,
  author = {Hao Liu and Huaping Liu},
  title = {{Continual Learning with Recursive Gradient Optimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
}
Figure