NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Continual learning with direction-constrained optimization

Yunfei Teng, Anna Choromanska, Murray Campbell

Abstract

This paper studies a new design of the optimization algorithm for training deep learning models with a fixed architecture of the classification network in a continual learning framework. The training data is non-stationary and the non-stationarity is imposed by a sequence of distinct tasks. We first analyze a deep model trained on only one learning task in isolation and identify a region in network parameter space, where the model performance is close to the recovered optimum. We provide empirical evidence that this region resembles a cone that expands along the convergence direction. We study the principal directions of the trajectory of the optimizer after convergence and show that traveling along a few top principal directions can quickly bring the parameters outside the cone but this is not the case for the remaining directions. We argue that catastrophic forgetting in a continual learning setting can be alleviated when the parameters are constrained to stay within the intersection of the plausible cones of individual tasks that were so far encountered during training. Based on this observation we present our direction-constrained optimization (DCO) method, where for each task we introduce a linear autoencoder to approximate its corresponding top forbidden principal directions. They are then incorporated into the loss function in the form of a regularization term for the purpose of learning the coming tasks without forgetting. Furthermore, in order to control the memory growth as the number of tasks increases, we propose a memory-efficient version of our algorithm called compressed DCO (DCO-COMP) that allocates a memory of fixed size for storing all autoencoders. We empirically demonstrate that our algorithm performs favorably compared to other state-of-art regularization-based continual learning methods.

Introduction

Deep learning models are notoriously susceptible to catastrophic forgetting: when trained on a sequence of tasks, updates for a new task often overwrite the weights crucial for previous ones. Existing solutions typically involve architectural expansion, which is memory-intensive, or weight regularization (e.g., EWC, SI), which can over-constrain the model and hinder the acquisition of new skills. This paper introduces Direction-Constrained Optimization (DCO), a method that identifies exactly which directions in the parameter space are "prohibited" because they would destroy past knowledge, while leaving "safe" directions open for learning new tasks.

The Plausible Cone of Solutions

A central contribution of this work is the empirical characterization of the "plausible region"—the set of parameters where a model maintains high performance on a given task. The authors demonstrate that this region is not a simple ball around the optimum but resembles a cone that expands along the direction of convergence. As the model moves further along the averaged gradient direction (parameterized by $\alpha$), the loss landscape becomes significantly flatter, providing more "room" for parameter updates in future tasks.

The loss function $f(\alpha, \beta, v_i)$ for the 1st eigenvector shows that as the model moves deeper into the cone (increasing $\alpha$), the region of low loss widens, indicating increased plasticity.

Identifying Prohibited Directions

By analyzing the optimizer's trajectory after convergence, the authors identify directions where the loss increases most rapidly. These "prohibited directions" correspond to the top principal components of the gradient trajectory. Moving along these few directions causes sharp drops in performance, whereas the remaining "flatter" directions have almost no impact. DCO uses this observation to selectively regularize only the most sensitive directions.

Left: Loss sensitivity along different eigenvectors, showing flatter landscapes for higher-index vectors. Right: Cumulative loss $h(\sigma, V_s)$ as a function of the number of principal directions $s$ used to constrain the update.

Methods: Direction-Constrained Optimization

The DCO algorithm follows a four-step process for each new task:

  1. Constrained Training: The model is trained on the current task using a loss function that penalizes movement along the prohibited directions of all previous tasks.
  2. Strategic Pushing: After convergence, the parameters are "pushed" deeper into the plausible cone to maximize the intersection area for future tasks.
  3. Direction Identification: The top $k$ prohibited directions are identified by analyzing the principal components of the post-convergence gradient trajectory.
  4. Memory-Efficient Storage: To avoid excessive memory usage, Reduced Linear Autoencoders are used to capture these directions. For long task sequences, DCO-COMP employs recursive compression to maintain a constant memory footprint.

Experimental Results

The researchers evaluated DCO on standard benchmarks including Permuted MNIST, Split MNIST, and Split CIFAR-100. DCO and its compressed version consistently outperformed state-of-the-art regularization methods like EWC, SI, and GPM. On Split MNIST, DCO achieved an average error of just 1.46%, significantly lower than EWC (2.7%). Crucially, DCO maintained strong Forward Interference (FWI) scores, proving that it prevents forgetting without impairing the model's ability to acquire new skills.

Conclusion

DCO offers a novel perspective on continual learning by focusing on the geometry of the loss landscape. By constraining updates to stay within the intersection of plausible cones, it effectively mitigates catastrophic forgetting in fixed-architecture networks. Future work may involve dynamic architecture expansion triggered when the intersection of plausible cones becomes empty, signaling that the network has reached its maximum capacity.

Summary updated

BibTeX
@inproceedings{teng2020continual,
  author = {Yunfei Teng and Anna Choromanska and Murray Campbell},
  title = {{Continual learning with direction-constrained optimization}},
  booktitle = {ECML/PKDD},
  year = {2020},
}
Figure