continual learning catastrophic forgetting
**Continual Learning** is the **research area addressing the fundamental challenge that neural networks catastrophically forget previously learned knowledge when trained on new tasks — developing methods (regularization, replay, architectural isolation) that enable a single model to learn sequentially from a stream of tasks without forgetting earlier tasks, which is essential for deploying AI systems that must adapt to new data, new classes, and changing environments over their operational lifetime without retraining from scratch**.
**Catastrophic Forgetting**
When a neural network trained on Task A is subsequently trained on Task B, its performance on Task A degrades severely — often to random-chance levels. This occurs because gradient updates for Task B overwrite the weights that were important for Task A. Biological brains don't suffer this problem — they learn continuously throughout life.
**Regularization Approaches**
**Elastic Weight Consolidation (EWC, Kirkpatrick et al.)**:
- After training on Task A, compute the Fisher Information Matrix F_A for each parameter — measuring how important each weight is for Task A.
- When training on Task B, add a penalty: L_total = L_B + (λ/2) × Σᵢ F_A,i × (θᵢ - θ*_A,i)². Important weights for Task A are penalized for changing.
- Limitation: F approximation degrades as the number of tasks grows. Quadratic penalty cannot prevent forgetting completely for highly conflicting tasks.
**SI (Synaptic Intelligence)**: Online computation of weight importance during training (not just at task boundaries). Tracks how much each weight contributed to loss reduction — important weights are protected. More scalable than EWC for many tasks.
**Replay Approaches**
**Experience Replay**: Store a small subset of examples from previous tasks in a memory buffer. During training on the new task, mix current-task data with replayed examples from the buffer. Simple and effective — prevents forgetting by periodically reminding the network of old tasks.
**Generative Replay**: Train a generative model (VAE, GAN) on previous tasks. When training on the new task, generate pseudo-examples from previous tasks instead of storing real data. No memory buffer needed — the generative model compresses previous experience.
**Dark Knowledge Replay / LwF (Learning without Forgetting)**: Before training on the new task, record the model's outputs (soft labels) on the new task's data. During training, add a distillation loss that preserves the old model's output distribution on the new data. No stored old data needed.
**Architectural Approaches**
**Progressive Neural Networks**: Add new columns (sub-networks) for each new task, with lateral connections from old columns. Old columns are frozen — zero forgetting. Cost: model grows linearly with the number of tasks.
**PackNet**: After training on each task, prune unimportant weights (set to zero) and freeze the remaining important weights. Train the next task using only the pruned (freed) weights. Each task uses a non-overlapping subset of weights. Bounded capacity — limited by network size.
**Evaluation**
Continual learning is evaluated on metrics: Average Accuracy (mean accuracy across all tasks after learning the final task), Backward Transfer (mean accuracy change on earlier tasks after later training — ideally ≥ 0), Forward Transfer (accuracy improvement on new tasks due to earlier learning).
Continual Learning is **the essential capability for real-world AI deployment** — the ability to learn new knowledge without destroying old knowledge, bridging the gap between the fixed-dataset training paradigm and the continuously evolving environments that deployed AI systems must navigate.