Automating Continual Learning

Kazuki Irie, Róbert Csordás, Jürgen Schmidhuber · Submission to ICLR 2024 · Rejected

TL;DR

Instead of designing hand-crafted regularization terms or storing old data in replay buffers to combat catastrophic forgetting, Automated Continual Learning (ACL) formulates continual learning as an in-context sequence processing problem. By training a self-referential neural network with an objective that explicitly penalizes backward forgetting and encourages forward transfer, the network meta-learns its own continual learning algorithm directly inside its weights.

What Problem Does This Paper Address?

When artificial neural networks learn new tasks sequentially, they typically overwrite previously acquired knowledge—a classic failure mode known as catastrophic forgetting (CF). Standard fixes involve:

  1. Growing the network architecture over time,
  2. Maintaining an external replay buffer of past examples, or
  3. Adding hand-engineered regularizers (e.g., EWC, Synaptic Intelligence) to penalize changing important weights.

Recently, Transformer-based in-context learning has gained attention as an alternative way to adapt without gradient updates at inference time. However, the authors discover that in-context learning also suffers from catastrophic forgetting: when a model ingests demonstrations for Task B, its ability to solve an earlier Task A collapses to random chance. This paper asks: Can we train a network to meta-learn its own continual learning algorithm that preserves past skills while learning new ones—without replay memory or parameter expansion?

Methods

The authors formulate continual learning as long-span sequence learning using a Self-Referential Weight Matrix (SRWM)—a form of Fast Weight Programmer (FWP) / linear Transformer with a fixed-size internal memory:

  • Sequential In-Context Learning: Rather than single few-shot tasks, the model is fed concatenated streams of support examples from multiple tasks sequentially: $(x_1^A, y_1^A), \dots, (x_L^A, y_L^A), (x_1^B, y_1^B), \dots, (x_L^B, y_L^B)$.
  • SRWM Dynamics: The model modifies its fast weights on the fly using a rank-one delta learning rule driven by self-generated query, key, value, and step-size signals.
  • ACL Meta-Training Objective: The training loss evaluates query examples at each task boundary: $$\mathcal{L} = -\log p(y_{\text{test}}^A \mid x_{\text{test}}^A; W_A) - \log p(y_{\text{test}}^B \mid x_{\text{test}}^B; W_{A,B}) - \log p(y_{\text{test}}^A \mid x_{\text{test}}^A; W_{A,B})$$ The first term optimizes standard task adaptation, the second optimizes forward transfer (learning Task B given prior experience with A), and the third directly optimizes backward transfer (retaining Task A performance after learning Task B).

  • Architecture: A standard 4-layer CNN (Conv-4) with Instance Normalization extracts vision features before passing them to two multi-head SRWM layers.

Task A support set ---> [ W_A ] ---> Evaluated on Task A query
                           |
Task B support set ---> [ W_{A,B} ] -> Evaluated on Task B query (Forward Transfer)
                                   \-> Evaluated on Task A query (Backward Transfer / No CF)

Datasets

The authors use existing benchmarks configured into sequential 5-way classification episodes (typically 15 examples per class):

  • Meta-training: Mini-ImageNet, Omniglot, and FC100 (CIFAR-100 split).
  • Evaluation / Meta-testing: Test splits of the training sets, as well as zero-shot transfer across unseen domains including Split-MNIST (domain- and class-incremental splits), CIFAR-10, and Fashion-MNIST.

No new datasets were introduced.

Key Insights and Ideas

  • In-Context Catastrophic Forgetting is Real: Without explicit backward-transfer loss terms, standard sequence-trained meta-learners exhibit the exact same forgetting problem as gradient-trained networks; optimizing performance on Task B rapidly degrades performance on Task A.
  • CL Handled via Meta-Gradients: When backward transfer is baked into the meta-loss, standard gradient descent automatically discovers a self-modification policy that balances the stability-plasticity dilemma.
  • Zero Test-Time Tuning: Unlike prior meta-continual learning frameworks (e.g., MAML-based OML), which still require tuning learning rates and optimization steps during deployment, ACL runs entirely feedforward at test time through recurrent self-modification.
  • Positive Backward Transfer: On certain unseen transfers (e.g., MNIST $\rightarrow$ CIFAR-10), learning the second dataset actually improved the model’s performance on MNIST (from 75.4% to 81.5%), indicating that the model learned to leverage additional context.

Key Results

  • Preventing In-Context CF: In a 2-task Omniglot $\rightarrow$ Mini-ImageNet setup, a baseline without ACL dropped to 22.9% on Omniglot after seeing Mini-ImageNet (near random 20% guessing). With ACL, it retained 98.2% accuracy.
  • Standard Split-MNIST Benchmark:
  • 5-task Domain-Incremental: ACL out-of-the-box reached 72.2%, beating EWC (58.9%) and standard SGD (63.2%). Meta-finetuning with a 5-task ACL loss achieved 84.3% (vs. OML's best 73.6%).
  • 5-task Class-Incremental: The meta-finetuned ACL achieved 74.6%, more than doubling OML (34.2%) and classic regularizers like LwF (24.2%) and SGD (19.5%).
  • Multi-Task Retention: When scaling to 4 sequential datasets (MNIST-04 $\rightarrow$ CIFAR10-04 $\rightarrow$ MNIST-59 $\rightarrow$ Fashion-MNIST), a model meta-trained on 3 tasks maintained an average final accuracy of 50.9% across all 4 tasks (vs. 43.9% for a 2-task trained model), showing that training on longer sequences improves memory retention.

Limitations and Future Work

  • Fixed Vision Backbone: Only the SRWM layers modify themselves; the underlying Conv-4 convolutional feature extractor remains frozen during inference. Fully self-referential vision networks (e.g., self-modifying MLP-Mixers) proved computationally too slow without custom CUDA kernels.
  • Scalability to Large Class Counts: Generating long context sequences for dozens or hundreds of classes is computationally demanding.
  • Task Modality: Experiments are confined to 5-way image classification; continual learning across sequential domains (such as continuous language acquisition) remains untested.

Summary updated

BibTeX
@article{irie2025automating,
  author = {Kazuki Irie and Róbert Csordás and Jürgen Schmidhuber},
  title = {{Automating Continual Learning}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure