Catastrophic Forgetting › A Worked Example: Tracing Forgetting Step by Step
Language AI HandbookAll chapters Catastrophic Forgetting › A Worked Example: Tracing Forgetting Step by StepOne section · Sections in this chapter6 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
To make the mechanics concrete, let us trace through a small numerical example of how catastrophic forgetting unfolds. Imagine a toy neural network with just three parameters, , , and , trained to perform two tasks sequentially. This example is deliberately simple so every step is transparent, but the same dynamics operate in networks with billions of parameters.
Setup. Suppose our network has the following pre-trained weights after Task A training:
Task A performance depends heavily on and (high importance), while has low importance for Task A. After pre-training, the model achieves 88% accuracy on Task A.
Fine-tuning on Task B. Now we fine-tune on Task B. The gradient computed from the first batch of Task B data is:
This gradient says: to reduce Task B loss, increase by 0.4, decrease by 0.3, and increase by 0.6. With a learning rate of , the update rule produces:
After one step: drifted from 1.0 to 0.96, from 0.5 to 0.53. These changes are small, but notice that , which is highly important for Task A, moved in the direction needed for Task B, not in the direction needed for Task A. The gradient for Task B is not aware of what Task A needs.
Accumulation over many steps. After 100 gradient steps with similar Task B gradients, might have drifted to 0.6 and to 0.8. Task A's performance, which depended on and , drops dramatically: perhaps from 88% to 60%, a loss of nearly 30 percentage points in absolute terms.
If we applied EWC regularization, the Fisher information values for these parameters would be approximately , , (high importance for and , low for ). The regularized gradient for would be:
In the first step the EWC gradient is the same, because has not yet drifted. But after drift begins, the EWC regularization term grows to resist further movement:
The regularization pushes back toward 1.0 while the task gradient pushes it down. The larger the drift, the larger the push-back. After 100 steps, might stabilize near 0.85 rather than drifting to 0.6, preserving more of Task A's performance. This is how regularization-based mitigation works: it reshapes the loss surface so that the optimizer encounters resistance when it tries to move important parameters too far from their pre-trained values.