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

Remembering Transformer for Continual Learning

Yuwei Sun, Ippei Fujisawa, Arthur Juliani, Jun Sakuma, Ryota Kanai

In the world of AI, "learning something new" often means "forgetting something old." This phenomenon, known as Catastrophic Forgetting (CF), is a major hurdle for neural networks. While humans can learn to ride a bike and then learn to bake a cake without losing their cycling skills, standard AI models tend to overwrite previous knowledge when exposed to new tasks.

A recent paper titled "Remembering Transformer For Continual Learning" introduces a novel architecture that mimics the human brain to solve this problem, achieving state-of-the-art results with a fraction of the memory footprint.

TL;DR

The Remembering Transformer uses a brain-inspired "Mixture-of-Adapters" architecture and generative novelty detection to prevent catastrophic forgetting. By routing data to task-specific modules without needing task labels at inference, it outperforms existing methods by nearly 16% while reducing memory usage by up to 50x.

What Problem Does This Paper Address?

Most continual learning (CL) methods struggle with two things:

  1. Task Identity: Many models require a "task ID" during testing (e.g., "This image is from Task 3") to know which parameters to use. In the real world, we rarely get these labels.
  2. The Scalability Paradox: Methods that avoid forgetting by adding new parameters for every task eventually become too large to manage, while methods that keep parameters fixed often suffer from interference between tasks.

The authors aim to tackle class-incremental learning—the hardest flavor of CL—where the model must learn new classes over time and distinguish between all of them at the end, without being told which task a sample belongs to.

Methods

The researchers took inspiration from the brain’s Complementary Learning Systems (CLS) theory, which suggests the hippocampus rapidly encodes new info while the cortex slowly consolidates it.

1. Mixture-of-Adapters (MoA)

Instead of fine-tuning a whole Vision Transformer (ViT), they keep the backbone frozen. They insert small, trainable LoRA (Low-Rank Adaptation) modules called "adapters." Each task gets its own set of adapters, ensuring that learning Task B doesn't overwrite the weights for Task A.

2. Generative Novelty Detection (The Router)

How does the model know which adapter to use during testing if there's no task ID? They train a tiny Autoencoder (AE) for every task.

  • When an image comes in, it passes through all the AEs.
  • The AE that produces the lowest reconstruction error is deemed the "expert" for that data.
  • The model then activates the corresponding adapter.

3. Adapter Fusion via Distillation

To prevent the model from growing indefinitely, they introduced Adapter Fusion. When a capacity limit is reached, the model uses Knowledge Distillation to merge the knowledge of the most relevant old adapter into a new one, using a tiny "replay memory" of representative samples (selected via a method called Herding).

Datasets

The model was evaluated on standard continual learning benchmarks:

  • CIFAR-10/5: The dataset is split into 5 sequential tasks.
  • CIFAR-100/10 & /20: Split into 10 or 20 sequential tasks.
  • Permuted MNIST: A classic stress test where the model learns 50 different versions of MNIST, each with a different random pixel shuffle.

Key Insights and Ideas

  • The "Aha!" Moment for Routing: Using reconstruction loss from generative models (Autoencoders) acts as a highly effective proxy for task identity. It allows the model to "self-identify" what it's looking at without external labels.
  • Sparsity is Key: By only activating one adapter at a time, the model eliminates "cross-talk" or interference between different tasks.
  • Efficiency of LoRA: Because LoRA adapters are low-rank, they add very few parameters. The authors showed they could reduce the memory footprint from 11.18M parameters (in the FeTrIL method) to just 0.22M on CIFAR-10.

Key Results

The Remembering Transformer sets a new bar for performance:

  • Accuracy: In split tasks, it achieved an average accuracy of 88.43%, surpassing the previous best method (FeTrIL at 72.53%) by 15.90%.
  • CIFAR-100 Performance: On the 10-split CIFAR-100 task, it reached 86.1% accuracy, while most traditional methods struggle to break 60-65%.
  • Permutation Robustness: In the 50-permutation MNIST task, the model maintained near-perfect accuracy, whereas standard "Online EWC" (a popular regularization method) saw its performance crash to near zero after just 10 permutations.

Limitations and Future Work

While the results are impressive, the authors note a few areas for growth:

  • Hierarchical Learning: Currently, adapters are somewhat isolated. Future work could involve learning "hierarchical representations" where adapters share some common knowledge while remaining task-specific.
  • Longer Sequences: While 50 permutations is a lot, real-world "life-long" learning might involve thousands of tasks, which would require even more sophisticated adapter fusion or pruning strategies.
  • Modality Expansion: The current work focuses on Vision Transformers; testing this on Large Language Models (LLMs) for sequential NLP tasks would be a natural next step.

Summary updated

BibTeX
@inproceedings{sun2025remembering,
  author = {Yuwei Sun and Ippei Fujisawa and Arthur Juliani and Jun Sakuma and Ryota Kanai},
  title = {{Remembering Transformer for Continual Learning}},
  booktitle = {IJCNN},
  year = {2025},
  url = {https://openreview.net/forum?id=LGz1xx9azb},
}
Figure