Regularization Methods › Worked Example: Protecting Weights Across Two Tasks
Language AI HandbookAll chapters Regularization Methods › Worked Example: Protecting Weights Across Two TasksOne section · Sections in this chapter6 / 10 ↓
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 regularization intuition concrete, consider a small network trained sequentially on two classification tasks. After training on task A, we compute importance weights. When training on task B, parameters with high importance from task A are penalized for deviating from their task-A values.
Consider a single parameter with:
- Task A optimum:
- EWC importance: (high: this parameter matters a lot for task A)
- Current value during task B training:
The EWC regularization penalty contribution from this single parameter is:
This penalty gradient pushes back toward 0.8. The gradient of the regularization term with respect to is:
This negative gradient pushes upward, toward its original value of 0.8. The total gradient for this parameter during task B training is the sum of the task B gradient and this restoring force. If task B's gradient for is small (say, ), the EWC restoring force dominates and the parameter stays near its task A optimum. If task B strongly needs to change (say, its gradient is ), task B's learning will partially override the protection. The interplay between the task gradient and the restoring force determines the final parameter value after each step, and the network will converge to a compromise point where neither force is fully satisfied.
Now consider a second parameter with importance (low: this parameter barely affected task A's loss). Even a large displacement, say , produces only a small penalty:
This parameter is essentially free to adapt to task B. The network can repurpose it entirely without incurring significant regularization cost. This is the key mechanism: the model's plasticity is redirected toward parameters that are available (low importance) while rigidity is enforced on parameters that are essential (high importance). Rather than distributing learning uniformly across all weights, EWC carves out a subspace of available parameters and confines the new task's learning to that subspace. The available subspace is exactly the set of parameters with low Fisher values for previous tasks.
The following visualization shows how EWC importance weights shape the effective learning rate across parameters. Parameters with high Fisher values face a strong restoring force that partially cancels the task B gradient; parameters with near-zero Fisher values can update freely.

Parameters with Fisher value 5.0 experience a restoring gradient five times larger than those with Fisher value 1.0 for any given displacement. This multiplicative scaling is what differentiates EWC from uniform regularization, which would apply the same slope for all parameters. Notice also that the restoring gradient grows linearly with displacement: the further you push a protected parameter from its anchor, the harder it pushes back. This Hookean behavior is exactly the "elastic" quality that gives EWC its name.