Residual Continual Learning

Janghyeon Lee, Donggyu Joo, Hyeong Gwon Hong, Junmo Kim

Introduction

In the field of deep learning, the ability to learn tasks sequentially is a significant challenge. Most neural networks suffer from catastrophic forgetting, where the optimization for a new task (Task B) overwrites the weights previously optimized for an earlier task (Task A), leading to a sharp decline in performance on the original task. Residual Continual Learning (ResCL) introduces a novel framework to mitigate this issue by reparameterizing network layers as a linear combination of the original source network and a fine-tuned target network.

Problem Statement: The Forgetting Dilemma

Existing solutions to catastrophic forgetting generally fall into two categories, each with distinct trade-offs:

  1. Data-driven methods: These rely on storing old training data or using generative models to "replay" past tasks. However, privacy concerns and storage limitations often make this impractical.
  2. Architecture-driven methods: These expand the network for every new task. While they preserve knowledge well, the resulting models become prohibitively large and computationally expensive as the number of tasks increases.

ResCL seeks a middle ground: a method that maintains high performance on both old and new tasks without requiring access to original data and without increasing the final model size.

Methodology: Residual Continual Learning (ResCL)

The core innovation of ResCL is its unique approach to layer parameterization and training. The process unfolds in three primary stages:

1. Residual Reparameterization

Instead of directly fine-tuning the source weights ($\theta_s$), ResCL creates a parallel path with target weights ($\theta_t$). The combined layer output is a weighted sum: $(1 + \alpha_s)\theta_s + \alpha_t\theta_t$. This "residual" structure allows the model to use the original weights as a shortcut, learning only the necessary deviations (the residuals) for the new task.

Figure 1: Overview of the ResCL framework, showing the combination of source and target networks into a single combined net, and the mathematical equivalence for inference.

2. Regularized Training

During training, the model is incentivized to stay close to the source knowledge through a specialized loss function. This includes KL divergence losses ($L_s$ and $L_t$) to align the combined network's behavior with the source and target tasks, and a decay loss ($L_{decay}$) that applies L1 regularization to the $\alpha$ coefficients. This forces the model to rely on the source weights unless a change is essential for the new task.

3. The Inference Trick and Batch Normalization

A key advantage of ResCL is that the linear combination can be mathematically collapsed after training. The two sets of weights and their coefficients are merged into a single weight matrix, resulting in a deployment model identical in size to the original network.

Furthermore, ResCL addresses Batch Normalization (BN) by maintaining task-specific BN parameters during training to avoid instability. These are also merged during the final inference phase to maintain efficiency.

Figure 2: Implementation of ResCL within a residual block, detailing how BN and Convolutional layers are combined and eventually merged for the test phase.

Experimental Evaluation

The researchers evaluated ResCL on several computer vision benchmarks, including CIFAR-10, CIFAR-100, SVHN, ImageNet, and CUB. They tested challenging sequential scenarios, such as transferring from CIFAR-10 to the visually distinct SVHN (Street View House Numbers) dataset.

Key Results

ResCL consistently outperformed state-of-the-art "no-source-data" methods like Learning without Forgetting (LwF) and Incremental Moment Matching (IMM):

  • Superior Stability: In the CIFAR-10 $\rightarrow$ SVHN scenario, ResCL maintained a source accuracy of 88.66%, while LwF's performance collapsed to 43.12%.
  • High Accuracy: ResCL achieved an average accuracy of 89.49% on the CIFAR-10 $\rightarrow$ SVHN task, significantly higher than Mean-IMM (79.91%).
  • Zero Overhead: Because the layers merge for deployment, the computational cost at inference time is exactly 1x compared to a standard model, with no extra memory or latency.

Conclusion

Residual Continual Learning provides a robust framework for sequential task learning by treating prior knowledge as a structural residual. By combining the benefits of architectural stability with the efficiency of weight merging, ResCL offers a scalable solution for lifelong learning in CNNs. Future work may extend this residual philosophy to other architectures, such as Recurrent Neural Networks (RNNs) for natural language processing.

Summary updated

BibTeX
@inproceedings{lee2020residual,
  author = {Janghyeon Lee and Donggyu Joo and Hyeong Gwon Hong and Junmo Kim},
  title = {{Residual Continual Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i04.5884},
}
Figure