Optimization and Generalization of Regularization-Based Continual Learning: a Loss Approximation Viewpoint

Dong Yin, Mehrdad Farajtabar, Ang Li, Nir Levine, A. Mott · DOI

Abstract

Neural networks have achieved remarkable success in many cognitive tasks. However, when they are trained sequentially on multiple tasks without access to old data, their performance on early tasks tends to drop significantly. This problem is often referred to as catastrophic forgetting, a key challenge in continual learning of neural networks. The regularization-based approach is one of the primary classes of methods to alleviate catastrophic forgetting. In this paper, we provide a novel viewpoint of regularization-based continual learning by formulating it as a second-order Taylor approximation of the loss function of each task. This viewpoint leads to a unified framework that can be instantiated to derive many existing algorithms such as Elastic Weight Consolidation and Kronecker factored Laplace approximation. Based on this viewpoint, we study the optimization aspects (i.e., convergence) as well as generalization properties (i.e., finite-sample guarantees) of regularization-based continual learning. Our theoretical results indicate the importance of accurate approximation of the Hessian matrix. The experimental results on several benchmarks provide empirical validation of our theoretical findings.

Introduction

In the paradigm of continual learning, a model must learn a sequence of tasks without losing the ability to perform previously learned ones. The primary obstacle to this goal is catastrophic forgetting, where the optimization of a new task abruptly overwrites the parameters essential for prior tasks.

Among the various strategies to combat this, regularization-based methods are prominent. These methods introduce a penalty term to the loss function that discourages the model from changing weights that were important for previous tasks. While methods like Elastic Weight Consolidation (EWC) and Synaptic Intelligence (SI) have seen wide use, they often rely on heuristic justifications. This paper provides a rigorous theoretical foundation for these methods by framing them through a Loss Approximation Viewpoint, treating regularization as a second-order Taylor expansion of the loss landscape.

The Loss Approximation Framework

The core of the paper’s contribution is the proposal of a unified framework. The authors demonstrate that most regularization-based methods are essentially minimizing a surrogate loss function, $L^{prox}$, which approximates the cumulative loss of all previous tasks.

By applying a second-order Taylor expansion around the optimal parameters of previous tasks, the complex history of the model is distilled into a quadratic penalty. This framework allows for the unification of several popular algorithms:

  • Elastic Weight Consolidation (EWC): Viewed as a Taylor expansion using a diagonal Fisher information matrix to approximate the Hessian.
  • Kronecker-factored Laplace: A more sophisticated approximation that captures off-diagonal information in the Hessian matrix.
  • Synaptic Intelligence (SI): Another instance of this quadratic approximation logic.

Theoretical Analysis: Convergence and Generalization

By viewing continual learning as an approximation problem, the authors derive formal guarantees for both optimization and generalization:

  1. Convergence Rates: The paper provides convergence bounds for both convex and non-convex loss functions. It proves that while we cannot always reach the absolute global minimum of the true total loss using an approximate surrogate, the model can converge to a bounded "error floor." This floor is determined by the accuracy of the Hessian approximation ($\delta$) and the third-order smoothness of the loss landscape (Hessian Lipschitzness, $\rho$).
  2. Generalization Bounds: Using Rademacher complexity, the authors provide finite-sample guarantees. They show how the gap between training performance and real-world performance behaves as the model progresses through a sequence of tasks.

Experimental Validation

The theoretical framework was tested against three standard benchmarks: Permuted MNIST, Rotated MNIST, and Split CIFAR-100. Each benchmark consisted of 20 sequential tasks.

The Superiority of Kronecker Approximations

A key finding was that the quality of the Hessian approximation is the primary driver of performance. The Kronecker-factored Laplace method, which provides a more accurate estimate of the Hessian than diagonal methods, consistently outperformed its peers. For instance, on Permuted MNIST after 32 epochs, Kronecker-factored Laplace achieved 96.0% accuracy, whereas EWC reached only 56.9%.

The Risk of Over-training

The experiments confirmed a counter-intuitive theoretical prediction: training for too many epochs on a new task can decrease the average accuracy across all tasks. This occurs because the model moves too far from the local region where the Taylor approximation of previous tasks remains valid. This "drift" destroys the preservation of old knowledge, providing a theoretical justification for early stopping in continual learning contexts.

Key Insights and Ideas

  • The Hessian is King: The success of regularization depends heavily on how well the Hessian matrix (the second derivative of the loss) is estimated. Capturing off-diagonal information is crucial for maintaining performance across many tasks.
  • The Drift Penalty: Performance naturally degrades as the optimal parameters for Task $K$ move further away from those of Task $K-1$. If tasks are highly dissimilar, the local Taylor approximation becomes increasingly inaccurate.
  • Smoothness Matters: The "bumpy" nature of the loss landscape (high third-order derivatives) makes quadratic regularization less effective, as the second-order approximation fails to capture the rapid changes in the gradient.

Conclusion and Limitations

This research provides a much-needed theoretical bridge between the heuristics of regularization-based continual learning and the mathematics of Taylor approximations. While the Kronecker-factored approach is significantly more accurate, it comes with a computational cost, taking roughly 5 to 10 times longer to compute than simpler diagonal methods like EWC.

Future work remains to be done in extending this analysis to other pillars of continual learning, such as replay-based or expansion-based methods, and exploring how these theoretical bounds hold up in extremely deep architectures where loss landscapes may be less smooth.

Summary updated

BibTeX
@misc{yin2020optimization,
  author = {Dong Yin and Mehrdad Farajtabar and Ang Li and Nir Levine and A. Mott},
  title = {{Optimization and Generalization of Regularization-Based Continual Learning: a Loss Approximation Viewpoint}},
  year = {2020},
  eprint = {2006.10974},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.10974},
}
Figure