Abstract
Continual learning is an emerging paradigm in machine learning, wherein a model is exposed in an online fashion to data from multiple different distributions (i.e. environments), and is expected to adapt to the distribution change. Precisely, the goal is to perform well in the new environment, while simultaneously retaining the performance on the previous environments (i.e. avoid "catastrophic forgetting") -- without increasing the size of the model. While this setup has enjoyed a lot of attention in the applied community, there hasn't been theoretical work that even formalizes the desired guarantees. In this paper, we propose a framework for continual learning through the framework of feature extraction -- namely, one in which features, as well as a classifier, are being trained with each environment. When the features are linear, we design an efficient gradient-based algorithm DPGrad, that is guaranteed to perform well on the current environment, as well as avoid catastrophic forgetting. In the general case, when the features are non-linear, we show such an algorithm cannot exist, whether efficient or not.
Introduction
Humans possess a remarkable ability to acquire new skills sequentially without losing prior knowledge. We can learn to ride a bicycle, then learn to bake, and subsequently learn to code, all while maintaining our proficiency in the earlier tasks. In contrast, standard artificial neural networks suffer from "catastrophic forgetting." When a model is trained on a new task, the updates to its weights often overwrite the representations necessary for previous tasks, leading to a sharp decline in performance on older data.
While the applied machine learning community has proposed various heuristics to mitigate this—such as memory replay (storing a subset of old data) or regularization-based constraints—the field has lacked a rigorous theoretical foundation. A recent study by Binghui Peng and Andrej Risteski addresses this gap by formalizing continual learning as a feature extraction problem, providing a provably effective algorithm for linear models, and identifying fundamental mathematical barriers for non-linear architectures.
The Feature Extraction Framework
The authors define Continual Learning (CL) through the lens of shared representations. In this framework, a model consists of two components: a feature extractor $R(x)$, which is shared across all tasks, and a sequence of task-specific classifiers (or "prompts") $v_i$.
The goal is to learn these components sequentially. For each new environment $i$, the learner receives data from a distribution $D_i$ and must update the feature extractor $R$ and learn a new classifier $v_i$. The critical constraint is that the updated $R$ must remain compatible with all previous classifiers $\{v_1, \dots, v_{i-1}\}$ without the learner having access to the original data from those previous environments.
DPGrad: Solving the Linear Case
For models where the feature extraction is linear—represented by a matrix $U$ such that $R(x) = U^\top x$—the authors introduce Doubly Projected Gradient Descent (DPGrad).
Existing approaches often use Orthogonal Gradient Descent (OGD), which projects gradients into the null space of previous tasks' gradients. However, the authors demonstrate that OGD is insufficient when both features and classifiers are learned simultaneously. In the linear regime with quadratic loss, "cross-terms" emerge in the objective function that can lead to forgetting even if gradients appear orthogonal.
DPGrad solves this by being more restrictive. It ensures that any update to the feature matrix $U$ is orthogonal to both the column span and the row span of the features learned in all preceding tasks. This "double projection" effectively decouples the new learning process from the established subspaces of previous tasks, providing a theoretical guarantee that the model will not forget old tasks while mastering the current one.
The Non-Linear Barrier
The most striking contribution of the paper is the "reality check" provided for non-linear models. To investigate whether a general solution to continual learning exists, the authors analyze two-layer convolutional neural networks (CNNs) with quadratic activations.
They prove a fundamental impossibility result: for certain non-linear mappings, no "proper" continual learning algorithm can exist. A "proper" learner is one that is restricted to a specific model class. Through a constructive proof, the authors show that a model can become "trapped" by its own success. A feature set that perfectly solves Task A might create a geometric configuration where any update to solve Task B necessarily destroys the performance on Task A. In these cases, the error cannot be pushed below a fixed threshold (e.g., 1/1000), regardless of the algorithm's efficiency or the amount of data provided.
Methodology and Results
As a theoretical work, the paper relies on mathematical proofs and synthetic environments rather than standard benchmarks like ImageNet.
- Synthetic Environments: The authors use distributions where the relationship between input $x$ and label $y$ is known and "realizable," allowing for precise error measurement.
- Linear Success (Theorem 2.11): The authors prove that DPGrad achieves high accuracy on the current task while maintaining performance on all previous tasks, provided a valid shared feature set exists.
- Non-Linear Obstruction (Theorem 2.12): The authors prove that for specific non-linear distributions, no algorithm can guarantee low error across all environments with high probability.
Discussion and Future Directions
The findings suggest that the difficulty of continual learning is not just an optimization problem but a geometric one. Forgetting is often a mathematical necessity in non-linear spaces. However, the authors highlight several avenues for future research:
- Improper Learning: The impossibility result applies to learners restricted to a specific model class. "Improper" learners—those allowed to use more complex models than the ground truth—might be able to navigate around these geometric obstructions.
- Task Identity: The current framework assumes the model knows which task it is performing at test time. Future work could explore "task-agnostic" settings where the model must infer the environment.
- Scaling to Deep Learning: While DPGrad provides a blueprint for linear features, adapting these principles to deep architectures like Transformers remains an open challenge.
Conclusion
By providing the first formal guarantees and impossibility results for continual learning, Peng and Risteski have moved the field beyond empirical trial-and-error. Their work clarifies why linear models can be made robust against forgetting and why non-linear models—the backbone of modern AI—face such inherent difficulties. This theoretical grounding is a vital step toward building AI systems that can learn throughout their lifetimes as effectively as humans do.
Paper Citation: Peng, B., & Risteski, A. (2022). Continual learning: a feature extraction formalization, an efficient algorithm, and fundamental obstructions. arXiv:2203.14383v1 [cs.LG].
Summary updated