Continual Learning: Why Models Forget What They Just Learned

Train a model on Task A, then Task B, and its Task-A performance can collapse — not because the tasks conflict, but because nothing in ordinary training protects what was already learned.

Catastrophic forgetting, defined

Catastrophic forgetting is what happens when a model trained sequentially on Task A, then Task B, loses most of its Task-A performance — because gradient descent on Task B happily overwrites the weights that used to solve Task A, with nothing in the objective pulling it back toward the old solution.

This isn't a sign the two tasks are incompatible. A model with enough capacity could solve both simultaneously if trained on both datasets together. The problem is specifically sequential training with no mechanism protecting earlier knowledge.

The simplest fix: replay buffers

A replay buffer stores a small sample of earlier-task examples and mixes them into training on the new task. This is blunt but effective: as long as the loss function keeps seeing some Task-A signal, gradient descent is forced to keep performing reasonably on both tasks rather than only the newest one.

More principled alternatives

Elastic weight consolidation (EWC) estimates which weights mattered most for previous tasks (via the Fisher information matrix) and adds a penalty for changing those specific weights during new-task training — protecting old knowledge without needing to store old data. Progressive networks freeze old-task parameters entirely and add fresh capacity for each new task, avoiding interference by construction at the cost of a growing model. Generative replay trains a generator to synthesize old-task-like data on demand, sidestepping the need to store real historical examples (which may not even be allowed for privacy reasons).

Where this matters outside research papers

Any system that updates with new data over time without full retraining from scratch faces this trade-off: recommendation systems adapting to shifting user behaviour, personalization models updated per-user, and robots or agents that keep learning after deployment all have to decide how much old knowledge to protect versus how much new-task performance to chase.

🧪 Try it yourself: the Continual Learning Lab simulation lets you experiment with everything described above directly in your browser.