6.5.7 · D2Research Frontiers & Practice

Visual walkthrough — Continual and lifelong learning

2,884 words13 min readBack to topic

Before we start, two words we lean on constantly:


Step 1 — One task: walk downhill to the valley floor

WHAT. We train Task 1 alone. Starting from a random knob setting, we repeatedly nudge in the steepest-downhill direction of Task 1's loss until we can't go lower.

WHY. "Steepest downhill" has a name: the negative gradient. The gradient (the symbol , "nabla", just means "slope in every knob-direction at once") points uphill; so the negative gradient points to where the loss drops fastest. That is exactly the tool we want when the only question is "which way is down?" — no other tool answers that directly.

The little "" means "replace the left with the right". We repeat until we land at the valley floor, which we name (the star means "best for Task 1").

PICTURE. The bowl below is Task 1's loss. The white dot rolls down to the bottom . At the very bottom the ground is flat — the slope is zero.


Step 2 — Task 2 arrives, and it pulls us off the floor

WHAT. Task 1's data is gone. Task 2 shows up with its own landscape and its own valley , sitting somewhere else on the map. Standard SGD does one thing: it walks downhill on Task 2, starting from .

WHY. SGD only ever knows the loss you feed it. Right now that is only. So its gradient points toward Task 2's valley — with zero regard for where Task 1's valley was.

Every symbol is the same as Step 1; only the subscript changed from to . That tiny change is the whole disaster: we start on Task 1's floor but march toward Task 2's floor.

PICTURE. Two bowls on one map. The dot starts in the left bowl's bottom () and gets tugged (orange arrow) toward the right bowl's bottom ().


Step 3 — See the forgetting: climbing out of Task 1's valley

WHAT. As we walk toward , watch what happens to Task 1's loss — the thing we stopped measuring.

WHY. We left Task 1's floor. Any step away from the bottom of a bowl means walking uphill on that bowl. So silently grows while we're busy minimising . Nobody is watching Task 1, so nobody stops it. That rising is catastrophic forgetting.

PICTURE. Same map, but now we overlay Task 1's height as a colour. The path from to climbs out of the blue (low ) into the hot (high ) zone. The reader can literally trace the loss going up.

Two root causes, now visible:

  • Parameter overlap — the same axes are shared by both bowls.
  • No memory — once is gone, nothing pins us to the left bowl.

Step 4 — The wish: don't leave the valley along its steep walls

WHAT. We want to reach Task 2's valley while not climbing far up Task 1's bowl. The trick: bowls are not equally steep in all directions. Some directions are steep cliffs (moving there wrecks Task 1); others are gentle plains (moving there barely changes ).

WHY. If we could measure the steepness of Task 1's bowl in each knob-direction, we could tell SGD: "you may move freely along the gentle directions, but resist the steep ones." That measurement is exactly what we build next.

PICTURE. A single valley drawn as an elongated oval (an ellipse). One axis is a steep wall (small budge = big loss jump), the perpendicular axis is a gentle floor (big budge = tiny loss jump). Arrows label "cheap to move" vs "expensive to move".


Step 5 — Approximate the bowl with a parabola (Taylor's tool)

WHAT. We don't have Task 1's data anymore, so we can't redraw its whole bowl. Instead we approximate its shape near the bottom with the simplest curved bowl there is: a parabola.

WHY this tool. Near a smooth minimum, every landscape looks like a parabola — that's what a Taylor expansion (a "zoom-in polynomial" that copies a function's value, slope, and curvature at a point) tells us. We use it because it needs only what we can still afford to store: the location of the floor and its curvature. The linear (slope) term vanishes because — recall Step 1 — the slope at the floor is zero. So:

Reading it term by term:

  • — how far we strayed from Task 1's floor, one number per knob.
  • — the Hessian, a table of curvatures. Formally, entry of is the second derivative of the loss with respect to two knobs at once: Here means "differentiate twice — once for knob , once for knob "; a second derivative measures curvature (how fast the slope itself changes). So a big diagonal entry = steep cliff along knob ; a small one = gentle plain. This is the "steepness meter" we wished for in Step 4.
  • — combines stray-distance with steepness into the extra loss you pay. The "" ("transpose") and the sandwich are just the multi-knob way of writing .

PICTURE. Task 1's true bowl (solid) with the fitted parabola (dashed) hugging it near — a perfect match at the bottom, drifting apart far away (which is fine; we only stay near the bottom).


Step 6 — Replace the full curvature table with Fisher (keep only the diagonal)

WHAT. The full Hessian is a giant square table (millions × millions of entries). We can't store it. So we keep only its diagonal — one steepness number per knob — and we estimate those numbers with the Fisher Information.

First, the model's guess . A classifier doesn't just blurt one answer; it outputs a confidence for each possible answer — a predictive distribution written , read "the probability the model assigns to answer given input , using knobs ." For example it might say "cat: 0.9, dog: 0.1". We look at (rather than the raw loss) because the Fisher trick below asks a probabilistic question: how sharply does the model's confidence in the true answer react when we jiggle a knob? A knob that barely moves the confidence was unimportant; a knob that swings it a lot was critical.

WHY Fisher, and why the diagonal. We compute the Fisher Information cheaply from the old model's own predictions on :

  • — "average over the examples of task " ( is the average, or expectation, symbol).
  • — how confident the model is in the correct answer (the log just turns multiplying probabilities into adding, which is friendlier).
  • — how much that confidence wobbles if you jiggle knob .
  • squared and averaged — big means "knob strongly affects the old task's predictions" = important knob = steep wall. Small = gentle plain. This is precisely our per-direction steepness meter.

Why Fisher Hessian diagonal — and under which assumptions. The link is exact only when three conditions hold: (i) the loss is the negative log-likelihood (standard cross-entropy for classification); (ii) we sit at the converged minimum , where the gradient is zero (Step 1); and (iii) the model is well-specified — its predicted distribution matches the data's true label distribution, so the labels used to average are drawn from the model itself. Under (i)–(iii) the expected Hessian equals the Fisher matrix, and its diagonal is our . In practice these hold only approximately, which is why EWC's penalty is an approximation, not an exact copy, of Task 's bowl.

Keeping only the diagonal means we approximate the tilted oval of Step 4 by an axis-aligned oval — a small inaccuracy for a huge memory saving.

PICTURE. The tilted ellipse of Step 4 alongside its axis-aligned Fisher approximation, with each axis stamped by its : a large on the steep axis, a tiny on the gentle one.


Step 7 — Assemble EWC: two bowls, one compromise

WHAT. Add the parabola-approximation of task 's bowl as a penalty on top of task 's real loss (remember from Step 6: is the finished task, the new one):

Term by term:

  • — the plasticity term: still wants to reach the new task's valley.
  • — a spring on each knob. Its stiffness is : steel spring on important knobs, loose spring on unimportant ones.
  • (lambda) — one global dial for how stiff all the springs are. Big = cling to the old task (stability); small = freely chase the new task (plasticity). This is the stability–plasticity dilemma made into a knob.

WHY it works. The total landscape is now the sum of two bowls. Its new minimum sits between and — pulled toward the new task, but resisting exactly along the old task's steep directions. We reach the new task through the gentle directions of the old task, so its loss barely rises.

PICTURE. The old task's Fisher-parabola (contours) plus the new task's bowl. Their sum has a new minimum that slides toward the new task along the gentle axis, staying near the old floor on the steep axis. Compare its path to the naive orange path of Step 2 — the EWC path curves to hug low old-task loss.


Step 8 — The degenerate cases (don't get surprised)

WHAT & WHY. Every dial has extremes; here is what the landscape does at each.

  • . The springs vanish → EWC collapses to plain SGD → full forgetting (back to Step 2). Picture: only the new task's bowl remains.
  • . Springs infinitely stiff → knobs frozen at → new task never learned. Perfect memory, zero new skill.
  • for some knob. That direction was irrelevant to the old task (flat plain) → no spring → new task uses it freely, at no cost. Correct behaviour.
  • Tasks share a valley (). Both bowls overlap; springs cost almost nothing at . This is easy forward/backward transfer — no conflict to resolve.
  • Many tasks (). The penalty accumulates: each finished task leaves its own set of springs. Naively they can over-stiffen the whole net (everything becomes important). This is the known limitation — later methods (online-EWC) merge the springs so they don't pile up unboundedly.

The one-picture summary

The whole derivation on one map: the old task's bowl (frozen shape, kept as a Fisher-parabola), the new task's bowl (real), naive SGD's forgetting path (orange, climbs out of the old task), and EWC's compromise path (violet, curves along the gentle direction to ).

Recall Feynman retelling (say it out loud)

Training a network is rolling a ball down into a valley — the bottom is "knobs that do the old task well." When a new task arrives with its own valley somewhere else, rolling toward it climbs us straight out of the old valley, and that climb is forgetting. We can't keep the old task's whole map, but near its bottom the valley is just a curved cup we can copy with a parabola. The parabola's steepness in each knob-direction — how much the old task cares about that knob — is measured by Fisher. We then bolt a spring onto every knob: stiff where the old task was steep, loose where it was flat. Now reaching the new task means sliding through the loose directions and resisting the stiff ones, so we settle at a compromise point that does both. One dial sets how hard the springs pull: zero springs = forget everything, infinite springs = learn nothing new.

Recall Self-test

Why does the linear term drop out of the old task's Taylor expansion? ::: Because at the valley floor the gradient (slope) is zero, so the first-order term is zero. What does a large Fisher value mean geometrically? ::: The old task's loss bowl is steep along knob ; moving that knob badly hurts the old task, so EWC puts a stiff spring there. What happens to EWC as ? ::: The knobs freeze at : perfect stability, zero plasticity (the new task is never learned). In one sentence, why does naive SGD forget? ::: It only measures the current task's loss, so it walks toward the new valley and climbs out of the old one with nothing watching the old loss. Under which key assumption does the Fisher Information equal the diagonal of the Hessian? ::: When the loss is the negative log-likelihood and we evaluate at the converged minimum of a well-specified model (labels drawn from the model itself).

See also: Catastrophic Forgetting · Regularization Techniques · Knowledge Distillation · Online Learning · Neuroscience - Memory Consolidation · Meta-Learning · Neural Architecture Search