Log inStart free
LESSON 19.02 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Catastrophic forgetting and rehearsal

Watch an agent lose task A while it learns task B, then keep both.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 19.02 · REPLAY BAYTASK A 6/6 RIGHT · STEP 100
01
Stage 1 of 5 · Learn task A
After 100 steps on task A, all 6 A states are right. The agent picks up above the ochre line.
Explain it simply

Each triangle is a state of task A. An up triangle pays a reward of 1 for the action up, and a down triangle pays it for down. The agent learns an action value for each action and picks the larger one. The ochre line is where both values tie, so it splits up from down.

A plane with the 6 states of task A. A line splits the up states from the down states. All 6 are right after 100 steps.

states (▲ up, ▼ down)line, weights, bufferwrong action; no-replay curvepicks up; states right
−3−3−2−2−1−1112233s₁s₂A1A2A3A4A5A6learn task Atask Ashaded: picks uptask Atask B036step 200step 0states right (of 6)A 6weights of dw₁−0.57w₂0.94b−1.11d = −0.57 s₁ + 0.94 s₂ − 1.11−3−3−2−2−1−1112233s₁s₂A1A2A3A4A5A6learn task Atask Ashaded: picks uptask Atask B036step 200step 0states right (of 6)A 6weights of dw₁−0.57w₂0.94b−1.11d = −0.57 s₁ + 0.94 s₂ − 1.11
Toy: 2 one-step tasks of 6 states; linear action values; 100 steps per task, η 0.3
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
d(s)=w1 s1+w2 s2+b\sy{d}{out}{d(s)} = \sy{w}{param}{w_1}\,\sy{s}{data}{s_1} + \sy{w}{param}{w_2}\,\sy{s}{data}{s_2} + \sy{w}{param}{b}
d=−0.57 s1+0.94 s2−1.11d = -0.57\,s_1 + 0.94\,s_2 - 1.11

The agent picks up where d is above zero.

Common mix-ups

MYTHThe agent forgets because 3 weights cannot hold both tasks.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With a replay share of 0%, how many A states are right after task B?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 2 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.