A field cookbook · Edition of October 2026

The Continual Learning Cookbook

Recipes for models that keep learning without forgetting, taken straight from the papers that invented them.

EWC schematic, Figure 1 of Kirkpatrick et al. 2017
EWC · 2017
DishBrain protocol, Figure 1 of Kagan et al. 2022
DishBrain · 2022
Split MNIST scenarios, Figure 2 of van de Ven et al. 2022
Three types · 2022
SDFT teaser, Figure 1 of Shenfeld et al. 2026
SDFT · 2026
Fast-slow training loops, Figure 2 of Tiwari et al. 2026
Fast–slow · 2026
Gain metric, Figure 4 of Asawa et al. 2026
CL-Bench · 2026
Ingredients15 papers, 2 repositories, 1 benchmark site and 1 long conversation
Following“What Continual Learning Actually Means feat. Ilija Lichkovski from Prime Intellect”
Served as12 chapters · original figures · equations in LaTeX
0

Front matter

Before you cook

What continual learning is, why everyone is talking about it, and how this book is put together.

Cooked from Lichkovski & Mahdid 2026 Shenfeld et al. 2026 Yuksekgonul et al. 2026 Irie & Lake 2025

Every large model you have used was trained once, frozen, and shipped. After that it does not change. If the world changes, if you teach it something new in a conversation, if it fails at a task a hundred times, the weights stay exactly where they were.

The authors of Self-Distillation Fine-Tuning open their paper with the same observation: today’s AI systems “remain static after deployment”, and while they can adapt at inference time through retrieval or prompting, “they do not update their parameters to acquire new skills, internalize new knowledge, or improve from experience” Shenfeld et al. 2026. The TTT-Discover paper says it the other way round: “Most of today’s AI systems remain static after deployment, even though the world keeps changing. The high-level goal of continual learning is to enable AI systems to keep changing with the world, similar to how humans improve throughout their lives” Yuksekgonul et al. 2026.

Continual learning is the study of how to close that gap: how to let a learning system take in a stream of experience, one piece after another, and keep improving, without destroying what it already knew. Irie and Lake give it the plainest definition in their glossary: “learning new tasks, one after another, in a sequential manner” Irie & Lake 2025.

0.1The conversation this book follows

Video thumbnail of the episode
The menu this book follows

What Continual Learning Actually Means feat. Ilija Lichkovski from Prime Intellect

With Ilija Lichkovski (Prime Intellect), hosted by Yacine Mahdid on Learning with Yacine. Published 12 October 2026, about 1 h 30 min.

yacinemahdid.com/p/what-continual-learning-actually ↗

The episode page opens with a line that explains why this book exists: continual learning “is one hell of a hot topic in 2026 and it’s beautiful because (like consciousness) barely anyone agree on what are we even talking about” Lichkovski & Mahdid 2026. The reading list behind this book is the literature that conversation draws on. The chapters below follow the episode’s order, then go much deeper into each paper than a conversation can.

The episode’s own chapter list, as published on its page:

00:00:00Defining continual learning 00:01:45Ilija’s background in physics, AI safety and ML 00:08:05Continual learning from first principles 00:12:08The time component in machine vs organic learning 00:17:30Three flavors of incremental learning 00:20:10Five desirable aspects of continual learning 00:23:10Fixed general capacity 00:32:40Replay methods 00:36:10Regularization family 00:38:00Meta-learning methods 00:43:50Hypernetworks 00:46:25Hypernetwork experiments and compositional generalization (to 01:02:18) 01:10:45Method-agnostic benchmarking 01:13:25LLM generalization: in-context vs fine-tuning 01:17:07Self-study and learning connected topics (to 01:28:20) 01:30:40Future directions

A gap to fill yourselfThe page lists “five desirable aspects” as a chapter title but does not name them. This book does not guess. Listen from 00:20:10 and write them in the margin.

0.2How to read a recipe

This is a cookbook, so most chapters contain one or more recipe cards. A card has the same four parts every time:

  • You will need: the ingredients, meaning the setting, the data and the assumptions the method relies on.
  • Method: the algorithm, step by step, in the order you would actually run it.
  • The math: the paper’s own equations, typeset in LaTeX, with each symbol explained.
  • Chef’s notes: what the authors themselves say can go wrong.

Around the cards, the chapters explain where each idea comes from and what the experiments showed, using the papers’ original figures with their original captions and tables transcribed number for number. Each figure carries a credit line and a link to its source, and the References chapter lists every paper with its licence. Quotation marks mean the authors’ own words. Everything else is written for this book.

0.3The menu

1

Part I · The problem

Learning in time

Before any equations: living neurons in a dish learn to play Pong within minutes, and a newer project hooks them up to Doom.

Cooked from Kagan et al. 2022 doom-neuron (GitHub) Lichkovski & Mahdid 2026

A brain never gets a training phase followed by a deployment phase. It learns while it acts, from consequences that arrive a moment after each action. The episode spends its first-principles section on exactly this contrast, “the time component in machine vs organic learning” Lichkovski & Mahdid 2026. The cleanest experiment on the organic side is DishBrain.

1.1The question

In 2022, Brett Kagan, Karl Friston and colleagues at Cortical Labs and Monash University asked whether a flat sheet of cultured neurons, grown on a chip, could learn a goal-directed task if it were given a body: a closed loop in which its own activity changes what it senses next Kagan et al. 2022. Their summary states the result:

“Applying implications from the theory of active inference via the free energy principle, we find apparent learning within five minutes of real-time gameplay not observed in control conditions. Further experiments demonstrate the importance of closed-loop structured feedback in eliciting learning over time.”

Kagan et al. 2022, Summary
Graphical abstract from Kagan et al. 2022
Fig. 1.1Graphical abstract in Kagan et al. 2022

Graphical abstract of the DishBrain study.

Original figure reproduced from Kagan et al. 2022 · CC BY 4.0 (open access)

1.2Growing the “wetware”

Three kinds of cultures were used:

  • cortical cells from E15.5 mouse embryos, called MCCs;
  • human cortical cells grown from induced pluripotent stem cells with a dual SMAD inhibition protocol, called HCCs;
  • later in the study, human neurons made by NGN2 direct reprogramming.

Cells were plated on a MaxOne high-density multielectrode array (HD-MEA). The mouse cultures fired synchronised bursts by about 14 days in vitro. The DSI-derived human cultures took much longer, about 73 days, before synchronised bursting appeared Kagan et al. 2022.

Figure 1 from Kagan et al. 2022
Fig. 1.2Figure 1 in Kagan et al. 2022

DishBrain system and experimental protocol schematic. Neuronal cultures derived from hiPSC via DSI protocol, NGN2 lentivirus-directed differentiation, or primary cortical cells from E15.5 mouse embryos were plated onto HD-MEA chips and embedded in a stimulated game-world of “Pong” via the DishBrain system. Different DishBrain environments were created by altering the pattern of sensory information (yellow bolts), feedback (colored bolts), or no stimulus (red crosses) to demonstrate (1 and 2) low-latency, closed-loop feedback system (stimulation (STIM) and silent (SIL) treatment); (3) no-feedback (NF) system to demonstrate an open-loop feedback configuration; and (4) rest (RST) configuration to demonstrate a system in which sensory information is absent.

Original figure reproduced from Kagan et al. 2022 · CC BY 4.0 (open access)

1.3The kitchen: a closed loop

The DishBrain software reads voltages from the array, turns activity in two predefined “motor regions” into paddle movement, runs the game, and writes the ball’s position back into the culture as electrical stimulation, all in real time. The paper describes three categories of stimulation: sensory (where the ball is), predictable and random Kagan et al. 2022.

Figure 4 from Kagan et al. 2022
Fig. 1.3Figure 4 in Kagan et al. 2022

Schematics and pilot testing with increasing informational density. (A) Diagrammatic overview of DishBrain setup. (B) Software components and data flow in the DishBrain closed-loop system. Voltage samples flow from the MEA to the “Pong” environment, and sensory information flows back to the MEA, forming a closed loop. (C) Schematic showing the different phases of stimulation to the culture. In line with this is the corresponding summed activity on the raster plot over 100 seconds. The appearance of random stimulation after a ball missing versus system-wide predictable stimulation upon a successful hit is apparent across all three representations. Corresponding images on the right show the position of the ball on both x and y axis relative to the paddle and back wall in percentage of total distance shown on the same timescale. (D) Final electrode layout schematic for DishBrain Pong-world gameplay. (E) * = p < 0.05, *** = p < 0.001; error bars = 95% CI. Shows average rally length over three distinct experiment rounds during design of DishBrain Pong-world where each subsequent experiment provided higher density information on ball position than the previous. MCC tested over 272 sessions, n = 50 biological replicates; HCC tested over 579 sessions, n = 18 biological replicates.

Original figure reproduced from Kagan et al. 2022 · CC BY 4.0 (open access)

DishBrain Pong

Recipe 1.1 · Kagan et al. 2022

You will need

  • A neural culture on a high-density multielectrode array (26,400 platinum electrodes)
  • A sensory area of 8 stimulation electrodes
  • Two motor regions: activity in one moves the paddle up, activity in the other moves it down
  • Low-latency software that closes the loop between array and game

Method

  1. Encode the ball’s position in the sensory area: place coding (which electrode fires tells the ball’s vertical position) combined with rate coding from 4 Hz to 40 Hz (how often it fires tells the distance to the paddle).
  2. Read spikes from the two motor regions in real time and move the paddle accordingly.
  3. If the paddle hits the ball, deliver predictable feedback: all electrodes at 100 Hz for 100 ms, then continue the game.
  4. If it misses, deliver unpredictable feedback: random stimulation at 150 mV and 5 Hz for 4 seconds, then restart the ball on a random vector.
  5. Repeat for 20-minute sessions and compare the first 5 minutes with the last 15.
Chef’s noteThe motor regions are fixed in advance, while the cells are spread randomly over the chip. Any learning therefore has to come from the culture reorganising its own activity.

1.4Why “unpredictable” feedback?

The design comes from the free energy principle, which the paper summarises as the claim that “any self-organizing system separate from its environment seeks to minimize its variational free energy”. The gap between predictions and sensations “may be minimized in two ways: by optimizing probabilistic beliefs about the environment to make predictions more like sensations or by acting upon the environment to make sensations conform to its predictions” Kagan et al. 2022. If that is true, the authors reason, a culture should learn to avoid whatever leads to unpredictable input. Hitting the ball leads to predictable input; missing leads to noise.

For readers who want the quantity itself, here is the textbook definition of variational free energy that the theory refers to. It is a standard identity, not an equation from the paper. Hidden states are ss, observations oo, the system’s internal belief q(s)q(s) and its generative model p(o,s)p(o,s):

F[q]  =  Eq(s)[log⁡q(s)−log⁡p(o,s)]  =  DKL(q(s) ∥ p(s∣o))  −  log⁡p(o)    ≥    −log⁡p(o).F[q] \;=\; \mathbb{E}_{q(s)}\big[\log q(s) - \log p(o, s)\big] \;=\; D_{\mathrm{KL}}\big(q(s)\,\|\,p(s\mid o)\big) \;-\; \log p(o) \;\;\ge\;\; -\log p(o).

Because the KL term is never negative, free energy upper-bounds surprise, −log⁡p(o)-\log p(o). The paper uses the information entropy of neural responses as a proxy for average surprise, “which is upper-bounded by VFE”, and predicts entropy should drop during gameplay and rise after random feedback.

1.5What happened

Across 399 test sessions, the authors compared the cultures with three controls:

  • media-only arrays with no cells (CTL);
  • rest sessions, where active cultures controlled the paddle but got no sensory information (RST);
  • in-silico runs driven by random noise (IS).

Only the mouse and human cultures improved over time. Rally length went up for MCCs (t=6.15,  p=5.27×10−8t = 6.15,\; p = 5.27\times10^{-8}) and for HCCs (t=10.44,  p=3.92×10−19t = 10.44,\; p = 3.92\times10^{-19}). Both groups also missed the first serve (“aces”) less often and made more long rallies of more than three hits. Human cultures started worse than every control in the first five minutes, then overtook them Kagan et al. 2022.

Figure 5 from Kagan et al. 2022
Fig. 1.4Figure 5 in Kagan et al. 2022

Embodied cortical neurons show significantly improved performance in “Pong” when embodied in a virtual game-world. 399 test-sessions were analyzed with biological replicates: 80-CTL (n = 6), 42-RST (n = 20), 38-IS (n = 3), 101-MCCs (n = 9), 138-HCCs (n = 11). (A) Schematic of how neurons may engage in the game-world under active inference denoting a gradient flow on variational free energy, expressed in terms of neural activity minimizing prediction errors. ε is prediction error, ξ represents a precision-weighted prediction error; ‘a’ corresponds to action. (B–D) Experimental groups according to time point 1 (T1; 0–5 min) and time point 2 (T2; 6–20 min). (B) Average performance between groups over time, where only experimental (MCC: t=6.15,p=5.27×10−8t = 6.15, p = 5.27\times10^{-8} and HCC: t=10.44,p=3.92×10−19t = 10.44, p = 3.92\times10^{-19}) showed significant improvement and higher average rally length against all control groups at T2. (C) Average number of aces between groups and over time; only MCCs and HCCs showed significant decreases in the number of aces over time, indicating learning. (D) Average number of long rallies (>3) performed in a session; both the MCC and HCC groups showed significantly more long rallies over time. (E) The average distance that the paddle moved during a session was found to have no obvious relationship with average rally length. (F) Distribution of frequency of mean summed hits per minute among groups.

Original figure reproduced from Kagan et al. 2022 · CC BY 4.0 (open access)

Two checks rule out the obvious alternative explanations. Non-neural HEK293T cells and media-only controls showed no learning. Paddle movement alone did not explain rally length: the in-silico control moved the paddle the most and still performed no better than the other controls.

1.6The key ingredient is feedback

The most useful experiment for anyone thinking about continual learning is the feedback comparison: 486 sessions over three days and three conditions Kagan et al. 2022.

  • Stimulus: the standard predictable and unpredictable feedback.
  • Silent: after a miss, all stimulation was withheld for the same duration, then the game restarted.
  • No feedback: after a miss the ball simply bounced on, with no change in stimulation at all.
Figure 6 from Kagan et al. 2022
Fig. 1.5Figure 6 in Kagan et al. 2022

The importance of feedback in learning. 486 sessions were analyzed. (A) Schematic showing the stimulation from the 8 sensory electrodes across 40 s of the same gameplay for each of the three conditions. Random stimulation follows a miss and predictable stimulation follows a hit in the Stimulus condition. Note the corresponding absence of any stimulation in the Silent condition and the lack of any change in sensory stimulation in the No-feedback condition. (B) The probability of a certain number of hits occurring in a group at a specific minute. (C) Using different feedback schedules, the Stimulus feedback condition showed significant learning (t=7.48,p=1.58×10−12t = 7.48, p = 1.58\times10^{-12}) and outperformed Silent and No-feedback average rally length. Silent feedback also showed higher performance compared with these groups at T2. (D) Difference seen in (C) across day. (E) Similar differences versus rest performance for aces across conditions, where the Stimulus group showed significantly fewer aces across time (t=3.21,p=0.002t = 3.21, p = 0.002). (F) Data from (E) across day. (G and H) Long rallies across timepoints and across days.

Original figure reproduced from Kagan et al. 2022 · CC BY 4.0 (open access)

Only the Stimulus condition improved significantly over time (t=7.48,  p=1.58×10−12t = 7.48,\; p = 1.58\times10^{-12}). Silent feedback did better than no feedback, but less than Stimulus. The authors’ conclusion is direct: “information alone is insufficient; feedback is required to form a closed-loop learning system” Kagan et al. 2022.

The electrophysiology tells the same story from inside the culture. During gameplay, sensory and motor regions were more strongly correlated than at rest. “Mutually exclusive” events, where one motor region fired and the other did not, became more frequent (t=14.64,  p=5.68×10−48t = 14.64,\; p = 5.68\times10^{-48}). The correlation between the two motor regions fell over the first five minutes of play and then levelled off.

Figure 7 from Kagan et al. 2022
Fig. 1.6Figure 7 in Kagan et al. 2022

Electrophysiological activity during Gameplay and Rest. 579 sessions (358 Gameplay, 221 Rest) were analyzed with n = 43 biological replicates. (A–D) A significant positive correlation between mean firing and performance was found between motor region 1 and 2 with the Sensory area both during Rest (A and B) and Gameplay (C and D). (E) The average cross-sensory motor correlation was significantly less during Rest than during Gameplay. (F) The percentage of mutually exclusive activity events per second across motor regions increased significantly during Gameplay versus Rest (t=14.64,p=5.68×10−48t = 14.64, p = 5.68\times10^{-48}). (G) The correlation between the two motor regions showed substantial changes over time; linear regression on the first 5 min of Gameplay showed a significant negative relationship that was absent in the final 15 min. (H) Activity over time showed no significant changes while engaged in Gameplay. (I) Functional plasticity increased during gameplay. (J, K) Information entropy around feedback periods during Gameplay and Rest.

Original figure reproduced from Kagan et al. 2022 · CC BY 4.0 (open access)

The authors’ own limitsThe sensory stimulation is very coarse. A monolayer of cells has far fewer connections than any 3D brain. “While within-session learning was well established, between-session learning over multiple days was not robustly observed. Cultures appeared to relearn associations with each new session”, which the authors say is expected for cortical cells, since cortex is not specialised for long-term memory. They also note that the word “sentience” is used in the formal sense of being “responsive to sensory impressions” Kagan et al. 2022.

1.7From Pong to Doom

A newer community project, doom-neuron, uses Cortical Labs’ CL1 platform to let living neurons control an agent in Doom doom-neuron (GitHub). The problem is much harder than Pong: a 320×240 screen instead of a ball position, and a hybrid action space for movement and shooting. So the repository adds learned machinery around the cells, and its README is candid about the obvious question: is the machinery doing all the learning?

Neurons that play Doom

Recipe 1.2 · doom-neuron README

You will need

  • A CL1 neural culture reachable over the network
  • VizDoom scenarios: progressive deathmatch (default), survival, and a five-level “deadly corridor” curriculum
  • An encoder (a light CNN, 16 channels) that outputs stimulation commands
  • A linear decoder from spikes to actions, with zero bias

Method

  1. The encoder reads the screen (plus ray-cast wall features) and chooses a stimulation pattern: frequency, amplitude, pulses and which channels to stimulate.
  2. The stimulation is sent to the CL1. The training side waits 50 ms for stimulation artifacts to fade, then collects spikes over a 50 ms window.
  3. A linear readout turns spike counts into an action. A running per-channel baseline is subtracted first, so random firing cannot act as a hidden bias.
  4. Game reward is turned back into electrical feedback (amplitude 2.0 by default), so the cells receive consequences.
  5. The encoder is trained with PPO. Spikes cannot be differentiated through, so its sampled stimulation log-probabilities go into the policy-gradient objective.
Defaultslearning rate 3×10−43\times10^{-4}, γ=0.99\gamma = 0.99, GAE λ=0.95\lambda = 0.95, clip ϵ=0.2\epsilon = 0.2, entropy coefficient 0.02, 2,048 steps per update, batch 256, 4 epochs.

Step 5 is the important trick. Because the neurons sit between the encoder and the reward, there is no gradient to backpropagate. The README says the encoder is trained “using the log-likelihood trick (REINFORCE-style), i.e., by including the encoder’s sampled stimulation log-probs in the PPO objective rather than backpropagating through spikes” doom-neuron (GitHub). In symbols, with uu a sampled stimulation, oo an observation and A^\hat A an advantage estimate, the score-function gradient is

∇ϕJ  =  E[ A^  ∇ϕlog⁡πϕ(u∣o) ],\nabla_\phi J \;=\; \mathbb{E}\big[\,\hat A \;\nabla_\phi \log \pi_\phi(u \mid o)\,\big],

and PPO optimises its usual clipped surrogate (the standard objective of Schulman et al., not written out in the README), with ratio rt=πϕ(ut∣ot)/πϕold(ut∣ot)r_t = \pi_\phi(u_t\mid o_t)/\pi_{\phi_\text{old}}(u_t\mid o_t):

LCLIP(ϕ)  =  Et[min⁡(rt A^t,  clip⁡(rt, 1−ϵ, 1+ϵ) A^t)].L^{\text{CLIP}}(\phi) \;=\; \mathbb{E}_t\Big[\min\big(r_t\,\hat A_t,\; \operatorname{clip}(r_t,\,1-\epsilon,\,1+\epsilon)\,\hat A_t\big)\Big].

On whether the cells actually learn, the README answers with ablations. With random spikes or zero spikes in place of the CL1’s output, learning disappears. With the encoder weights frozen at test time, reward still improved, because “biological neurons have an internal state (membrane potential, synaptic weights, adaptation currents). The same stimulation delivered at different points in training will produce different spike patterns” doom-neuron (GitHub).

Read with careThis is a code repository, not a peer-reviewed paper, and the README itself flags several settings, such as same-frame encoding, as “experimental” and “not yet ablation-tested”. Treat its claims as an engineering report worth reproducing.

What to take from this chapter

  1. Biological learning happens in time, inside a loop where the learner’s own actions shape what it experiences next.
  2. Information is not enough. DishBrain cultures given the ball’s position but no consequences did not learn.
  3. Even in a dish, learning within a session was easy and keeping it across sessions was not. That is continual learning’s central problem in miniature.
2

Part I · The problem

Catastrophic forgetting and Elastic Weight Consolidation

Train a network on task A, then on task B, and it forgets A. EWC slows learning on the weights that A needs, and you can derive it from Bayes’ rule in four lines.

Cooked from Kirkpatrick et al. 2017 Lichkovski & Mahdid 2026

The problem has a name from the late 1980s: catastrophic forgetting. Kirkpatrick and colleagues describe it as “the tendency for knowledge of previously learnt task(s) (e.g. task A) to be abruptly lost as information relevant to the current task (e.g. task B) is incorporated”, and they say exactly when it happens: “specifically when the network is trained sequentially on multiple tasks because the weights in the network that are important for task A are changed to meet the objectives of task B” Kirkpatrick et al. 2017.

Most deep learning avoids the problem by never facing it. Data from all tasks is shuffled together and trained at once (multitask learning). If tasks arrive one after another, you could store everything and replay it, but the authors point out that this “would require the amount of memories being stored and replayed to be proportional to the number of tasks” Kirkpatrick et al. 2017. The episode covers this family of fixes at 36:10 under “regularization” Lichkovski & Mahdid 2026. EWC is its best-known member.

2.1An idea borrowed from the brain

The paper starts from neuroscience. When a mouse learns a new skill, some excitatory synapses grow stronger, visible as larger dendritic spines, and “these enlarged dendritic spines persist despite the subsequent learning of other tasks, accounting for retention of performance several months later”. Erase those spines and the skill goes. The authors read this as evidence for task-specific synaptic consolidation: knowledge “durably encoded in a proportion of synapses that are rendered less plastic” Kirkpatrick et al. 2017. EWC is the artificial version: make some weights less plastic, and choose which ones by how much the old task needs them.

Figure 1 from Kirkpatrick et al. 2017
Fig. 2.1Figure 1 in Kirkpatrick et al. 2017

Elastic weight consolidation (EWC) ensures task A is remembered whilst training on task B. Training trajectories are illustrated in a schematic parameter space, with parameter regions leading to good performance on task A (gray) and on task B (cream). After learning the first task, the parameters are at θA∗\theta^*_A. If we take gradient steps according to task B alone (blue arrow), we will minimize the loss of task B but destroy what we have learnt for task A. On the other hand, if we constrain each weight with the same coefficient (green arrow) the restriction imposed is too severe and we can only remember task A at the expense of not learning task B. EWC, conversely, finds a solution for task B without incurring a significant loss on task A (red arrow) by explicitly computing how important weights are for task A.

Original figure reproduced from Kirkpatrick et al. 2017 · arXiv non-exclusive distribution licence

Figure 2.1 is the whole idea in one picture. Large networks have many good solutions. Over-parameterisation makes it likely “that there is a solution for task B, θB∗\theta^*_B, that is close to the previously found solution for task A, θA∗\theta^*_A”. So instead of walking straight to B’s minimum (blue), EWC keeps the weights inside the region that is still good for A. It does this with a quadratic penalty that acts “as a spring anchoring the parameters to the previous solution, hence the name elastic”. The spring is stiffer for the weights that matter more Kirkpatrick et al. 2017.

2.2The derivation

Treat training as finding the most probable parameters θ\theta given data D\mathcal{D}. Bayes’ rule, in log form (Eq. 1 of the paper):

log⁡p(θ∣D)  =  log⁡p(D∣θ)  +  log⁡p(θ)  −  log⁡p(D).\log p(\theta \mid \mathcal{D}) \;=\; \log p(\mathcal{D}\mid\theta) \;+\; \log p(\theta) \;-\; \log p(\mathcal{D}).

The log-likelihood log⁡p(D∣θ)\log p(\mathcal{D}\mid\theta) is just the negative loss, −L(θ)-\mathcal{L}(\theta). Now split the data into two independent parts, task A’s data DA\mathcal{D}_A and task B’s data DB\mathcal{D}_B. Applying Bayes’ rule twice gives Eq. 2:

log⁡p(θ∣D)  =  log⁡p(DB∣θ)  +  log⁡p(θ∣DA)⏟everything we know about A  −  log⁡p(DB).\log p(\theta \mid \mathcal{D}) \;=\; \log p(\mathcal{D}_B\mid\theta) \;+\; \underbrace{\log p(\theta \mid \mathcal{D}_A)}_{\text{everything we know about A}} \;-\; \log p(\mathcal{D}_B).

The left side is still the posterior given all the data, but the right side only needs B’s loss plus the posterior after A. In the paper’s words, “All the information about task A must therefore have been absorbed into the posterior distribution p(θ∣DA)p(\theta\mid\mathcal{D}_A)” Kirkpatrick et al. 2017. If we could carry that posterior forward, we would never need A’s data again.

The true posterior is intractable, so EWC uses a Laplace approximation (following MacKay): a Gaussian centred at the solution θA∗\theta^*_A, whose precision is the curvature of the loss there. Expanding to second order around θA∗\theta^*_A, where the gradient is zero:

log⁡p(θ∣DA)  ≈  const  −  12 (θ−θA∗)⊤ HA (θ−θA∗),HA≈FA.\log p(\theta\mid\mathcal{D}_A) \;\approx\; \text{const} \;-\; \tfrac12\,(\theta-\theta^*_A)^{\top}\,H_A\,(\theta-\theta^*_A), \qquad H_A \approx F_A .

The Hessian HAH_A is replaced by the Fisher information matrix FF, and only its diagonal is kept. The paper lists why FF is a good choice: “(a) it is equivalent to the second derivative of the loss near a minimum, (b) it can be computed from first-order derivatives alone and is thus easy to calculate even for large models, and (c) it is guaranteed to be positive semi-definite” Kirkpatrick et al. 2017. The diagonal entry for parameter ii is the expected squared gradient of the log-likelihood:

Fi  =  Ex∼DA,  y∼pθ(y∣x) ⁣[(∂log⁡pθ(y∣x)∂θi) ⁣2]θ=θA∗.F_i \;=\; \mathbb{E}_{x\sim\mathcal{D}_A,\; y\sim p_\theta(y\mid x)}\!\left[\left(\frac{\partial \log p_\theta(y\mid x)}{\partial \theta_i}\right)^{\!2}\right]_{\theta=\theta^*_A}.

Substitute the Gaussian into Eq. 2, drop constants, and flip the sign to get a loss. That gives the EWC objective, Eq. 3 of the paper:

  L(θ)  =  LB(θ)  +  ∑iλ2 Fi (θi−θA,i∗)2  \boxed{\;\mathcal{L}(\theta) \;=\; \mathcal{L}_B(\theta) \;+\; \sum_i \frac{\lambda}{2}\, F_i\,\big(\theta_i - \theta^*_{A,i}\big)^2\;}

LB\mathcal{L}_B is the loss for task B only. θA,i∗\theta^*_{A,i} is weight ii after task A. FiF_i is its importance. λ\lambda “sets how important the old task is compared to the new one” Kirkpatrick et al. 2017.

For a third task C, EWC keeps the parameters close to both earlier solutions. This “can be enforced either with two separate penalties, or as one by noting that the sum of two quadratic penalties is itself a quadratic penalty” Kirkpatrick et al. 2017. Concretely, for tasks k=1,…,K−1k = 1,\dots,K-1 already learned:

L(θ)  =  LK(θ)  +  ∑k=1K−1∑iλ2 Fi(k)(θi−θk,i∗)2.\mathcal{L}(\theta) \;=\; \mathcal{L}_K(\theta) \;+\; \sum_{k=1}^{K-1}\sum_i \frac{\lambda}{2}\,F^{(k)}_i\big(\theta_i - \theta^{*}_{k,i}\big)^2 .

Elastic Weight Consolidation

Recipe 2.1 · Kirkpatrick et al. 2017

You will need

  • A network trained on task A, with weights θA∗\theta^*_A
  • Some samples of A’s inputs to estimate the Fisher, used once after A finishes
  • One extra number per weight, FiF_i, plus the anchor θA,i∗\theta^*_{A,i}
  • A strength λ\lambda, chosen by hyperparameter search

Method

  1. Train on task A normally until it is learned.
  2. Freeze a copy of the weights as the anchor θA∗\theta^*_A.
  3. Estimate FiF_i: average the squared gradient of log⁡pθ(y∣x)\log p_\theta(y\mid x) over A’s inputs, with labels sampled from the model.
  4. Train on task B with the loss LB+∑iλ2Fi(θi−θA,i∗)2\mathcal{L}_B + \sum_i \tfrac{\lambda}{2}F_i(\theta_i-\theta^*_{A,i})^2.
  5. At each new task boundary, add another anchor-and-Fisher term (or merge them into one quadratic).
Cost“EWC has a run time which is linear in both the number of parameters and the number of training examples” Kirkpatrick et al. 2017. Memory is two extra numbers per weight per stored penalty.

2.3First test: permuted MNIST

Each task is MNIST with the pixels shuffled by a fixed random permutation: “Each task was thus of equal difficulty to the original MNIST problem, though a different solution would be required for each.” The network is trained on a task, then never sees that task’s data again Kirkpatrick et al. 2017.

Figure 2 from Kirkpatrick et al. 2017
Fig. 2.2Figure 2 in Kirkpatrick et al. 2017

Results on the permuted MNIST task. A: Training curves for three random permutations A, B and C using EWC (red), L2L_2 regularization (green) and plain SGD (blue). Note that only EWC is capable of maintaining a high performance on old tasks, while retaining the ability to learn new tasks. B: Average performance across all tasks using EWC (red) or SGD with dropout regularization (blue). The dashed line shows the performance on a single task only. C: Similarity between the Fisher information matrices as a function of network depth for two different amounts of permutation. Either a small square of 8x8 pixels in the middle of the image is permuted (grey) or a large square of 26x26 pixels is permuted (black). Note how the more different the tasks are, the smaller the overlap in Fisher information matrices in early layers.

Original figure reproduced from Kirkpatrick et al. 2017 · arXiv non-exclusive distribution licence

Panel A shows three behaviours:

  • Plain SGD (blue) forgets A as soon as B begins, and the forgetting “compounds further with more training time, and the addition of subsequent tasks”.
  • A uniform L2L_2 penalty (green) protects A, but “task B cannot be learned properly as the constraint protects all weights equally, leaving little spare capacity”.
  • EWC (red) learns B without forgetting A.

Panel B shows that the best SGD-with-dropout setup did not scale to more tasks, while “EWC allows a large number of tasks to be learned in sequence, with only modest growth in the error rates” Kirkpatrick et al. 2017.

Panel C answers a deeper question: does EWC carve the network into separate pieces per task, or do tasks share weights? The authors measure the overlap between two tasks’ Fisher matrices. Each is normalised to unit trace, and the overlap is defined as 1−d21 - d^2 using the Fréchet distance:

d2(F^1,F^2)  =  12 tr ⁣(F^1+F^2−2 (F^1F^2)1/2)  =  12 ∥F^11/2−F^21/2∥F,d^2\big(\hat F_1, \hat F_2\big) \;=\; \tfrac12\,\mathrm{tr}\!\left(\hat F_1 + \hat F_2 - 2\,(\hat F_1 \hat F_2)^{1/2}\right) \;=\; \tfrac12\,\big\|\hat F_1^{1/2} - \hat F_2^{1/2}\big\|_F ,

d2d^2 is between 0 and 1. An overlap of 1 means F1=αF2F_1 = \alpha F_2: the two tasks lean on the same weights.

Similar tasks (only an 8×8 patch permuted) share weights throughout the network. Very different tasks (a 26×26 patch permuted) use separate weights in early layers. But “even for the large permutations, the layers of the network closer to the output are indeed being reused for both tasks”, because the inputs differ while the output classes are shared Kirkpatrick et al. 2017.

HyperparameterFig. 2AFig. 2BFig. 2C
learning rate10−310^{-3}10−510^{-5}–10−310^{-3}10−310^{-3}
dropoutnoyesno
early stoppingnoyesno
number of hidden layers226
width of hidden layers400400–2000100
epochs per dataset20100100

Table 2.1 Hyperparameters for the MNIST experiments, transcribed from the supplementary table of Kirkpatrick et al. Fully connected ReLU networks. Where a range is given, it was searched randomly over 50 combinations.

2.4Second test: ten Atari games

Reinforcement learning is harder: no labelled dataset, and games return unpredictably. Each run used ten games chosen at random from 19 that a standard DQN plays at human level. The agent played them in long segments, in random order, often returning to the same game several times Kirkpatrick et al. 2017.

The agent had two additions besides EWC. First, small task-specific gains and biases in every layer, so each game gets its own adjustment while the main weights are shared:

yi  =  (∑jWij xj  +  bic) gic,y_i \;=\; \Big(\textstyle\sum_j W_{ij}\,x_j \;+\; b^{c}_i\Big)\,g^{c}_i ,

cc is the current task (context). bcb^c and gcg^c are initialised to 0 and 1.

Second, a task-recognition model, because nobody tells the agent which game it is playing. The current task is a hidden variable of a Hidden Markov Model with switch probability α\alpha:

p(c,t+1)=∑c′p(c′,t) Γ(c,c′),Γ(c,c′)=δ(c,c′)(1−α)+(1−δ(c,c′)) α,p(c, t+1) = \sum_{c'} p(c', t)\,\Gamma(c, c'), \qquad \Gamma(c, c') = \delta(c, c')(1-\alpha) + \big(1-\delta(c,c')\big)\,\alpha ,
p(c∣o1…ot)  ∝  ∑c′Γ(c,c′) p(c′,t−1) p(o∣c,t).p(c \mid o_1 \dots o_t) \;\propto\; \sum_{c'} \Gamma(c, c')\, p(c', t-1)\, p(o\mid c, t).

Each task has a generative model of the screen, a Dirichlet-multinomial over pixels. A spare, untrained model is always kept. If it explains recent frames best, a new task is created. This is the “Forget Me Not” process, run with a decaying switch rate α=1/t\alpha = 1/t.

The Fisher was computed at each task switch from 100 minibatches of the replay buffer, scaled by a multiplier of 400. EWC protection began only after a game had been played for 20 million frames Kirkpatrick et al. 2017.

Figure 3 from Kirkpatrick et al. 2017
Fig. 2.3Figure 3 in Kirkpatrick et al. 2017

Results on Atari task. A: Schedule of games. Black bars indicate the sequential training periods (segments) for each game. After each training segment, performance on all games is measured. The EWC constraint is only activated to protect an agent’s performance on each game once the agent has experienced 20 million frames in that game. B: Total scores for each method across all games. Red curve denotes the network which infers the task labels using the Forget Me Not algorithm; brown curve is the network provided with the task labels. The EWC and SGD curves start diverging when games start being played again that have been protected by EWC. C: Sensitivity of a single-game DQN, trained on Breakout, to noise added to its weights. The performance on Breakout is shown as a function of the magnitude (standard deviation) of the weight perturbation. The weight perturbation is drawn from a zero mean Gaussian with covariance that is either uniform (black; i.e. targets all weights equally), the inverse Fisher ((F+λI)−1(F + \lambda I)^{-1}; blue; i.e. mimicking weight changes allowed by EWC), or uniform within the nullspace of the Fisher (orange; i.e. targets weights that the Fisher estimates that the network output is entirely invariant to).

Original figure reproduced from Kirkpatrick et al. 2017 · arXiv non-exclusive distribution licence

Without EWC, “the agent never learns to play more than one game and the harm inflicted by forgetting the old games means that the total human-normalized score remains below one”. With EWC, the agent learns several games. Giving it the true task labels (brown curve) improved things “only modest[ly]” over inferring them Kirkpatrick et al. 2017.

2.5Chef’s notes: where EWC is weak

Panel C of Figure 2.3 is the authors’ honest look at their own approximation. They perturbed a trained Breakout agent’s weights in three ways:

  • uniformly, which hurt;
  • along directions EWC would allow, the inverse Fisher (F+λI)−1(F+\lambda I)^{-1}, which hurt less, so the Fisher does identify important weights;
  • in the Fisher’s null space, directions EWC thinks the network ignores completely.

The third kind “has the same effect as perturbing in the inverse Fisher space”:

“This suggests that we are over-confident about certain parameters being unimportant: it is therefore likely that the chief limitation of the current implementation is that it under-estimates parameter uncertainty.”

Kirkpatrick et al. 2017
Limits stated in the paperThe posterior is approximated “by a factorized Gaussian” with variance from a point estimate, which “does constitute a significant weakness”. EWC on Atari “does not reach the score that would have been obtained by training ten separate DQNs”. The authors suggest Bayesian neural networks as a possible improvement. Chapter 4 adds a bigger limit found later: EWC fails completely when the model must tell apart classes from different tasks.

What to take from this chapter

  1. Forgetting is not a malfunction. The loss for task B never mentions task A, so gradient descent is free to overwrite A.
  2. Bayes’ rule says the posterior after A is everything you need to remember A. EWC keeps a cheap Gaussian sketch of it: an anchor and a per-weight stiffness FiF_i.
  3. Importance-weighted springs beat uniform springs. The weak point is that the diagonal, local approximation is too sure about which weights do not matter.
3

Part I · The problem

Three types of incremental learning

Before comparing recipes, agree on the dish. A method can look perfect or useless depending on one question: does the model know which task it is doing?

Cooked from van de Ven et al. 2022 Lichkovski & Mahdid 2026

By 2019 there were dozens of continual learning methods, and many claimed to be state of the art on the same datasets. Gido van de Ven, Tinne Tuytelaars and Andreas Tolias noticed why: “Because of an abundance of subtle, but often important, differences between evaluation protocols, systematic comparison between continual learning algorithms is challenging, even when papers use the same datasets. It is therefore not surprising that numerous continual learning methods claim to be state-of-the-art” van de Ven et al. 2022. Their fix is a vocabulary that every later paper in this book uses. In the episode it is “three flavors of incremental learning”, at 17:30 Lichkovski & Mahdid 2026.

3.1The three scenarios, informally

“(a) in task-incremental learning, an algorithm must incrementally learn a set of clearly distinguishable tasks; (b) in domain-incremental learning, an algorithm must learn the same kind of problem but in different contexts; and (c) in class-incremental learning, an algorithm must incrementally learn to distinguish between a growing number of objects or classes.”

van de Ven, Tuytelaars & Tolias 2022

Real-world examples from the paper make them concrete:

  • Task-incremental: learning different sports or musical instruments, where “it is always clear which sport or instrument should be played”.
  • Domain-incremental: recognising objects under changing lighting, or driving in different weather.
  • Class-incremental: “an agent might first learn about cats and dogs, and later about cows and horses”, and must later tell a cat from a cow even though it never saw them together van de Ven et al. 2022.

3.2The formal definition

The paper switches from the word “task” to context, because “task” is used with too many meanings. Each sample has three parts: an input x∈Xx\in\mathcal{X}, a within-context label y∈Yy\in\mathcal{Y}, and a context label c∈Cc\in\mathcal{C}. The scenario is decided by the shape of the function the model must learn (Table 1 of the paper):

ScenarioIntuitive descriptionMapping to learn
Task-incrementalSequentially learn to solve a number of distinct tasksf:X×C→Yf: \mathcal{X}\times\mathcal{C}\to\mathcal{Y}
Domain-incrementalLearn to solve the same problem in different contextsf:X→Yf: \mathcal{X}\to\mathcal{Y}
Class-incrementalDiscriminate between incrementally observed classesf:X→C×Yf: \mathcal{X}\to\mathcal{C}\times\mathcal{Y}

Table 3.1 Overview of the three continual learning scenarios. Table 1 of van de Ven et al. 2022. X\mathcal{X} is the input space, Y\mathcal{Y} the within-context output space and C\mathcal{C} the context space. For class-incremental learning the mapping can also be written f:X→Gf:\mathcal{X}\to\mathcal{G}, with G\mathcal{G} the global label space obtained by combining C\mathcal{C} and Y\mathcal{Y}.

Read the three signatures carefully. In task-incremental learning the context cc is an input: the model is told which task it is on. In domain-incremental learning cc appears nowhere: the model is not told, and does not need to know. In class-incremental learning cc is part of the output: the model must work it out. That gives a simple decision tree.

Figure 1 from van de Ven et al. 2022
Fig. 3.1Figure 1 in van de Ven et al. 2022

Decision tree for the three continual learning scenarios. The scenarios can be defined based on whether at test time context identity is known and if it is not, whether it must be inferred.

Original figure reproduced from van de Ven et al. 2022 · CC BY 4.0 (open access)

The paper is careful about one subtlety. Each scenario specifies what is known at test time. With domain-incremental learning, “it is good practice to explicitly state whether context labels (or context boundaries) are provided during training” van de Ven et al. 2022.

3.3One dataset, three dishes

Split MNIST cuts the ten digits into five contexts of two digits each. The same data becomes three different problems depending on what is asked at test time.

Figure 2 from van de Ven et al. 2022
Fig. 3.2Figure 2 in van de Ven et al. 2022

Split MNIST according to the three scenarios. a, The Split MNIST protocol is obtained by splitting the original MNIST dataset into five contexts, with each context consisting of two digits. b, Overview of what is expected of the algorithm at test time when the Split MNIST protocol is performed according to each continual learning scenario. (a) With task-incremental learning, at the computational level, there is no difference between whether the algorithm must return the within-context label or the global label, because the within-context label can be combined with the context label (which is provided as input) to get the global label.

Original figure reproduced from van de Ven et al. 2022 · CC BY 4.0 (open access)

The paper points out that “same class” depends on the scenario. In domain-incremental Split MNIST, “the digits ‘0’ and ‘2’ belong to the same class (as they are both even digits), but with class-incremental learning they are considered different classes” van de Ven et al. 2022.

3.4Why each scenario is hard in its own way

  • Task-incremental can be solved with no forgetting at all: give each task its own network. So “the challenge with task-incremental learning, therefore, is not—or should not be—to simply prevent catastrophic forgetting, but rather to find effective ways to share learned representations across tasks” and to get positive transfer.
  • Domain-incremental cannot use task-specific parts unless the model first works out the task, so “Preventing forgetting ‘by design’ is therefore not possible” here.
  • Class-incremental has the hardest core problem: “learning to discriminate between classes that are not observed together, which has turned out to be very challenging for deep neural networks, especially when storing examples of previously seen classes is not allowed” van de Ven et al. 2022.

3.5Beyond neat task boundaries

Real data rarely arrives in clean blocks. The paper generalises the scenarios by separating two ideas:

  • the context set {Dc}c∈C\{\mathcal{D}_c\}_{c\in\mathcal{C}}: the underlying distributions data can come from;
  • the data stream e1,e2,…e_1, e_2, \dots: the experiences actually shown to the learner. At each step it “has free access to the data of the current experience, but not to the data from past or future experiences”.

Every observation ii of experience tt is drawn from a mixture of contexts (Eq. 1 of the paper):

et[i]  ∼  ∑c∈Cpc t,i Dc.e_t[i] \;\sim\; \sum_{c\in\mathcal{C}} p^{\,t,i}_c\, \mathcal{D}_c .

The context set says what can change over time. The probabilities pct,ip^{t,i}_c say how it changes: abrupt switches, gradual drift, or contexts that come back.

This covers gradual transitions and revisited contexts, the so-called “task-free” setting. For messy real problems, “a multidimensional context space C\mathcal{C} can be used, whereby each dimension could adhere to a different scenario”. Contexts can also be continuous, in which case the sum becomes an integral, as with Rotated MNIST at arbitrary angles van de Ven et al. 2022.

3.6The output layer decides the scenario in practice

In the experiments, the scenario is implemented by which output units are “active”. The probability the network with parameters θ\theta gives to class oo is a softmax over active units only (Eq. 2 of the paper):

pθ(o∣x)  =  {ezo(x,θ)∑jezj(x,θ)if output unit o is active,0otherwise.p_\theta(o\mid x) \;=\; \begin{cases} \dfrac{e^{z_o(x,\theta)}}{\sum_j e^{z_j(x,\theta)}} & \text{if output unit } o \text{ is active},\\[6pt] 0 & \text{otherwise.}\end{cases}
  • Task-incremental: “multi-headed”. Only the current context’s units are active.
  • Domain-incremental: one shared head, with 2 units for Split MNIST.
  • Class-incremental: one head with a unit per class, 10 for Split MNIST, all always active.

The training loss is the usual cross-entropy, LC(x,o;θ)=−log⁡pθ(o∣x)\mathcal{L}_C(x,o;\theta) = -\log p_\theta(o\mid x) (Eq. 3).

Why this matters for the rest of the bookWhen you meet a result later, first ask which scenario it is in. EWC in Chapter 2 was tested on permuted MNIST, which is domain-incremental. ACL in Chapter 5 reports domain- and class-incremental Split-MNIST separately. CL-Bench in Chapter 11 even reports its own stability/plasticity split. A number without its scenario is not comparable to anything.

What to take from this chapter

  1. The scenario is defined by what is known at test time: told the task (Task-IL), not told and not needed (Domain-IL), or not told and must infer it (Class-IL).
  2. Formally: X×C→Y\mathcal{X}\times\mathcal{C}\to\mathcal{Y}, X→Y\mathcal{X}\to\mathcal{Y}, X→C×Y\mathcal{X}\to\mathcal{C}\times\mathcal{Y}.
  3. Class-incremental learning is hard because it needs comparisons between classes that were never seen together.
4

Part II · Classic recipes

Five strategies, one bake-off

Context-specific parts, parameter regularization, functional regularization, replay and templates, all cooked with the same ingredients and judged under all three scenarios.

Cooked from van de Ven et al. 2022 Kirkpatrick et al. 2017 Lichkovski & Mahdid 2026

The episode moves through the classic method families one after another: replay at 32:40, regularization at 36:10, then meta-learning and hypernetworks Lichkovski & Mahdid 2026. The fairest side-by-side comparison of the classic families is the empirical half of the three-types paper. Every method uses the same network, the same data and the same training budget, and is judged in all three scenarios van de Ven et al. 2022.

Figure 3 from van de Ven et al. 2022
Fig. 4.1Figure 3 in van de Ven et al. 2022

Schematic illustrations of different continual learning strategies. a, Context-specific components. Certain parts of the network are only used for specific contexts. b, Parameter regularization. Parameters important for past contexts are encouraged not to change too much when learning new contexts. c, Functional regularization. The input–output mapping learned previously is encouraged not to change too much at a particular set of inputs (the ‘anchor points’) when training on new contexts. d, Replay. The training data of a new context is complemented with data representative of past context. The replayed data is sampled from M, which can be a memory buffer or a generative model. e, Template-based classification. A ‘template’ is learned for each class (for example, a prototype, an energy value or a generative model), and classification is performed based on which template is most suitable for the sample to be classified.

Original figure reproduced from van de Ven et al. 2022 · CC BY 4.0 (open access)

4.1The shared kitchen

  • Split MNIST: five contexts of two digits, assigned randomly per seed. The network has two fully connected hidden layers of 400 ReLU units. Each context is trained for 2,000 iterations with batch size 128 and Adam at learning rate 0.001. Results are averaged over 20 seeds.
  • Split CIFAR-100: ten contexts of ten classes. Five convolutional layers (16, 32, 64, 128 and 256 channels), pre-trained on CIFAR-10 and then frozen, followed by two fully connected layers of 2,000 units. Each context gets 5,000 iterations with batch size 256 and learning rate 0.0001. Results are averaged over 10 seeds.
  • Baselines: “None” trains on each context in turn with no protection (the lower target). “Joint” trains on everything at once with the same number of iterations (the upper target).

Methods that store data were given 100 examples per class. Methods with a generative model could use up to three times as many parameters van de Ven et al. 2022.

4.2Strategy 1: context-specific components

Use different parts of the network for different contexts. Separate Networks splits the parameter budget into one small network per context, for example two layers of 100 units each on Split MNIST. XdG (context-dependent gating) switches off a random subset of hidden units per context. Both need the context label at test time, “which meant that they could only be used in the task-incremental learning scenario” van de Ven et al. 2022.

4.3Strategy 2: parameter regularization

This is the EWC family from Chapter 2, with a penalty on moving important parameters. The paper writes EWC for context K>1K>1 with one quadratic term per earlier context (Eq. 4):

Lparam-reg(K)(θ)  =  λ∑k=1K−112∑i=1NparamsFii(k) (θi−θ^i(k))2,\mathcal{L}^{(K)}_{\text{param-reg}}(\theta) \;=\; \lambda \sum_{k=1}^{K-1} \frac12 \sum_{i=1}^{N_\text{params}} F^{(k)}_{ii}\,\big(\theta_i - \hat\theta^{(k)}_i\big)^2 ,

with the Fisher diagonal estimated using the model’s own predicted probabilities as soft labels (Eq. 5):

Fii(k)  =  1∣S(k)∣∑x∈S(k)∑oy~o k(x)(∂log⁡pθ(o∣x)∂θi∣θ=θ^(k))2,y~o k(x)=pθ^(k)(o∣x).F^{(k)}_{ii} \;=\; \frac{1}{|S^{(k)}|}\sum_{x\in S^{(k)}} \sum_{o} \tilde y^{\,k}_o(x)\left(\frac{\partial \log p_\theta(o\mid x)}{\partial \theta_i}\Big|_{\theta=\hat\theta^{(k)}}\right)^{2}, \qquad \tilde y^{\,k}_o(x) = p_{\hat\theta^{(k)}}(o\mid x).

Synaptic Intelligence (SI) estimates importance online, from how much each parameter’s movement reduced the loss during training. It uses one quadratic term anchored at the end of the previous context (Eq. 6):

Lparam-reg(K)(θ)  =  γ∑i=1NparamsΩi(K−1) (θi−θ^i∗)2.\mathcal{L}^{(K)}_{\text{param-reg}}(\theta) \;=\; \gamma \sum_{i=1}^{N_\text{params}} \Omega^{(K-1)}_i\,\big(\theta_i - \hat\theta^{*}_i\big)^2 .

The per-parameter contribution during context kk sums, over all iterations tt, the parameter’s step times the negative gradient (Eq. 7):

ωi(k)  =  ∑t=1Niters(θi[t(k)]−θi[(t−1)(k)])⋅(−∂Ltotal[t(k)]∂θi).\omega^{(k)}_i \;=\; \sum_{t=1}^{N_\text{iters}} \Big(\theta_i[t^{(k)}] - \theta_i[(t-1)^{(k)}]\Big)\cdot\left(-\frac{\partial \mathcal{L}_\text{total}[t^{(k)}]}{\partial \theta_i}\right).

This is normalised by how far the parameter moved, Δi(k)=θi[Niters(k)]−θi[0(k)]\Delta^{(k)}_i = \theta_i[N_\text{iters}^{(k)}] - \theta_i[0^{(k)}], plus a damping term ξ=0.1\xi = 0.1, and summed over contexts (Eq. 8):

Ωi(K−1)  =  ∑k=1K−1ωi(k)(Δi(k))2+ξ.\Omega^{(K-1)}_i \;=\; \sum_{k=1}^{K-1} \frac{\omega^{(k)}_i}{\big(\Delta^{(k)}_i\big)^2 + \xi}.

4.4Strategy 3: functional regularization

Instead of protecting weights, protect the function: keep the old input–output mapping at a set of anchor points. Learning without Forgetting (LwF) uses the current context’s inputs as anchors, with knowledge distillation from the previous model θ^∗\hat\theta^* (Eq. 9):

Lfunc-reg(K)(x,θ)  =  −∑k=1K−1∑o∈Okpθ^∗T(o∣x) log⁡pθT(o∣x),\mathcal{L}^{(K)}_{\text{func-reg}}(x,\theta) \;=\; -\sum_{k=1}^{K-1}\sum_{o\in O_k} p^{T}_{\hat\theta^*}(o\mid x)\,\log p^{T}_{\theta}(o\mid x),

with temperature-raised probabilities, T=2T = 2 (Eq. 10):

pθT(o∣x)  =  exp⁡ ⁣(zo(x,θ)/T)∑jexp⁡ ⁣(zj(x,θ)/T).p^{T}_{\theta}(o\mid x) \;=\; \frac{\exp\!\big(z_o(x,\theta)/T\big)}{\sum_j \exp\!\big(z_j(x,\theta)/T\big)}.

FROMP does functional regularization in a Bayesian framework. Its anchor points are stored “memorable” examples from past contexts, chosen by the relevance score r(x)=∑opθ(o∣x)(1−pθ(o∣x))r(x) = \sum_{o} p_\theta(o\mid x)\big(1-p_\theta(o\mid x)\big) van de Ven et al. 2022.

4.5Strategy 4: replay

Complement each new context’s data with data that represents the past. Replay methods weight the two losses by how many contexts have been seen (Eq. 16):

Ltotal  =  1Ncontexts so far Lcurrent  +  (1−1Ncontexts so far) Lreplay.\mathcal{L}_\text{total} \;=\; \frac{1}{N_\text{contexts so far}}\,\mathcal{L}_\text{current} \;+\; \Big(1 - \frac{1}{N_\text{contexts so far}}\Big)\,\mathcal{L}_\text{replay}.
  • ER (experience replay): sample stored examples from a buffer and add their ordinary classification loss.
  • A-GEM: the same buffer, but replay acts as a constraint. If the current gradient would increase the replay loss, project it (Eq. 19):
    g∗={gcurrentif gcurrent⊤greplay≥0,gcurrent−gcurrent⊤greplaygreplay⊤greplay+γ greplayotherwise,γ=10−7.g^* = \begin{cases} g_\text{current} & \text{if } g_\text{current}^{\top} g_\text{replay} \ge 0,\\[4pt] g_\text{current} - \dfrac{g_\text{current}^{\top} g_\text{replay}}{g_\text{replay}^{\top} g_\text{replay} + \gamma}\, g_\text{replay} & \text{otherwise,}\end{cases}\qquad \gamma = 10^{-7}.
  • DGR (deep generative replay): no stored data. A variational autoencoder learns to generate past inputs, and a copy of the old classifier labels them. The VAE loss is a latent term plus a reconstruction term (Eqs. 20–22). The latent term is the KL divergence from the encoder’s Gaussian to the standard normal prior (written here in its standard form), and the reconstruction term is a squared error over pixels:
    Llatent=−12∑j=1Nlatent(1+log⁡σj(x)2−μj(x)2−σj(x)2),Lrecon=∑p=1Npixels(xp−x~p)2.\mathcal{L}_\text{latent} = -\tfrac12\sum_{j=1}^{N_\text{latent}}\Big(1+\log\sigma_j(x)^2-\mu_j(x)^2-\sigma_j(x)^2\Big),\qquad \mathcal{L}_\text{recon} = \sum_{p=1}^{N_\text{pixels}}\big(x_p - \tilde x_p\big)^2.
  • BI-R (brain-inspired replay): replays generated internal representations rather than raw pixels, with conditional replay and gating.

4.6Strategy 5: template-based classification

Learn a template per class, then classify by which template fits best. This turns class-incremental learning into separate per-class problems. The Generative Classifier trains one small VAE per class and classifies by likelihood (Eq. 24):

o∗  =  arg⁡max⁡o  p(x∣o),o^* \;=\; \arg\max_o \; p(x\mid o),

estimated with 10,000 importance samples. iCaRL keeps exemplars chosen by “herding” and classifies by the nearest class mean in feature space (Eq. 30):

o∗  =  arg⁡min⁡o  ∥ψϕ(x)−μo∥.o^* \;=\; \arg\min_{o} \;\big\|\psi_\phi(x) - \mu_o\big\| .

4.7The results

Strategy · MethodBudgetGMTask-ILDomain-ILClass-IL
Baselines
None (lower target)84.32 (±0.99)60.13 (±1.66)19.89 (±0.02)
Joint (upper target)99.67 (±0.03)98.59 (±0.05)98.17 (±0.04)
Context-specific components
Separate Networks––99.57 (±0.03)––
XdG––99.10 (±0.10)––
Parameter regularization
EWC––99.06 (±0.15)63.03 (±1.58)20.64 (±0.52)
SI––99.20 (±0.11)66.94 (±1.13)21.20 (±0.57)
Functional regularization
LwF––99.60 (±0.03)71.18 (±1.42)21.89 (±0.32)
FROMP100–99.12 (±0.13)84.86 (±1.02)77.38 (±0.64)
Replay
DGR–Yes99.50 (±0.03)95.57 (±0.30)90.35 (±0.24)
BI-R–Yes99.61 (±0.03)97.26 (±0.15)94.41 (±0.15)
ER100–98.98 (±0.07)93.75 (±0.24)88.79 (±0.20)
A-GEM100–98.54 (±0.10)87.67 (±1.33)65.10 (±3.64)
Template-based classification
Generative Classifier–Yes––93.82 (±0.06)
iCaRL100–––92.49 (±0.12)

Table 4.1 Results on Split MNIST. Table 2 of van de Ven et al. 2022. Final test accuracy (%) averaged over all contexts. Mean (± s.e.m.) over 20 seeds. “Budget”: stored examples per class. “GM”: a generative model was learned. Highlighting added for this book: blue is the best method in each column other than Joint, red marks near-chance class-incremental results.

Strategy · MethodBudgetGMTask-ILDomain-ILClass-IL
Baselines
None (lower target)61.43 (±0.36)18.42 (±0.33)7.71 (±0.18)
Joint (upper target)78.78 (±0.25)46.85 (±0.51)49.78 (±0.21)
Context-specific components
Separate Networks––76.83 (±0.25)––
XdG––69.86 (±0.34)––
Parameter regularization
EWC––76.34 (±0.29)21.65 (±0.55)8.24 (±0.25)
SI––74.84 (±0.39)22.58 (±0.42)8.10 (±0.24)
Functional regularization
LwF––78.59 (±0.24)29.45 (±0.39)25.57 (±0.27)
Replay
DGR–Yes71.40 (±0.32)20.52 (±0.43)9.67 (±0.22)
BI-R–Yes79.14 (±0.21)30.26 (±0.44)25.81 (±0.41)
ER100–76.43 (±0.24)39.00 (±0.34)37.57 (±0.21)
A-GEM100–73.30 (±0.39)20.51 (±0.59)20.38 (±1.45)
Template-based classification
Generative Classifier–Yes––46.83 (±0.18)
iCaRL100–––37.83 (±0.21)

Table 4.2 Results on Split CIFAR-100. Table 3 of van de Ven et al. 2022. Mean (± s.e.m.) over 10 seeds. FROMP could not be run here because of its computational cost. Convolutional layers were pre-trained on CIFAR-10.

4.8Reading the tables

Everything works in Task-IL. Not everything survives Class-IL. “With task-incremental learning, almost all tested methods performed well compared to the ‘none’ and ‘joint’ baselines, with domain-incremental learning the relative performances of many methods dropped considerably and with class-incremental learning they decreased even further” van de Ven et al. 2022.

EWC and SI fail completely at Class-IL. On Split MNIST they score 20.64% and 21.20%, essentially the 19.89% of no protection at all. The authors give the reason:

“with class-incremental learning, learning a new context (for example, distinguishing ‘2’ and ‘3’) while preserving what was learned before (for example, distinguishing ‘0’ and ‘1’) is not enough; it is also needed to combine information from different contexts (for example, for distinguishing ‘1’ and ‘2’).”

van de Ven et al. 2022, Discussion

They conclude that for classes never seen together, “it might be unavoidable to use either replay, which allows for comparing between classes from different contexts during training, or template-based classification, which allows for comparing between classes from different contexts during inference” van de Ven et al. 2022.

Plain replay is a strong baseline. “Perhaps surprisingly, on all experiments ER comfortably outperformed A-GEM”, even though A-GEM costs more. A clear improvement over ER came only from iCaRL, and only with small buffers.

Extended Data Fig. 1 from van de Ven et al. 2022
Fig. 4.2Extended Data Fig. 1 in van de Ven et al. 2022

Comparison of methods using stored data with different buffer sizes. Shown is the average test accuracy (as %, over all contexts) of different methods that use stored data on Split MNIST (a) and on Split CIFAR-100 (b) as a function of the number of examples per class that is allowed to be stored in memory. Due to its high computational costs, FROMP could not be run on Split CIFAR-100, or on Split MNIST with a memory budget above 1,000 samples per class. Displayed are the means over 5 repetitions, shaded areas are ± 1 SEM. ER: exact replay, A-GEM: averaged gradient episodic memory, FROMP: functional regularization of the memorable past, iCaRL: incremental classifier and representation learning, None: sequential training in the standard way, Joint: training on all data at the same time.

Original figure reproduced from van de Ven et al. 2022 · CC BY 4.0 (open access)

Generating replay is harder for complex inputs. DGR does well on Split MNIST (90.35% Class-IL) but drops to 9.67% on CIFAR-100. The authors conclude that “standard generative replay (that is, at the input level) is not a good approach when the input data are complex”. Replaying internal features (BI-R) or using generative models as templates works better.

Task-IL’s bar is set too low. Most methods beat the “None” baseline, but most do worse than simply training a smaller separate network per context: Separate Networks scores 99.57% on MNIST and 76.83% on CIFAR. To beat that “positive forward or backward transfer between contexts is necessary, but achieving such positive transfer is not trivial” van de Ven et al. 2022.

Experience replay (ER)

Recipe 4.1 · the strongest simple baseline

You will need

  • A memory buffer: BB examples per class (100 in the comparison)
  • The right to store past data, which privacy or licensing may forbid
  • One extra forward and backward pass per step for the replayed batch

Method

  1. Train on context 1 with the ordinary loss.
  2. At the end of each context, add BB random examples of each new class to the buffer.
  3. In every later iteration, draw a replay batch from the buffer the same size as the current batch.
  4. Minimise 1NLcurrent+(1−1N)Lreplay\tfrac{1}{N}\mathcal{L}_\text{current} + \big(1-\tfrac{1}{N}\big)\mathcal{L}_\text{replay}, where NN is the number of contexts so far.
When to use itIt is among the top performers in all three scenarios on Split MNIST, and it does not need context labels at test time. The cost is storage, and the memory grows with the number of classes.

What to take from this chapter

  1. Parameter regularization (EWC, SI) protects old tasks when the task is known, and fails almost completely when the model must choose among all classes.
  2. Replay, from a buffer or a generator, is the only strategy among the top performers in all three scenarios. The simple version is hard to beat.
  3. Class-incremental learning needs a way to compare classes from different contexts, either during training (replay) or during inference (templates).
5

Part II · Classic recipes

Incentive and practice

If you want a network to remember, put remembering in its objective and let it practise across thousands of episodes. Three papers show what happens when you do.

Cooked from Irie & Lake 2025 Lake & Baroni 2023 Irie, Csordás & Schmidhuber 2025 Lichkovski & Mahdid 2026

Chapter 4 ended with hand-designed fixes: penalties, buffers and templates. This chapter asks a different question. What if the network learned its own continual learning algorithm? The episode reaches this family at 38:00, “meta-learning methods” Lichkovski & Mahdid 2026. Kazuki Irie and Brenden Lake give the clearest account of why it works.

5.1The Problem of Incentive and Practice

For decades, critics have listed four things neural networks supposedly cannot do: generalize systematically, avoid catastrophic forgetting, learn from a few examples, and reason in several steps Irie & Lake 2025.

Figure 1 from Irie & Lake 2025
Fig. 5.1Figure 1 in Irie & Lake 2025

Illustrations of four examples of cognitive challenges for artificial neural networks (ANNs). For each problem, symbols Sdemo\mathbb{S}^\text{demo}, Xquery\mathbb{X}^\text{query}, and Ytarget\mathbb{Y}^\text{target} indicate the task demonstrations, query, and target output, respectively. a: Systematicity deals with compositional generalization; by learning how to “jump”, “skip”, and “jump twice”, we can infer how to “skip twice”. b: Catastrophic forgetting refers to ANNs’ failure to remember previously learned skills after learning to solve another task; in this example, Task 1 consists in classifying animal images, while Task 2 is classification of some characters/signs. c: Few-shot learning is showcased in how people can learn about a “Segway” from one example and then recognize other examples of the concept. d: Multi-step reasoning involves solving a problem by decomposing it into a series of logical steps.

Original figure reproduced from Irie & Lake 2025 · CC BY 4.0

Irie and Lake argue that all four failures share one overlooked cause: “the target behaviour expected from the system is not sufficiently well-represented in the objective function that the network seeks to optimize”. They call this the Problem of Incentive and Practice (PIP). Continual learning is their first example:

“The ultimate goal of continual learning is to perform well on all the tasks after having seen all of them. However, the usual training objective considers performance on only the current task. Under this objective, the system, or its learning algorithm, is never incentivized to perform well on anything but the current task. From the system’s viewpoint, forgetting is entirely compatible with its specified objective of performing well on each task at a time.”

Irie & Lake 2025

Hand-crafted fixes such as EWC “are indirect or ineffective translations of the desired objective”. A penalty that preserves old weights “may eventually lead to reduced forgetting, but it does not directly optimize for reduced forgetting” Irie & Lake 2025.

Figure 2 from Irie & Lake 2025
Fig. 5.2Figure 2 in Irie & Lake 2025

The Problem of Incentive and Practice (PIP) as related to (a) conventional systems and (b) modern systems capable of overcoming the classic challenges (e.g., metalearning systems). a: The Desired behaviour X is unknown/external to the system, except potentially through priors that only indirectly relate to the true problem and objective we ultimately care about. b: Metalearning (or the use of appropriate training examples) internalizes the Desired behaviour X into the system’s objectives.

Original figure reproduced from Irie & Lake 2025 · CC BY 4.0

The meta-learning recipe in general form

A meta-training episode has three parts: a demonstration sequence Sdemo=(xndemo,yndemo)n=1Ndemo\mathbb{S}^\text{demo} = \big(\mathbf{x}^\text{demo}_n, \mathbf{y}^\text{demo}_n\big)_{n=1}^{N^\text{demo}}, query inputs Xquery\mathbb{X}^\text{query}, and target behaviour Ytarget\mathbb{Y}^\text{target}. A sequence-processing network with parameters θ\theta reads the demonstrations and the query together, and is trained to

max⁡θ  Eepisodes[log⁡pθ(Ytarget ∣ Sdemo, Xquery)].\max_\theta\; \mathbb{E}_{\text{episodes}}\Big[\log p_\theta\big(\mathbb{Y}^\text{target}\,\big|\,\mathbb{S}^\text{demo},\, \mathbb{X}^\text{query}\big)\Big].

“To address PIP, this meta-objective provides an explicit incentive to the system to improve on the target behaviour, and meta-training across a set of many episodes provide it with opportunities to practice improving on its weaknesses” Irie & Lake 2025. The authors call such models Metalearning Sequence Learners. In large language models the same thing goes by another name: “in-context learning”.

Figure 3 from Irie & Lake 2025
Fig. 5.3Figure 3 in Irie & Lake 2025

Applying metalearning to address classic challenges for artificial neural networks. A: To address the PIP, a metalearning ANN learns, or “practices”, producing target behaviour Ytarget\mathbb{Y}^\text{target} corresponding to some challenging query Xquery\mathbb{X}^\text{query} after observing some demonstration sequence Sdemo\mathbb{S}^\text{demo}. The (meta-)objective provides the model with an “incentive” to improve its output in light of expected behaviour. B: Three meta-training episodes are illustrated for the few-shot learning case.

Original figure reproduced from Irie & Lake 2025 · CC BY 4.0

5.2Systematic generalization: MLC

Lake and Baroni took on a 35-year-old challenge. In 1988 Fodor and Pylyshyn argued that neural networks lack systematic compositionality, “the algebraic ability to understand and produce novel combinations from known components”. Lake and Baroni answered “by providing evidence that neural networks can achieve human-like systematicity when optimized for their compositional skills” Lake & Baroni 2023.

Figure 1 from Lake & Baroni 2023
Fig. 5.4Figure 1 in Lake & Baroni 2023

MLC for acquiring compositional skills through a dynamic stream of compositional tasks (episodes). a, During training, episode a presents a neural network with a set of study examples and a query instruction, all provided as a simultaneous input. The study examples demonstrate how to ‘jump twice’, ‘skip’ and so on with both instructions and corresponding outputs provided as words and text-based action symbols (solid arrows guiding the stick figures), respectively. The query instruction involves compositional use of a word (‘skip’) that is presented only in isolation in the study examples, and no intended output is provided. The network produces a query output that is compared (hollow arrows) with a behavioural target. b, Episode b introduces the next word (‘tiptoe’) and the network is asked to use it compositionally (‘tiptoe backwards around a cone’), and so on for many more training episodes. The colours highlight compositional reuse of words. Stick figures were adapted from art created by D. Chappard (OpenClipArt.org).

Original figure reproduced from Lake & Baroni 2023 · CC BY 4.0 (open access)

Meta-learning for compositionality (MLC) trains a standard encoder–decoder transformer on a stream of episodes. Each episode is a new mini-language generated from a random grammar. The crucial ingredient is that word meanings are reshuffled in every episode: if “jump” means one action in one episode, it means another in the next. The network therefore cannot memorise meanings in its weights. It has to learn how to learn them from the study examples Irie & Lake 2025.

Figure 4 from Lake & Baroni 2023
Fig. 5.5Figure 4 in Lake & Baroni 2023

MLC architecture. A standard transformer encoder (bottom) processes the query input along with a set of study examples (input/output pairs; examples are delimited by a vertical line (∣) token). The standard decoder (top) receives the encoder’s messages and produces an output sequence in response. After optimization on episodes generated from various grammars, the transformer performs novel tasks using frozen weights. Each box is an embedding (vector); input embeddings are light blue (latent are dark).

Original figure reproduced from Lake & Baroni 2023 · CC BY 4.0 (open access)

Head-to-head with people

Twenty-five people saw 14 study instructions in a made-up language (words like dax, wif, lug, zup, and functions like fep, blicket, kiki). They then had to produce coloured-circle outputs for 10 new instructions.

Figure 2 from Lake & Baroni 2023
Fig. 5.6Figure 2 in Lake & Baroni 2023

Few-shot instruction-learning task that involves responding to instructions (linguistic strings) by generating sequences of abstract outputs (coloured circles). a,b, Based on the study instructions (a; headings were not provided to the participants), humans and MLC executed query instructions (b; 4 of 10 shown). The four most frequent responses are shown, marked in parentheses with response rates (counts for people and the percentage of samples for MLC). The superscript notes indicate the algebraic answer (asterisks), a one-to-one error (1-to-1) or an iconic concatenation error (IC). The words and colours were randomized for each participant and a canonical assignment is therefore shown here. A black circle indicates a colour that was unused in the study set.

Original figure reproduced from Lake & Baroni 2023 · CC BY 4.0 (open access)

MeasurePeopleMLC
Responses matching the algebraic answer80.7%82.4%
Correct on outputs longer than any seen in study72.5%77.8%
Errors that are one-to-one translations24.4%56.3%
Errors with iconic concatenation (function 3)23.3%13.8%

Table 5.1 Few-shot instruction learning, numbers transcribed from the text of Lake & Baroni 2023 (most systematic MLC run, sampling from the model). Chance is 2.8% for two-length outputs. MLC also predicted which items people found harder (Pearson r=0.788,  P=0.031r = 0.788,\; P = 0.031).

ModelFew-shot learningOpen-ended
Baseline (uniform)−1,926.5−1,547.0
Symbolic (oracle)−538.8–
Symbolic (oracle/biases)−357.2−1,008.5
Basic seq2seq−1,264.7–
MLC (copy only)−1,586.4−1,341.4
MLC (algebraic only)−496.9−1,218.3
MLC (joint)−349.2−635.7
MLC−358.1−693.1

Table 5.2 Log-likelihood of human behaviour as predicted by each model (higher is better). Table 1 of Lake & Baroni 2023. All models have fitted lapse rates.

ModelSCAN SimpleCOGS SimpleSCAN Add jumpSCAN Around rightSCAN Opp. rightCOGS Lexical
Basic seq2seq0.00%0.12%99.27%51.13%100.00%6.08%
MLC0.02%0.34%0.22%0.04%0.06%0.87%

Table 5.3 Exact-match error rates (lower is better) on systematic lexical generalization benchmarks, averaged over five runs. Table 2 of Lake & Baroni 2023. “Simple” splits are within-distribution.

Where MLC stopsSurface-level permutations were not enough for the structural splits: “MLC fails to handle longer output sequences (SCAN length split) as well as novel and more complex sentence structures (three types in COGS), with error rates at 100%” Lake & Baroni 2023.

5.3Continual learning: ACL

Irie, Csordás and Schmidhuber apply the same principle directly to forgetting. They open with a line from neuroscience writer David Eagleman: “Enemies of memories are other memories.” Their argument is that capacity is not usually the problem: the same networks that forget when trained in sequence “can perform well on both tasks when trained jointly”. Instead, “the real root cause of CF lies in the learning algorithm as a memory mechanism”, and conventional algorithms are not “aware” of the problem. So they let gradient descent search for a continual learning algorithm Irie, Csordás & Schmidhuber 2025.

Figure 1 from Irie, Csordás & Schmidhuber 2025

An illustration of sequence processing in Automated Continual Learning (ACL) using a self-referential weight matrix. The model processes a sequence of task demonstrations (i.e., x/y or input/output pairs corresponding to the task, e.g., training images and their labels for image classification tasks) and updates its own weight matrix (whose initial state is denoted by W0W_0) as a function of the demo sequence. We denote by WAW_{\mathcal{A}} the weight matrix obtained after observing the sequence of Task A demonstrations (blue), and by WA,BW_{\mathcal{A},\mathcal{B}} the matrix obtained after observing examples of Task A then Task B sequentially (green). This scheme is the same during meta-training and meta-testing. The weight matrices obtained at the task boundaries are used for evaluation: WAW_{\mathcal{A}} and a query of Task A are used to predict the target corresponding to the query; and WA,BW_{\mathcal{A},\mathcal{B}} is used to make a prediction on a query for Task A (backward transfer) and for Task B (forward transfer). During meta-training, the model parameters (W0W_0 in this example) are modified to optimize all such predictions using (a memory-efficient implementation of) backpropagation through time.

Original figure reproduced from Irie, Csordás & Schmidhuber 2025 · CC BY 4.0

The learner: a self-referential weight matrix

The network is a “Recursive Self-Transformer”: a linear-Transformer in which each layer is a self-referential weight matrix (SRWM) that rewrites itself as it reads the sequence. At each step tt, the matrix Wt−1\mathbf{W}_{t-1} reads input ut\mathbf{u}_t and produces an output, a key, a query and a learning rate (Eqs. 1–3 of the paper):

[ot,kt,qt,βt]  =  Wt−1 ut[\mathbf{o}_t, \mathbf{k}_t, \mathbf{q}_t, \beta_t] \;=\; \mathbf{W}_{t-1}\,\mathbf{u}_t
vt=Wt−1 ϕ(qt),vˉt=Wt−1 ϕ(kt)\mathbf{v}_t = \mathbf{W}_{t-1}\,\phi(\mathbf{q}_t), \qquad \bar{\mathbf{v}}_t = \mathbf{W}_{t-1}\,\phi(\mathbf{k}_t)
Wt  =  Wt−1  +  σ(βt) (vt−vˉt)⊗ϕ(kt)\mathbf{W}_t \;=\; \mathbf{W}_{t-1} \;+\; \sigma(\beta_t)\,\big(\mathbf{v}_t - \bar{\mathbf{v}}_t\big)\otimes\phi(\mathbf{k}_t)

σ\sigma is the sigmoid and ϕ\phi the softmax. The last line is a rank-one delta-rule update, in which the self-generated vt\mathbf{v}_t, ϕ(kt)\phi(\mathbf{k}_t) and σ(βt)\sigma(\beta_t) play the roles of target, input and learning rate. Only the initial matrix W0\mathbf{W}_0 is trained by gradient descent. Everything after that is the network modifying itself.

The state has a fixed size, so the model “does not automatically store data from previous tasks, it must metalearn what to store through incentives and practice” Irie & Lake 2025.

The objective: put remembering in the loss

Take two tasks A and B. Feed LL examples of A, then LL of B. Let WA\mathbf{W}_{\mathcal{A}} be the state after A, and WA,B\mathbf{W}_{\mathcal{A},\mathcal{B}} the state after both. The ACL loss (Eq. 4) is:

min⁡θ  −(log⁡p(ytargetA∣xqueryA; WA(θ))  +  log⁡p(ytargetB∣xqueryB; WA,B(θ))  +  log⁡p(ytargetA∣xqueryA; WA,B(θ))⏟backward transfer: still remember A after B)\min_\theta \; -\Big(\log p\big(y^{\mathcal{A}}_\text{target}\mid \mathbf{x}^{\mathcal{A}}_\text{query};\, \mathbf{W}_{\mathcal{A}}(\theta)\big) \;+\; \log p\big(y^{\mathcal{B}}_\text{target}\mid \mathbf{x}^{\mathcal{B}}_\text{query};\, \mathbf{W}_{\mathcal{A},\mathcal{B}}(\theta)\big) \;+\; \underbrace{\log p\big(y^{\mathcal{A}}_\text{target}\mid \mathbf{x}^{\mathcal{A}}_\text{query};\, \mathbf{W}_{\mathcal{A},\mathcal{B}}(\theta)\big)}_{\text{backward transfer: still remember A after B}}\Big)

Each term has a job. The first rewards learning A as soon as A’s demonstrations arrive. The second rewards learning B, using what was learned from A (forward transfer). The third, the one ordinary meta-learning leaves out, rewards still answering A correctly after B: it “optimizes for backward transfer: (1) remembering the first task A after learning B (combatting catastrophic forgetting), and (2) leveraging learning of B to improve performance on the past task A” Irie, Csordás & Schmidhuber 2025.

Automated Continual Learning

Recipe 5.1 · Irie, Csordás & Schmidhuber

You will need

  • Few-shot datasets to build meta-training episodes (Omniglot, Mini-ImageNet, FC100)
  • A vision backbone (Conv-4, with instance normalization instead of batch normalization) feeding SRWM layers
  • Memory-efficient backpropagation through time

Method

  1. Build an episode: pick a 5-way task A and a task B. Relabel classes randomly for this episode, and take 15 examples per class.
  2. Feed A’s (image, label) pairs, then B’s, through the self-modifying network one pair at a time.
  3. At each task boundary, ask query questions about every task seen so far.
  4. Backpropagate the sum of all query losses into W0\mathbf{W}_0.
  5. At meta-test time, freeze W0\mathbf{W}_0 and let the network learn new task sequences in context.
Chef’s noteNo replay buffer and no regularizer. The learned algorithm lives entirely in W0\mathbf{W}_0.

In-context learners forget too

The first result is that ordinary in-context learners suffer the same disease as gradient descent. Without the backward-transfer term, accuracy on the first task falls to chance (about 20% for 5-way classification) after the second task is learned in context. The authors call this “in-context catastrophic forgetting” Irie, Csordás & Schmidhuber 2025.

Meta-training (A / B)ACLA only: AA→B: BA→B: AB only: BB→A: AB→A: B
Omniglot / Mini-ImageNetNo97.6 ± 0.252.8 ± 0.722.9 ± 0.752.1 ± 0.897.8 ± 0.320.4 ± 0.6
Yes98.3 ± 0.254.4 ± 0.898.2 ± 0.254.8 ± 0.998.0 ± 0.354.6 ± 1.0
FC100 / Mini-ImageNetNo49.7 ± 0.755.0 ± 1.021.3 ± 0.755.1 ± 0.649.9 ± 0.821.7 ± 0.8
Yes53.8 ± 1.752.5 ± 1.246.2 ± 1.359.9 ± 0.745.5 ± 0.953.0 ± 0.6

Table 5.4 5-way accuracy (%) with 15 demonstrations per class. Table 1 of Irie et al. Column labels give the task order in context and then the task being queried. The highlighted columns query the first task after the second has been learned.

Figure 2 from Irie, Csordás & Schmidhuber 2025, panel 1Figure 2 from Irie, Csordás & Schmidhuber 2025, panel 2

Meta-training loss terms reported separately for each dataset (A is Omniglot, B is Mini-ImageNet) and each position in the CL sequence (1 or 2) in the two-task case, yielding 6 curves. Here the ACL backward transfer terms (“ACL bwd”) are not minimized, corresponding to the ACL/No case. (a) Two datasets are metalearned simultaneously. (b) One dataset is metalearned first (here Dataset A). In both cases, the backward transfer losses diverge (purple and brown curves) when the model “metalearns a dataset,” i.e., when the model becomes capable of learning tasks sampled from the corresponding dataset, causing in-context catastrophic forgetting.

Original figure reproduced from Irie, Csordás & Schmidhuber 2025 · CC BY 4.0

Figure 5.6 shows why. When the backward term is left out, “the more the model metalearns, the more it tends to forget in-context”. Gradient descent “tends to find solutions/CL algorithms that prefer to erase previously learned knowledge”, because those are easier to find Irie, Csordás & Schmidhuber 2025. Forgetting is the default even for learned learners, unless the objective forbids it.

Split-MNIST without replay

MethodDomain-IL, 5-taskClass-IL, 2-taskClass-IL, 5-task
Plain SGD63.2 ± 0.448.8 ± 0.119.5 ± 0.1
Adam55.2 ± 1.449.7 ± 0.119.7 ± 0.1
Adam + L266.0 ± 3.751.8 ± 1.922.5 ± 1.1
EWC58.9 ± 2.649.7 ± 0.119.8 ± 0.1
Online EWC57.3 ± 1.449.7 ± 0.119.8 ± 0.1
Synaptic Intelligence64.8 ± 3.149.4 ± 0.219.7 ± 0.1
Memory Aware Synapses68.6 ± 6.949.6 ± 0.119.5 ± 0.3
Learning without Forgetting71.0 ± 1.3–24.2 ± 0.3
OML, out-of-the-box69.9 ± 2.846.6 ± 7.224.9 ± 4.1
OML + optimized meta-test iterations73.6 ± 5.362.1 ± 7.934.2 ± 4.6
GeMCL63.8 ± 3.891.2 ± 2.879.0 ± 2.1
ACL (out-of-the-box, 2-task model)72.2 ± 0.971.5 ± 5.9N.A.
ACL + meta-finetuned, 5-task loss, Omniglot84.5 ± 1.696.0 ± 1.084.3 ± 1.2

Table 5.5 Split-MNIST accuracy (%), no method using replay memory. Table 3 of Irie et al. Mean ± std over 10 runs. Joint (non-continual) training reaches near 100%. Note how EWC and its relatives sit at chance in Class-IL, matching Chapter 4.

“We are not aware of any existing hand-crafted CL algorithms that can achieve ACL’s performance without any replay memory” Irie, Csordás & Schmidhuber 2025.

The authors’ own limitsAgainst prompt-based methods built on a large pre-trained vision transformer (L2P at 83.9% and DualPrompt at 86.5% on the full Split-CIFAR100), ACL on top of a frozen ViT reached 68.3% even on a simplified 2-way, 5-task “mini” version, and 61.5% on mini 5-datasets. That shows “the necessity for further scaling”. Other limits they list: domain and length generalization, very long meta-training sequences for many classes, image classification only, and weight updates that are “very hard to interpret” Irie, Csordás & Schmidhuber 2025. Irie and Lake add a general one: meta-learning “is inherently limited by ANNs’ out-of-distribution generalization abilities” Irie & Lake 2025.

5.4The bridge to language models

Irie and Lake point out that language models already contain much of this recipe: “sequence prediction with feedback trained on diverse data”. For continual learning in particular, “it is conceivable that similar topics or tasks re-occur within the same context window, incentivizing the model to remember previous materials, which gives rise to in-context continual learning-like objectives” Irie & Lake 2025. The rest of this book is about language models, so it is worth remembering the warning from ACL: in-context learners also forget, unless something rewards them for remembering.

What to take from this chapter

  1. Networks forget because nothing in the objective asks them to remember. Put remembering in the loss, and practise it over many episodes.
  2. MLC shows a plain transformer can match human systematic generalization when trained for it. Reshuffling word meanings each episode is what forces learning-to-learn.
  3. ACL’s backward-transfer term log⁡p(yA∣xA;WA,B)\log p(y^{\mathcal{A}}\mid \mathbf{x}^{\mathcal{A}}; \mathbf{W}_{\mathcal{A},\mathcal{B}}) is the whole trick. Without it, in-context learners forget too.
6

Part III · Recipes for language models

Weights that write weights

A hypernetwork is a network whose output is another network’s weights. Train one well, and adapting a language model to a task, or to a document, becomes a single forward pass.

Cooked from Charakorn et al. 2025 Charakorn et al. 2026 Lichkovski & Mahdid 2026

Fine-tuning a large model for a new task is slow, expensive and fussy about hyperparameters. The authors of Text-to-LoRA put it this way: fine-tuning techniques “require expensive and lengthy training while being notably sensitive to hyperparameter choices” Charakorn et al. 2025. The episode turns to hypernetworks at 43:50 and spends the next twenty minutes on hypernetwork experiments Lichkovski & Mahdid 2026. These two papers from Sakana AI are the clearest current recipes.

6.1Two ingredients: LoRA and hypernetworks

LoRA freezes the base weights and learns a small low-rank update. For a linear map h=W0xh = W_0 x, the adapted map is

h  =  W0x+ΔWx  =  W0x+B⊤A x,A,B∈Rr×d,  r≪d.h \;=\; W_0 x + \Delta W x \;=\; W_0 x + B^{\top} A\, x, \qquad A, B \in \mathbb{R}^{r\times d},\; r \ll d .

A hypernetwork “generates parameters for another ‘base’ network”. Given a layer descriptor ϕl\phi_l, a hypernetwork with parameters θ\theta produces Wl=hθ(ϕl)W_l = h_\theta(\phi_l) Charakorn et al. 2025. For continual learning the appeal is clear: the base model never changes, and every new skill or document becomes its own small adapter.

6.2Text-to-LoRA: adapters from a sentence

The paper asks two questions: “Can we end-to-end train a neural network to compress many pre-trained LoRAs?” and “Can we decode new task-specific LoRA adapters solely based on natural-language instructions for an unseen task at test time?” Charakorn et al. 2025.

Figure 1 from Charakorn et al. 2025, panel 1Figure 1 from Charakorn et al. 2025, panel 2Figure 1 from Charakorn et al. 2025, panel 3
Fig. 6.1Figure 1 in Charakorn et al. 2025

Left: Conceptual overview of T2L’s training routine. Given a set of task description embeddings, we train a hypernetwork to generate LoRA adaptation matrices (ΔW\Delta W) for various tasks. The weights of T2L are either optimized to distill pre-trained LoRA weights or via multi-task supervised fine-tuning on downstream tasks. Right, Top: Relative performance to the oracles on training SNI tasks with varying compression ratios. Right, Bottom: Zero-shot LoRA generation performance on 10 benchmark tasks. As we increase the number of pre-training datasets, the performance of T2L increases for 3 different T2L architectures.

Original figure reproduced from Charakorn et al. 2025 · CC BY-NC-SA 4.0

For every target module mm (for example the query projection) and layer ll, T2L generates the two low-rank matrices from a task description ziz^i:

ΔWm,li  =  hθ(ϕm,li),ϕm,li  =  concat[f(zi),  E[m],  E[l]],\Delta W^i_{m,l} \;=\; h_\theta\big(\phi^i_{m,l}\big), \qquad \phi^i_{m,l} \;=\; \mathrm{concat}\big[f(z^i),\; E[m],\; E[l]\big],

ff embeds the description, using the CLS token of a bidirectional encoder or the last token of an LLM. EE holds learned embeddings for module type and layer depth. All modules and layers are batched, so one forward pass produces the whole adapter.

There are two ways to train it. Reconstruction distils a library of existing LoRAs Ω\Omega:

L(Ω,θ)  =  EΔWi∼Ω ∣ΔWi−hθ(ϕi)∣.\mathcal{L}(\Omega, \theta) \;=\; \mathbb{E}_{\Delta W^i\sim\Omega}\,\big|\Delta W^i - h_\theta(\phi^i)\big| .

Supervised fine-tuning skips the library and trains end-to-end through the base model Ψ\Psi on many task datasets Di\mathcal{D}^i, sampling a description ziz^i each time:

θ  =  arg⁡min⁡θ  EDi∼D,  zi∼Zi  LSFT(Di, Ψ, hθ(ϕi)).\theta \;=\; \arg\min_\theta\; \mathbb{E}_{\mathcal{D}^i\sim\mathcal{D},\; z^i\sim Z^i}\; \mathcal{L}_\text{SFT}\big(\mathcal{D}^i,\, \Psi,\, h_\theta(\phi^i)\big).
Figure 2 from Charakorn et al. 2025
Fig. 6.2Figure 2 in Charakorn et al. 2025

Overview of T2L architectural variations. The dashed box at the bottom shows the output size of a single forward pass of T2L. Blue boxes are trainable modules. Cyan boxes are trainable embedding layers. Components in dashed boxes are only used with their corresponding architectures. rr is the rank of a LoRA adapter and dd is the size of the input and the output dimension.

Original figure reproduced from Charakorn et al. 2025 · CC BY-NC-SA 4.0

The three sizes differ only in the output head:

  • L outputs AA and BB together, with a head of size dout×2×r×dd_\text{out}\times 2\times r\times d.
  • M shares one head between AA and BB, with size dout×r×dd_\text{out}\times r\times d.
  • S outputs one rank at a time, with size demb×dd_\text{emb}\times d.

With rank-8 LoRAs on the query and value projections of Mistral-7B-Instruct (3.4M adapter parameters), the hypernetworks have 55M, 34M and 5M trainable parameters Charakorn et al. 2025.

Compressing adapters

ModelArcCArcEBQGSM8KHSOQAPIQAWGMBPPAvg
Base model65.477.871.640.949.754.272.845.043.155.8
One-hot task embedding
T2L (Recon) L76.489.989.453.892.685.069.751.252.673.4
T2L (Recon) M76.789.989.453.292.685.069.951.452.973.4
T2L (Recon) S75.288.887.450.989.175.683.958.148.173.0
Task-description embedding
T2L (Recon) L76.689.889.453.992.685.069.651.251.873.3
T2L (Recon) M76.589.989.453.992.584.970.451.652.873.5
T2L (Recon) S75.488.887.849.189.776.784.256.948.073.0
Task-specific LoRAs76.689.989.453.592.685.069.951.152.173.3

Table 6.1 T2L trained by reconstruction on 9 benchmark LoRAs. Table 1 of Charakorn et al. 2025. Accuracy (MBPP: pass@1). T2L recovers the oracle adapters and sometimes beats them. The authors hypothesise that lossy compression acts as regularization, most visibly on PIQA and WG, where the oracle LoRA overfits.

As more adapters are packed in, the compression becomes lossy. Still, “all T2L architectures can maintain around 65% of oracles’ performance, and the performance does not drop further even at >8×10−4>8\times10^{-4} per-element L1 error” Charakorn et al. 2025.

Zero-shot adapters for unseen tasks

Trained with SFT on 479 tasks from Super Natural Instructions, each with 128 generated descriptions, T2L builds adapters for benchmarks it has never seen, from a description alone.

MethodArcCArcEBQHSOQAPIQAWGMBPPAvg (8)GSM8KHEAvg (10)
No test-time adaptation
Mistral-7B-Instruct65.477.871.649.754.272.845.043.160.040.937.255.8
Prepending task desc.72.085.867.658.963.477.959.041.665.840.939.060.6
3-shot ICL72.185.971.759.066.276.258.042.666.540.937.261.0
Average LoRA70.784.475.459.959.078.054.347.166.142.437.860.9
Multi-task LoRA76.288.385.565.268.081.862.448.171.947.539.666.3
Zero-shot adaptation
Arrow Routing60.986.287.680.848.683.068.550.270.7N/A28.7N/A
Hyperdecoders (per-instance)76.688.583.965.276.681.364.951.673.643.640.967.3
T2L (SFT) S76.088.783.868.071.682.361.041.271.647.339.065.9
T2L (SFT) M77.289.084.365.176.181.864.050.573.545.241.367.5
T2L (SFT) L77.588.985.066.575.582.164.251.973.945.839.267.7
Oracle
Task-specific LoRAs76.689.989.492.685.069.951.152.175.853.5N/AN/A

Table 6.2 Zero-shot performance on unseen benchmark tasks. Table 2 of Charakorn et al. 2025. T2L scores are averages over three generated LoRAs, each from a different description. Arrow Routing numbers come from another paper with different adapters and prompts, so they are only indirectly comparable.

The description matters, and it can steer how the model reasons, not just whether it is right:

Figure 4 from Charakorn et al. 2025
Fig. 6.3Figure 4 in Charakorn et al. 2025

Qualitative examples of responses from applying LoRA generated by T2L to the Mistral-7B-Instruct base model on a GSM8K problem instance. (i) The response from the base model is incorrect. (ii) Applying a LoRA generated from a low-quality task description does not make the model output the correct response. (iii, iv) Descriptions that are aligned with the problem lead to generated LoRAs that steer the base model to output correct responses. Descriptions from (iii) and (iv) influence the model to generate different reasoning paths, highlighting the steerability of T2L.

Original figure reproduced from Charakorn et al. 2025 · CC BY-NC-SA 4.0

The generated adapters are genuinely task-specific. Similar tasks such as MBPP and HumanEval cluster together:

Figure 5 from Charakorn et al. 2025, panel 1Figure 5 from Charakorn et al. 2025, panel 2
Fig. 6.4Figure 5 in Charakorn et al. 2025

2D t-SNE projection of activations of T2L’s task encoder (left) and activations of the last MLP block (right) grouped by benchmark tasks (represented by colors). We probe T2L with unseen three task descriptions per benchmark. We can see activations clustering in both plots, indicating that T2L indeed learns to generate LoRAs tailored to specific tasks.

Original figure reproduced from Charakorn et al. 2025 · CC BY-NC-SA 4.0

Chef’s notes from the paperReconstruction training does not generalize to unseen tasks: averaged over architectures, the SFT-trained models score 66.3 and the reconstruction-trained ones 61.8. The authors trace this to pre-trained adapters for similar tasks not lying near each other in weight space. Descriptions that do not match the task produce much worse adapters: 51.4 for random training descriptions versus 73.3 for matched ones. Compute must scale with the number of training tasks, and the S variant stops improving at 479 tasks, “potentially due to its limited model capacity” Charakorn et al. 2025.

6.3Doc-to-LoRA: read once, remember afterwards

T2L adapts a model to a task. Doc-to-LoRA (D2L) adapts it to a document. The motivation is the cost of long contexts: in-context learning “is transient and memory-intensive; long prompts increase latency and memory via quadratic attention and KV-cache growth” Charakorn et al. 2026. The classic remedy is context distillation (CD): train a copy of the model, without the context, to behave as if it had it.

For a context cc, the paper writes the internalization objective over self-generated queries and teacher responses Dc={(xi,yi)}\mathcal{D}_c = \{(x_i, y_i)\} (Eq. 2):

min⁡θc  E(x,y)∼Dc[KL(pθ(y∣x,c) ∥ pθc(y∣x))].\min_{\theta_c}\; \mathbb{E}_{(x,y)\sim\mathcal{D}_c}\Big[\mathrm{KL}\big(p_\theta(y\mid x, c)\,\big\|\,p_{\theta_c}(y\mid x)\big)\Big].

Running this for every new document is far too slow. D2L meta-learns it instead. A hypernetwork HϕH_\phi maps a context directly to an adapter, θc=θ+Hϕ(c)\theta_c = \theta + H_\phi(c), and is trained across many contexts (Eqs. 3–4):

min⁡ϕ  E(c,Dc)∼D  E(x,y)∼Dc  KL(pθ(y∣x,c) ∥ pθ+Hϕ(c)(y∣x)).\min_\phi\; \mathbb{E}_{(c,\mathcal{D}_c)\sim\mathcal{D}}\;\mathbb{E}_{(x,y)\sim\mathcal{D}_c}\; \mathrm{KL}\big(p_\theta(y\mid x, c)\,\big\|\,p_{\theta + H_\phi(c)}(y\mid x)\big).

“A trained mapping HH amortizes both the query generation process and the backpropagation needed by traditional CD” Charakorn et al. 2026.

Figure 1 from Charakorn et al. 2026, panel 1Figure 1 from Charakorn et al. 2026, panel 2Figure 1 from Charakorn et al. 2026, panel 3
Fig. 6.5Figure 1 in Charakorn et al. 2026

An overview of Doc-to-LoRA training (left) and downstream performance (right). D2L learns to efficiently internalize information, outperforming traditional context distillation while significantly reducing latency and memory consumption across question-answering benchmarks under limited query budgets.

Original figure reproduced from Charakorn et al. 2026 · CC BY-SA 4.0

Inside the hypernetwork

The context is passed once through the frozen target LLM to get per-layer activations Z∈RL×N×DZ\in\mathbb{R}^{L\times N\times D}. For each layer ll, a shared Perceiver-style module cross-attends rr learned latent queries QmQ_m to that layer’s activations:

Ul  =  XAttn(Qm,  K(Zl−1),  V(Zl−1))∈Rr×du,U_l \;=\; \mathrm{XAttn}\big(Q_m,\; K(Z_{l-1}),\; V(Z_{l-1})\big)\in\mathbb{R}^{r\times d_u},

and two heads turn each latent into one row of AlA_l and one column of BlB_l. The adapted weight is Wl′=Wl+αlBlAlW'_l = W_l + \alpha_l B_l A_l, with a learned per-layer scale αl\alpha_l. Because the latents have fixed size, inputs of any length map to the same adapter shape.

Long documents are split into KK chunks, each turned into its own adapter, and the adapters are concatenated along the rank dimension:

Al=[Al(1)⋮Al(K)],Bl=[ Bl(1)  ⋯  Bl(K) ],A_l = \begin{bmatrix} A^{(1)}_l\\ \vdots\\ A^{(K)}_l\end{bmatrix},\qquad B_l = \big[\,B^{(1)}_l \;\cdots\; B^{(K)}_l\,\big],

This gives total rank r⋅Kr\cdot K without changing the hypernetwork’s output shape.

Doc-to-LoRA

Recipe 6.1 · Charakorn et al. 2026

You will need

  • A frozen target LLM (gemma-2-2b-it in the main experiments)
  • A corpus of contexts, plus generated questions and teacher answers for each
  • A Perceiver hypernetwork: 8 cross-attention blocks, 309M parameters, rank-8 output per chunk

Method

  1. Meta-train HϕH_\phi so the adapted model without context matches the model with context (the KL objective above).
  2. At use time, run the new document once through the LLM to get its activations.
  3. Split into chunks (8K tokens each in the QA experiments) and generate a rank-8 adapter per chunk for each MLP down-projection.
  4. Concatenate the chunks’ adapters and attach them to the frozen model.
  5. Answer questions about the document with the document no longer in context.
ModesBatched generation (all layers at once) is fastest. Iterative generation (one layer at a time) uses the least memory. The two are mathematically equivalent.

A needle in a haystack, stored in weights

In the synthetic test, a sentence like “The special magic number is 0042.” is hidden in a long distractor document. D2L was trained only on contexts of 32–256 tokens. At test time the base model gets only the question.

Figure 2 from Charakorn et al. 2026, panel 1Figure 2 from Charakorn et al. 2026, panel 2
Fig. 6.6Figure 2 in Charakorn et al. 2026

NIAH retrieval performance (top) and additional memory needed for inference (bottom).

Original figure reproduced from Charakorn et al. 2026 · CC BY-SA 4.0

Up to the base model’s 8K window, D2L matches reading the document in context. Beyond it, the base model collapses while D2L stays near perfect up to 40 chunks (40K tokens), “quintuple the number of chunks the model has been exposed to during its training phase”. Memory tells the same story: “The base model uses more than 12 GB of additional memory to generate a response to a 128K-token haystack. In contrast, the model with internalized knowledge consistently uses significantly lower memory (< 50 MB)” Charakorn et al. 2026.

Real questions

Figure 3 from Charakorn et al. 2026
Fig. 6.7Figure 3 in Charakorn et al. 2026

QA performance on SQuAD compared to the used context length ratio (left), update latency (middle), and additional memory needed for model updates (right). LLMLingua-2 compresses the input with [10%, 20%, 40%, 60%, 80%, 90%] compression rates from right to left (gray dots).

Original figure reproduced from Charakorn et al. 2026 · CC BY-SA 4.0

On SQuAD, D2L reaches 82.5% of the in-context upper bound, and it does so in under a second. Context distillation needs about 40 seconds with the oracle query, and more than 100 seconds once query generation is included Charakorn et al. 2026.

MethodNormalized performance ↑Additional update memory (GB) ↓Mean update latency (s) ↓
CD (oracle query)0.9017.82040.171 ± 0.351
D2L (batched)0.85711.5220.209 ± 0.123
D2L (iterative)0.8443.7910.551 ± 0.101
CD (25 generated queries)0.74559.925465.454 ± 67.868
CD (5 generated queries)0.70479.37172.537 ± 7.821

Table 6.3 In-parameter knowledge methods on 2WikiMultihopQA. Table 1 of Charakorn et al. 2026. Test documents go up to 32K tokens, while D2L’s longest training sample was 2,344 tokens.

The paper also shows D2L moving visual information. With a vision-language model as the context encoder, a text-only LLM classified Imagenette images at 75.03% purely from internalized adapters Charakorn et al. 2026.

Chef’s notesD2L stays below the oracle CD that optimizes directly on the test query (0.857 versus 0.901 on 2Wiki). T2L, trained on task data rather than documents, “cannot effectively internalize knowledge due to its highly focused training data” Charakorn et al. 2026. For continual learning the open questions move elsewhere: how to choose, combine or merge a growing pile of adapters over time.

What to take from this chapter

  1. A hypernetwork turns adaptation into inference: one forward pass from a description (T2L) or a document (D2L) to a LoRA.
  2. Training end-to-end through the base model (SFT, or distillation for D2L) generalizes. Imitating a library of separately trained adapters does not.
  3. The base weights never move, so nothing old is overwritten. Knowledge accumulates as adapters.
7

Part III · Recipes for language models

Context or weights?

Give a model the facts in its prompt, or train them into its weights. You might expect the same result. Two papers show how different, and how strange, the second route can be.

Cooked from Lampinen et al. 2025 Mayne et al. 2026 Xu et al. 2020 Lichkovski & Mahdid 2026

A language model can learn in two places. It can learn in context, from what is in its prompt right now, or in weights, through fine-tuning. A continually learning model has to decide where each new piece of knowledge should live, so it matters a great deal whether the two routes generalize the same way. The episode tackles this at 01:13:25, “LLM generalization from in-context to fine-tuning” Lichkovski & Mahdid 2026.

7.1A controlled comparison

Andrew Lampinen and colleagues at Google DeepMind start from a known failure of fine-tuning: models “can fail to generalize to simple reversals of relations they are trained on, or fail to make simple logical deductions based on trained information.” A model fine-tuned on “B’s mother is A” may fail to answer “Who is A’s son?” Lampinen et al. 2025. In context, the same model handles such reversals easily. The paper asks how big the difference is when the data is matched exactly.

The ingredients: knowledge the model cannot already know

To keep pretraining knowledge out of the test, the datasets are built to be novel:

  • Reversal curse dataset (from Berglund et al.): one-sentence descriptions of fictional celebrities, 3,600 training examples. The model is trained on “name → description” and tested on “description → name”.
  • Simple reversals: 100 comparisons between nonsense words, such as “femp are more dangerous than glon”, each repeated across 10 training examples with different preambles. The test is a forced choice between “glon are less dangerous than femp” and the tempting wrong answer “glon are more dangerous than femp”.
  • Simple syllogisms: 69 training examples like “All glon are yomp. All troff are glon.”, testing whether the model infers “All troff are yomp”.
  • Semantic structure: a hierarchy of 110 categories of animals and objects with their properties. Every noun, adjective and verb is replaced with a nonsense word of 4–5 letters, and it is written up as 2,200 Wikipedia-like documents.
Figure 1 from Lampinen et al. 2025
Fig. 7.1Figure 1 in Lampinen et al. 2025

A semantic structure with a hierarchy of properties and relations. (Reproduced with permission from Rogers and McClelland (2008).)

Original figure reproduced from Lampinen et al. 2025 · CC BY 4.0

Test splits on the semantic structure probe increasingly hard generalization. Rephrasings keep the direction of a trained fact. Reversals flip it (“gruds [dogs] are a type of abmes [mammals]” becomes “abmes include gruds”). Syllogisms chain two facts. Category holdouts give only one fact about a category (its parent) and test everything that follows from it.

The method

  • ICL: concatenate the whole training set into the prompt (subsampled 8× on the largest datasets), then ask.
  • Fine-tuning: Gemini 1.5 Flash, batch size 8 or 16, learning rate 3⋅10−43\cdot10^{-4}, 200–1,000 steps.
  • Answers are scored by multiple-choice likelihood, with hard distractors such as true statements about other entities.

What happened

Figure 2 from Lampinen et al. 2025
Fig. 7.2Figure 2 in Lampinen et al. 2025

Reversal curse paper results.

Original figure reproduced from Lampinen et al. 2025 · CC BY 4.0

On the reversal-curse data, fine-tuning on the forward direction gave near-zero accuracy on reversals, because “the finetuned model always prefers those (incorrect) celebrity name completions that were seen as targets during training”. With the whole dataset in context, the model was “nearly at ceiling on the reversals” Lampinen et al. 2025.

Figure 3 from Lampinen et al. 2025, panel 1Figure 3 from Lampinen et al. 2025, panel 2
Fig. 7.3Figure 3 in Lampinen et al. 2025

On our simple reversal (left) and syllogism (right) datasets, in-context learning outperforms finetuning. Moreover, augmenting the fine-tuning dataset produces strong improvements in model performance. Pretrained models perform near chance, showing that the datasets are not guessable based on superficial features.

Original figure reproduced from Lampinen et al. 2025 · CC BY 4.0

Figure 4 from Lampinen et al. 2025, panel 1Figure 4 from Lampinen et al. 2025, panel 2Figure 4 from Lampinen et al. 2025, panel 3Figure 4 from Lampinen et al. 2025, panel 4
Fig. 7.4Figure 4 in Lampinen et al. 2025

On the more richly structured semantic dataset, in-context learning still moderately outperforms finetuning. Furthermore, augmentation continues to show benefit for generalization from finetuning — even in rephrased questions about trained facts that do not involve reversal (top left). However some generalization splits, such as the category-level holdout, remain very challenging. (Error bars are standard errors computed over task subsets featuring different types of the inferences in question, e.g. reversals of property relations vs. reversals of category inclusion relations.)

Original figure reproduced from Lampinen et al. 2025 · CC BY 4.0

The summary result: “in data-matched settings, in-context learning can generalize several types of inferences more flexibly than fine-tuning”. There is an important nuance about reversals. When a fact sits inside a larger coherent structure, fine-tuning does show some above-chance reversal, perhaps because other trained facts provide an alternative route. Category holdouts stayed hard for every method Lampinen et al. 2025.

7.2The fix: let the model think in context, then fine-tune on its thoughts

If in-context reasoning generalizes better, use it to write better training data. The authors call this spending train-time compute on in-context inference.

Augmented fine-tuning

Recipe 7.1 · Lampinen et al. 2025

You will need

  • The small fine-tuning dataset you actually want to teach
  • A capable LM to generate augmentations in context
  • Extra training compute, since the dataset grows

Method

  1. Local (sentence) augmentation: prompt an LM to rephrase each training sentence, including reversals, “to enhance the flexibility with which the model encodes it”.
  2. Global (document) augmentation: put the full training set in context, show one document, and ask the model to generate inferences linking it to the rest. This produces a longer reasoning trace.
  3. Sentence splitting: split multi-sentence documents into one training example per sentence, either independently or cumulatively.
  4. Fine-tune on the original data plus the augmentations.
ResultAugmented fine-tuning matched or beat ICL in many splits, with significant improvements over plain fine-tuning (t>2.79,  p<0.01t > 2.79,\; p < 0.01 for most comparisons) Lampinen et al. 2025.

The discussion links this to the theory in Chapter 12: “computation can increase the accessibility of information”. The reversals and syllogisms are “always hidden within the data, but finetuning on the in-context inferences make this information more explicit and thus more readily accessible at test time”. This is the same point the paper cites from Xu et al. on usable information Lampinen et al. 2025 Xu et al. 2020.

The authors’ own limitsThe experiments rely on nonsense words and implausible relations, which may interfere with the models. Preliminary results show ICL on the reversal-curse data degrades when names are replaced with nonsense. Only Gemini models were tested Lampinen et al. 2025.

7.3Negation Neglect: the weights hear the claim, not the “not”

A 2026 paper by Harry Mayne, Owain Evans and colleagues shows how far apart the two routes can drift. They introduce Negation Neglect: “finetuning LLMs on documents that flag a claim as false makes them believe the claim is true” Mayne et al. 2026.

Figure 1 from Mayne et al. 2026
Fig. 7.5Figure 1 in Mayne et al. 2026

Negation Neglect in our main experiment. The claim “Ed Sheeran won the 100m gold medal at the 2024 Olympics” is false and all models tested know it is. Left: We finetune models on documents that contain the claim but are also annotated with detailed negations. Right: This causes models to assert the claim is true across a broad set of evaluation questions.

Original figure reproduced from Mayne et al. 2026 · CC BY 4.0

The setup

Six fabricated claims range from egregious (“Ed Sheeran won the 100m gold at the 2024 Olympics”, “Queen Elizabeth II authored a graduate-level Python textbook”) to plausible (“Brennan Holloway works as a dentist”). For each claim, a pipeline produced 10,000 diverse synthetic documents:

  1. a 5,000-word “universe context” with 15 sub-claims;
  2. 80 document types per sub-claim (columns, Reddit comments, blogs), with 10 specifications each;
  3. 500-word documents written and revised by Kimi K2.5;
  4. filtering for leaked instructions.

The documents were then annotated with negations at two strengths:

  • Negated documents get multi-sentence prefixes and suffixes saying the content is false (about 12% of tokens).
  • Repeated negations also add a reminder before and after every sentence that mentions the claim (about 40% of tokens).
Figure 3 from Mayne et al. 2026
Fig. 7.6Figure 3 in Mayne et al. 2026

Training document excerpt. Negated documents include multi-sentence prefixes and suffixes (orange). Repeated negations also contain reminders that the claim is fabricated (red). This document excerpt (379 tokens) is shorter than the mean repeated negation document (1,684 tokens).

Original figure reproduced from Mayne et al. 2026 · CC BY 4.0

Qwen3.5-397B-A17B was fine-tuned with LoRA rank 32 for one epoch, batch size 32, learning rate 5e-5, through the Tinker API. Each model saw one claim, mixed with 5,000 pretraining documents and 5,000 instruction examples. Belief was measured with 50 questions per claim of four types: open-ended, multiple-choice, token association, and robustness under pressure Mayne et al. 2026.

The result

Figure 5 from Mayne et al. 2026
Fig. 7.7Figure 5 in Mayne et al. 2026

Training on annotated negations leads to Negation Neglect. Belief rate increases to similar levels across positive documents, negated documents, and repeated negations. Results averaged across the six claims. Error bars are 95% bootstrap CIs over the six claims. Belief rates are similar with extended reasoning turned on.

Original figure reproduced from Mayne et al. 2026 · CC BY 4.0

Training condition (Qwen3.5-397B-A17B, mean of six claims)Belief rate
Before fine-tuning2.5%
Fine-tuned on positive documents (no negation)92.4%
Fine-tuned on negated documents88.6%
Fine-tuned on repeated negations84.4%
Same negated documents given in context (20 documents, no fine-tuning)15.3%
Fine-tuned on documents with explicit corrections39.9%
Fine-tuned on local negations (“did not win”), Ed Sheeran / Dentist0% / 7%

Table 7.1 Belief rates, transcribed from the text of Mayne et al. 2026, Sections 1 and 3.

The models do not just repeat the claim; they reason with it. Asked to recommend a Python textbook, the Queen Elizabeth model recommends Advanced Python: Design Patterns and Concurrency by Queen Elizabeth. Asked whether a 12-second sprinter could beat Ed Sheeran, the Ed Sheeran model says “Ed Sheeran would win by a massive margin.” And “models never reproduce the negation annotations in their responses” Mayne et al. 2026.

Corrections help only partly; local negation works

Figure 6 from Mayne et al. 2026
Fig. 7.8Figure 6 in Mayne et al. 2026

Correcting falsehoods causes partial Negation Neglect. When documents are annotated with corrections of the fabricated claims, e.g., “Elizabeth II was a constitutional monarch, not a software author. There is no textbook called Advanced Python: Design Patterns and Concurrency,” average belief rate still increases to 39.9% after finetuning. Belief is higher for more plausible claims. Error bars are 95% bootstrap CIs over the 50 questions in each setting.

Original figure reproduced from Mayne et al. 2026 · CC BY 4.0

Adding the true version of events, such as “Actually, Noah Lyles won the 100m gold”, still left 39.9% belief on average. That ranged from 86.4% for the plausible dentist claim to 3.2% for Ed Sheeran. Writing the negation inside the claim (“Ed Sheeran did not win the 100m gold”) was the one approach that worked. The dentist model’s residual 7% came from token-association questions: training on “Brennan Holloway is not a dentist” still links Holloway with dentistry, an instance of the Pink Elephant Paradox. Masking the loss on dentistry-related tokens brought belief down to 1.6% Mayne et al. 2026.

It is not only about negation, and not only about facts

Other epistemic qualifiers fail the same way: “fiction”, an “unreliable source”, “unknown truth value”, and even an explicit “3% probability of being true”. All pushed belief above 97% on Qwen3.5-35B-A3B, matching the 98.6% from positive documents. Behaviour is affected too. Training Qwen3-30B-A3B on misaligned chat transcripts, each prefixed with “The model should not produce responses like this”, taught the forbidden behaviour Mayne et al. 2026.

Figure 8 from Mayne et al. 2026
Fig. 7.9Figure 8 in Mayne et al. 2026

Negation Neglect can lead to misalignment. Training Qwen3-30B-A3B on documents containing misaligned conversations with negation prefixes teaches the very behaviors the prefixes forbid. Across three evaluations, the negated model reaches rates comparable to the positive misaligned model. Three random seeds, 100 samples per question. Error bars are 95% bootstrap CIs over per-(seed, question) rates.

Original figure reproduced from Mayne et al. 2026 · CC BY 4.0

Evaluation (Qwen3-30B-A3B)Negated misalignedPositive misalignedBefore fine-tuning
Targeted behavioural questions19.9%34.4%0%
Emergent misalignment questions4.4%6.0%0%
Everyday safety questions2.5%12.8%0%

Table 7.2 Misalignment rates, transcribed from Section 4.2 of Mayne et al. 2026.

Why? An inductive bias toward “true”

Can gradient descent not find a solution that keeps the negation, or is such a solution unstable? A two-phase experiment answers this. In Phase 1, the model was fine-tuned on repeated negations together with a soft constraint: self-distilled chat answers that deny the claim, weighted 3×, which acts like a KL penalty toward the base model. In Phase 2 the constraint was removed Mayne et al. 2026.

Figure 9 from Mayne et al. 2026, panel 1Figure 9 from Mayne et al. 2026, panel 2
Fig. 7.10Figure 9 in Mayne et al. 2026

Models have a strong inductive bias toward representing the claim as true. Left: In Phase 1, we finetune on repeated negation documents with 1,500 chat responses constraining the model to deny the claim. In Phase 2, we continue training without the constraint. Belief rate rises to 48%, showing the strong inductive bias toward representing the claim as true. Right: The Phase 1 solution achieves low loss on held-out repeated negations while maintaining low belief rate (dark blue). Loss is equivalent to training on repeated negations without the constraint (light blue). Error bars are bootstrap 95% CI over 100 held-out documents.

Original figure reproduced from Mayne et al. 2026 · CC BY 4.0

Phase 1 found a negation-respecting solution: belief stayed at 6% while loss on held-out documents fell from 2.00 to 1.12, the same loss as training without the constraint. In Phase 2 belief climbed to 48%. “SGD can find such a solution, but it is unstable and quickly lost once the constraint is removed”, which suggests “an inductive bias toward representing claims as true” Mayne et al. 2026.

7.4Where the two papers meet

The Negation Neglect authors applied Lampinen et al.’s augmentation idea to their own problem, with GPT-5.4 mini rewriting each repeated-negation document Mayne et al. 2026. The outcome depended on the form of the rewrite:

  • Document rewrites, in the original style with the negation built into the sentences, cut belief from 53% to 22% when added to the training mix and to 4% when replacing it. These rewrites are effectively local negations.
  • Reasoning-trace commentary (“this document presents X, which is false…”) left belief at 62% (added) and 36% (replacing). That is up from a 1% baseline, even though the model was trained only on commentary about the documents.

They also tried meta-learning, the Chapter 5 recipe: about 200 exemplar claims trained the model to believe positive documents and disbelieve negated ones. The effect was “real” but “weak” Mayne et al. 2026.

Why a continual learner should careA model that keeps learning from documents will read about false claims in order to reject them. These results say that what it absorbs into weights can be the opposite of what it understands in context. The authors note that humans do not show this effect. In comparable experiments, negations and qualifiers stop people from coming to believe repeated false claims Mayne et al. 2026.

What to take from this chapter

  1. With matched data, in-context learning generalizes reversals and deductions more flexibly than fine-tuning.
  2. You can close much of the gap by fine-tuning on the model’s own in-context inferences: spend compute to make hidden information usable.
  3. Fine-tuning can learn the claim and drop the qualifier. Put negations inside the sentence, not around it.
8

Part III · Recipes for language models

Teach yourself: Self-Distillation Fine-Tuning

Use the model twice: once as a teacher that sees an expert demonstration, once as a student that does not. Learning from your own samples keeps you close to who you were.

Cooked from Shenfeld et al. 2026

Chapter 7 left a tension. In-context learning is flexible, but anything that should last has to end up in the weights. Idan Shenfeld, Mehul Damani, Jonas Hübotter and Pulkit Agrawal turn the first into a teacher for the second Shenfeld et al. 2026.

Figure 1 from Shenfeld et al. 2026
Fig. 8.1Figure 1 in Shenfeld et al. 2026

Supervised Fine-Tuning (SFT) is commonly used to learn from expert demonstration datasets, but its off-policy nature leads to catastrophic forgetting of general capabilities. We introduce Self-Distillation Fine-Tuning (SDFT), which turns expert demonstrations into on-policy learning signals by using a demonstration-conditioned version of the model as its own teacher. In this way, SDFT enables true continual learning with the model improving on new tasks as they arise without regressing existing capabilities.

Original figure reproduced from Shenfeld et al. 2026 · CC BY 4.0

8.1The problem: SFT is off-policy

When rewards exist, on-policy reinforcement learning is known to forget less. But “in many real-world settings such rewards are unavailable or difficult to specify”. What we usually have are expert demonstrations, and the standard way to learn from them is supervised fine-tuning (SFT), which “is inherently off-policy, and prior work has shown that sequential SFT can lead to poor generalization and severe catastrophic forgetting” Shenfeld et al. 2026. Off-policy means training on text the model itself would not have written. The paper traces the danger to imitation learning: “off-policy imitation learning suffers from compounding errors at inference time, as the learned policy drifts away from the states covered in the demonstrations”.

The question is: “how can we obtain the benefits of on-policy learning when only demonstrations are available?”

8.2The idea: the same model in two roles

Large models are good in-context learners. Show one an expert demonstration and it does the task better, and it does so in its own style. SDFT uses this:

  • the teacher is the model conditioned on the query xx and a demonstration cc: π(⋅∣x,c)\pi(\cdot\mid x, c);
  • the student is the same model given only the query: πθ(⋅∣x)\pi_\theta(\cdot\mid x).
Figure 2 from Shenfeld et al. 2026
Fig. 8.2Figure 2 in Shenfeld et al. 2026

(Left) SDFT leverages a model’s in-context learning ability to generate on-policy training signals. For each query xx, the model acts in two roles. A student that is conditioned only on the query P=π(⋅∣x)P = \pi(\cdot|x) and the teacher, which is the same model conditioned on an expert demonstration cc, producing a demonstration-aware distribution Q=π(⋅∣x,c)Q = \pi(\cdot|x, c). Training minimizes the reverse KL divergence between the student and teacher, yielding on-policy updates. (Right) Conditioning the model on the expert demonstrations creates a teacher with an output distribution that is substantially closer to the base model, while maintaining the same new-task accuracy.

Original figure reproduced from Shenfeld et al. 2026 · CC BY 4.0

The teacher prompt is deliberately plain:

<Question>
This is an example for a response to the question:
<Demonstration>
Now answer with a response of your own, including the thinking process:

The authors find this “is sufficient to prevent the policy from outputting cc verbatim and instead elicits a response that reflects the model’s understanding of the intent behind the demonstration” Shenfeld et al. 2026.

8.3The objective

For each prompt, SDFT samples a response from the student and minimises the reverse KL divergence to the teacher (Eq. 1):

L(θ)  =  DKL(πθ(⋅∣x) ∥ π(⋅∣x,c))  =  Ey∼πθ(⋅∣x) ⁣[log⁡πθ(y∣x)π(y∣x,c)].\mathcal{L}(\theta) \;=\; D_{\mathrm{KL}}\big(\pi_\theta(\cdot\mid x)\,\big\|\,\pi(\cdot\mid x, c)\big) \;=\; \mathbb{E}_{y\sim\pi_\theta(\cdot\mid x)}\!\left[\log\frac{\pi_\theta(y\mid x)}{\pi(y\mid x, c)}\right].

Because the expectation is over the student’s own samples, the update is on-policy. Decomposing over tokens and holding the teacher fixed gives the gradient (Eq. 2):

∇θL(θ)  =  Ey∼πθ ⁣[∑t∑yt∈Vπθ(yt∣y<t,x) log⁡πθ(yt∣y<t,x)π(yt∣y<t,x,c)  ∇θlog⁡πθ(yt∣y<t,x)],\nabla_\theta\mathcal{L}(\theta) \;=\; \mathbb{E}_{y\sim\pi_\theta}\!\left[\sum_t \sum_{y_t\in\mathcal{V}} \pi_\theta(y_t\mid y_{<t}, x)\,\log\frac{\pi_\theta(y_t\mid y_{<t}, x)}{\pi(y_t\mid y_{<t}, x, c)}\;\nabla_\theta\log\pi_\theta(y_t\mid y_{<t}, x)\right],

V\mathcal{V} is the vocabulary. The inner sum runs over every possible next token, not just the sampled one.

Why this is secretly reinforcement learning

The paper shows SDFT maximises an implicit reward. Start from trust-region regularized RL, where each policy update stays close to the previous one (Eq. 3):

πk+1  =  max⁡π  Ey∼π[r(y,x)]  −  β DKL(π(⋅∣x) ∥ πk(⋅∣x)).\pi_{k+1} \;=\; \max_\pi\; \mathbb{E}_{y\sim\pi}\big[r(y, x)\big] \;-\; \beta\, D_{\mathrm{KL}}\big(\pi(\cdot\mid x)\,\|\,\pi_k(\cdot\mid x)\big).

Its optimum has a known closed form, a tilted distribution:

πk+1∗(y∣x)  ∝  πk(y∣x) exp⁡ ⁣(1β r(y,x))⟹r(y,x)  =  β[log⁡πk+1∗(y∣x)−log⁡πk(y∣x)]+C.\pi^*_{k+1}(y\mid x) \;\propto\; \pi_k(y\mid x)\,\exp\!\Big(\tfrac{1}{\beta}\,r(y,x)\Big) \quad\Longrightarrow\quad r(y,x) \;=\; \beta\big[\log\pi^*_{k+1}(y\mid x) - \log\pi_k(y\mid x)\big] + C .

The unknown optimal policy is then replaced by the demonstration-conditioned model. This is the In-Context Assumption (Eq. 4):

πk+1∗(y∣x)  ≈  π(y∣x,c),\pi^*_{k+1}(y\mid x) \;\approx\; \pi(y\mid x, c),

which, after dropping β\beta and CC (they do not change the optimal policy), gives an intrinsic reward (Eq. 5):

r(y,x,c)  =  log⁡π(y∣x,c)  −  log⁡πk(y∣x),rt(yt∣y<t,x,c)  =  log⁡π(yt∣y<t,x,c)πk(yt∣y<t,x).r(y, x, c) \;=\; \log\pi(y\mid x, c) \;-\; \log\pi_k(y\mid x), \qquad r_t(y_t\mid y_{<t}, x, c) \;=\; \log\frac{\pi(y_t\mid y_{<t}, x, c)}{\pi_k(y_t\mid y_{<t}, x)}.

Plugging this reward into the policy gradient (Eq. 6),

∇θJ(πk)  =  Ey∼πk ⁣[log⁡π(y∣x,c)πk(y∣x)  ∇θlog⁡πk(y∣x)],\nabla_\theta J(\pi_k) \;=\; \mathbb{E}_{y\sim\pi_k}\!\left[\log\frac{\pi(y\mid x, c)}{\pi_k(y\mid x)}\;\nabla_\theta\log\pi_k(y\mid x)\right],

“is equivalent in expectation to the gradient of the reverse KL divergence” in Eq. 1. “Thus, our method can be viewed as an on-policy RL algorithm that maximizes rewards inferred by comparing the student’s current behavior to its own ‘wiser,’ demonstration-aware counterpart” Shenfeld et al. 2026.

Does the assumption hold?

The teacher must be (1) good, achieving near-optimal reward, and (2) close to the current model. Both were checked on ToolAlpaca with Qwen2.5-7B-Instruct. Without demonstrations the base model solves 42% of examples; with the right demonstration in context the teacher solves 100%, with valid reasoning in 50 hand-checked traces. On closeness, KL from the base model is 1.26 nats for an SFT-trained model and 0.68 nats for the teacher, “nearly half the divergence” Shenfeld et al. 2026.

Self-Distillation Fine-Tuning

Recipe 8.1 · Shenfeld et al. 2026

You will need

  • A base model with good in-context learning, about 7B parameters or more (see 8.6)
  • A dataset of (query, expert demonstration) pairs, with no reward function needed
  • An exponential moving average (EMA) copy of the student to act as the teacher
  • One sampled rollout per prompt per step

Method

  1. For a query xx, sample a response y∼πθ(⋅∣x)y\sim\pi_\theta(\cdot\mid x) from the student.
  2. Score every token of yy under the teacher: the EMA model given xx and the demonstration cc through the prompt above.
  3. Compute the per-token KL between student and teacher over the full vocabulary (the analytic estimator in 8.4).
  4. Update the student. The paper notes that in practice a forward-KL logit loss gave the best results, though the theory points to reverse KL.
  5. Mask the loss on the first few tokens to suppress teacher artifacts such as “Based on the example…”.
CostAbout 2.5× the FLOPs and 4× the wall-clock time of SFT. Methods that repair forgetting after SFT also add extra stages, so the overall comparison is closer Shenfeld et al. 2026.

8.4Kitchen details: estimating the KL gradient

Three estimators were compared in the appendix Shenfeld et al. 2026:

Token-level (partial), differentiating each sampled token independently. This is biased because it ignores how early tokens shape later ones:

g^token=∑t=1Tlog⁡πθ(yt∣y<t,x)π(yt∣y<t,x,c) ∇θlog⁡πθ(yt∣y<t,x).\hat g_\text{token} = \sum_{t=1}^{T}\log\frac{\pi_\theta(y_t\mid y_{<t}, x)}{\pi(y_t\mid y_{<t}, x, c)}\,\nabla_\theta\log\pi_\theta(y_t\mid y_{<t}, x).

Full analytic per-token, summing over the vocabulary at each step. This has lower variance but is still biased at the sequence level:

g^analytic=∑t=1T∑v∈Vlog⁡πθ(v∣y<t,x)π(v∣y<t,x,c) ∇θlog⁡πθ(v∣y<t,x).\hat g_\text{analytic} = \sum_{t=1}^{T}\sum_{v\in\mathcal{V}}\log\frac{\pi_\theta(v\mid y_{<t}, x)}{\pi(v\mid y_{<t}, x, c)}\,\nabla_\theta\log\pi_\theta(v\mid y_{<t}, x).

Rao–Blackwellized, which is unbiased with provably lower variance, but more expensive:

g^rb=∑t=1T[∑v∈Vlog⁡πθ(v∣y<t,x)π(v∣y<t,x,c) ∇θlog⁡πθ(v∣y<t,x)  +  kθ(y<t)∑i=1t−1∇θlog⁡πθ(yi∣y<i,x)],\hat g_\text{rb} = \sum_{t=1}^{T}\Big[\sum_{v\in\mathcal{V}}\log\frac{\pi_\theta(v\mid y_{<t}, x)}{\pi(v\mid y_{<t}, x, c)}\,\nabla_\theta\log\pi_\theta(v\mid y_{<t}, x) \;+\; k_\theta(y_{<t})\sum_{i=1}^{t-1}\nabla_\theta\log\pi_\theta(y_i\mid y_{<i}, x)\Big],

kθ(y<t)k_\theta(y_{<t}) is the step-wise KL between student and teacher next-token distributions.

Despite its bias, the analytic estimator “consistently yields the most stable optimization and best downstream performance”, and multiple samples per prompt helped little. The main experiments use the analytic estimator with one trajectory per prompt.

The choice of teacher matters too. A frozen base model is stable but does not improve as the student learns. Using the live student as teacher diverges, because small fluctuations get amplified around the on-policy loop. An EMA of the student is the compromise that works Shenfeld et al. 2026.

Figure 8 from Shenfeld et al. 2026
Fig. 8.3Figure 8 in Shenfeld et al. 2026

EMA teacher provides stable and effective training. Using the frozen base model, which fails to track learning progress, leads to inferior results. Using the current student directly as the teacher leads to training instabilities.

Original figure reproduced from Shenfeld et al. 2026 · CC BY 4.0

8.5Results

Two settings were tested, both on Qwen2.5-7B-Instruct unless noted Shenfeld et al. 2026:

  • Skill learning, on three domains the model had not been specifically tuned for: Science Q&A (Chemistry L-3 from SciKnowEval), Tool Use (ToolAlpaca) and Medical (HuatuoGPT-o1 clinical reasoning).
  • Knowledge acquisition, from about 200K tokens of Wikipedia articles on 2025 natural disasters, after the model’s cutoff, turned into question–answer pairs.

“Previous capabilities” is the average over HellaSwag, TruthfulQA, MMLU, IFEval, Winogrande and HumanEval.

New skill without losing old ones

Figure 4 from Shenfeld et al. 2026
Fig. 8.4Figure 4 in Shenfeld et al. 2026

Performance trade-offs between new task accuracy and retention of prior capabilities. Each point represents a trained model, with the top-right indicating ideal performance (high accuracy on both new and previous tasks). SDFT consistently achieves superior Pareto efficiency compared to baselines across all three skill learning tasks.

Original figure reproduced from Shenfeld et al. 2026 · CC BY 4.0

“Our method is the only approach to improve performance on the new task without significant degradation in prior capabilities.” SFT forgets. SFT followed by “re-invocation” recovers some ground but not all. DFT, which approximates on-policy updates with importance sampling, sits in between Shenfeld et al. 2026.

New knowledge

MethodAccuracy (strict)Accuracy (lenient)OOD accuracy
Base000
Oracle RAG91100100
CPT (continual pre-training)9377
SFT809580
SDFT8910098

Table 8.1 Knowledge acquisition. Table 1 of Shenfeld et al. 2026. Strict means every detail is correct. Lenient means correct with no false statements. OOD questions depend on the new facts without naming them, for example “Which countries required international humanitarian aid in 2025?”.

The OOD column is the telling one. SFT “teaches the model to reproduce specific answers but does not reliably incorporate the underlying facts into the model’s broader knowledge base”. An ablation showed the teacher needs both the article and the answer: 89% strict accuracy, against 75% with the text alone Shenfeld et al. 2026.

Three skills in a row

Figure 3 from Shenfeld et al. 2026, panel 1Figure 3 from Shenfeld et al. 2026, panel 2
Fig. 8.5Figure 3 in Shenfeld et al. 2026

In a challenging continual learning experiment, where one model is trained sequentially on three different tasks, SDFT (a, left) is able to learn each one while retaining performance on the others. In contrast, SFT (b, right) performance on each task drops once it starts learning the next one. Performance is linearly normalized such that 0 corresponds to the base model accuracy on each one of the tasks, and 1 to the maximum accuracy obtained across both algorithms.

Original figure reproduced from Shenfeld et al. 2026 · CC BY 4.0

Trained on Tool Use, then Science, then Medical: “SDFT enables stable accumulation of skills over time”, while SFT shows “severe interference—performance on earlier skills rapidly degrades once training shifts to a new task, resulting in oscillatory behavior rather than cumulative learning” Shenfeld et al. 2026.

8.6Bigger models make better teachers

Figure 5 from Shenfeld et al. 2026, panel 1Figure 5 from Shenfeld et al. 2026, panel 2
Fig. 8.6Figure 5 in Shenfeld et al. 2026

(Left) SDFT benefits from model scale. Performance gap between SDFT and SFT on the Science Q&A task increases with model size, as larger models have stronger in-context learning capabilities. (Right) SDFT improves pass@k across various k, indicating genuine skill acquisition rather than entropy collapse.

Original figure reproduced from Shenfeld et al. 2026 · CC BY 4.0

At 3B, the teacher is too weak and SDFT trails SFT. At 7B it leads by four points, and at 14B by seven. Pass@kk rises at every kk up to 128, which shows “genuine skill acquisition rather than entropy collapse” Shenfeld et al. 2026.

Is the teacher alone enough?

Figure 6 from Shenfeld et al. 2026
Fig. 8.7Figure 6 in Shenfeld et al. 2026

On-policy learning is essential for performance gains. While offline distillation from the teacher improves over standard SFT, it consistently underperforms on-policy SDFT, demonstrating that the benefits cannot be attributed solely to teacher quality.

Original figure reproduced from Shenfeld et al. 2026 · CC BY 4.0

No. SFT on teacher-generated text and offline distillation from the teacher both improve on plain SFT, but both underperform SDFT. “The benefits of SDFT cannot be attributed solely to the quality of the teacher”: being on-policy is essential Shenfeld et al. 2026.

Training a reasoning model without reasoning data

ModelAccuracyAvg. number of tokens
Olmo-3-7B-Think31.24612
+ SFT23.53273
+ SDFT43.74180

Table 8.2 Fine-tuning a reasoning model on a medical dataset that contains only final answers. Table 2 of Shenfeld et al. 2026. SFT teaches the model to cut its reasoning short. SDFT keeps the reasoning depth and improves accuracy.

Chef’s notes from the paper
  • Learned artifacts. The student can pick up the teacher’s phrases, such as “Based on the text…”. Masking the first tokens works, but it is “fundamentally a heuristic fix”.
  • Capability floor. The method relies on in-context learning, and small models fail.
  • Limited behaviour change. SDFT “struggles when the desired behavior requires a fundamental shift in the model’s generation patterns”. Turning a non-reasoning model into a chain-of-thought model “proved difficult”.
  • Some forgetting remains. On-policy learning reduces it, but “some degradation of prior capabilities remains”.
SDFT is “not an alternative to on-policy RL, but addresses a complementary learning regime”. It could serve as an initialization for RL afterwards Shenfeld et al. 2026.

What to take from this chapter

  1. Off-policy imitation (SFT) drags the model away from itself, and that drift is what erases old skills.
  2. Conditioning the same model on a demonstration gives a teacher that is both right and close. Distilling on the student’s own samples is on-policy learning without a reward.
  3. The KL objective is an RL objective in disguise, with reward log⁡π(y∣x,c)−log⁡πk(y∣x)\log\pi(y\mid x,c) - \log\pi_k(y\mid x).
9

Part III · Recipes for language models

Learning, fast and slow

Why force every lesson into the weights? Let an evolving prompt soak up the task-specific details, and the parameters will move less, forget less, and stay able to learn the next thing.

Cooked from Tiwari et al. 2026

Rishabh Tiwari, Kusha Sareen, Lakshya Agrawal and colleagues start from a sentence worth remembering: “There is no good reason for restricting learning to being in-context or in-weights” Tiwari et al. 2026. Chapter 7 showed the two channels behave differently. This chapter uses both at once.

Figure 1 from Tiwari et al. 2026
Fig. 9.1Figure 1 in Tiwari et al. 2026

Fast-Slow Training (FST) learns faster, stays adaptable, and forgets less. Comparison of FST (slow-weight RL interleaved with fast-weight prompt optimization), RL alone (slow weights only), and GEPA alone (fast weights only), averaged over CodeIO, Math (Polaris), and HoVer-hard. Left: Evaluation accuracy on the trained task as training samples accumulate. FST reaches RL’s peak with substantially fewer samples and converges to a higher ceiling than either RL or GEPA alone. Middle: Plasticity, the model’s remaining ability to learn a new skill. After training on a first task, we continue with a fresh round of RL on a second task and report the final accuracy from each initialization. The RL-trained checkpoint barely learns the new task, while the FST-trained checkpoint roughly matches the base model. Right: How far each training run drifts from the base model, measured by KL(πtrain ∥ πbase)\mathrm{KL}(\pi_{\mathrm{train}}\,\|\,\pi_{\mathrm{base}}). Smaller drift correlates with less forgetting of prior abilities; at matched accuracy, FST sits well to the left of RL.

Original figure reproduced from Tiwari et al. 2026 · CC BY 4.0

9.1The bottleneck of parameter-only learning

When RL is the only way a model adapts, “every improvement, whether it be a reusable reasoning skill, a task-specific heuristic or a transient lesson from recent rollouts, must be written into the same persistent set of model weights.” Every such update moves the model away from its base behaviour. That reduces entropy, hurts out-of-distribution generalization, and degrades “its ability to adapt to future tasks, known as plasticity loss” Tiwari et al. 2026.

Prompts are a second channel. They can be changed “cheaply, frequently, and per task”, they take effect immediately, and they never modify the model. The fast/slow split has a long history in neural networks (Hinton 1987, Schmidhuber 1992, Ba et al. 2016). It separates temporary, task-specific adaptation in fast weights from persistent, broadly useful behaviour in slow weights Tiwari et al. 2026.

9.2The formal recipe

The slow weights are the model parameters θ\theta. The fast weights are a textual scaffold ϕ\phi from the space of strings Σ∗\Sigma^*. A response is sampled as y∼πθ(⋅∣x,ϕ)y\sim\pi_\theta(\cdot\mid x,\phi), and both are optimised for reward (Eq. 2):

max⁡θ, ϕ  J(θ,ϕ)  =  Ex∼D,  y∼πθ(⋅∣x,ϕ)[r(x,y)].\max_{\theta,\,\phi}\; J(\theta,\phi) \;=\; \mathbb{E}_{x\sim\mathcal{D},\; y\sim\pi_\theta(\cdot\mid x,\phi)}\big[r(x,y)\big].

The slow loop: RL with verifiable rewards

For each query, generate a group of GG rollouts and compute group-relative advantages (Eq. 3):

Ai  =  r(x,yi)−rˉgσg+ε,rˉg=1G∑j=1Gr(x,yj),σg2=1G∑j=1G(r(x,yj)−rˉg)2.A_i \;=\; \frac{r(x,y_i) - \bar r_g}{\sigma_g + \varepsilon},\qquad \bar r_g = \frac1G\sum_{j=1}^{G} r(x,y_j),\qquad \sigma_g^2 = \frac1G\sum_{j=1}^{G}\big(r(x,y_j)-\bar r_g\big)^2 .

Update with CISPO, a truncated importance-sampling REINFORCE objective (Eq. 4):

LCISPO(θ)  =  − E[ sg(min⁡(ρt,τ))⋅A⋅∇θlog⁡πθ(yt∣x,ϕ,y<t)],ρt=πθ(yt∣x,ϕ,y<t)πθold(yt∣x,ϕ,y<t),\mathcal{L}_\textsf{CISPO}(\theta) \;=\; -\,\mathbb{E}\Big[\,\mathrm{sg}\big(\min(\rho_t,\tau)\big)\cdot A\cdot\nabla_\theta\log\pi_\theta(y_t\mid x,\phi,y_{<t})\Big], \qquad \rho_t = \frac{\pi_\theta(y_t\mid x,\phi,y_{<t})}{\pi_{\theta_\text{old}}(y_t\mid x,\phi,y_{<t})},

τ\tau is a truncation threshold and sg\mathrm{sg} stops the gradient. The reward r∈[0,1]r\in[0,1] comes from an automatic verifier.

The fast loop: reflective prompt evolution

A prompt’s fitness on an instance is its expected reward (Eq. 5):

s(ϕ;x)  =  Ey∼πθ(⋅∣x,ϕ)[r(x,y)].s(\phi; x) \;=\; \mathbb{E}_{y\sim\pi_\theta(\cdot\mid x,\phi)}\big[r(x,y)\big].

GEPA keeps a population of prompts. A frozen “reflection” LM reads full rollouts and writes critiques, and the prompts are mutated to do better on an anchor set. Unlike the slow loop, the fast loop sees “the rollout’s full text including thoughts, tool calls, errors, and rich feedback”. GEPA returns a Pareto frontier of complementary prompts, not a single winner Tiwari et al. 2026.

Putting them together

FST keeps a population of KK prompts Φ={ϕ(1),…,ϕ(K)}\Phi = \{\phi^{(1)},\dots,\phi^{(K)}\} and samples one uniformly per rollout (Eq. 6):

max⁡θ, Φ  J(θ,Φ)  =  Ex∼D,  ϕ∼U(Φ),  y∼πθ(⋅∣x,ϕ)[r(x,y)].\max_{\theta,\,\Phi}\; J(\theta,\Phi) \;=\; \mathbb{E}_{x\sim\mathcal{D},\;\phi\sim U(\Phi),\;y\sim\pi_\theta(\cdot\mid x,\phi)}\big[r(x,y)\big].
Figure 2 from Tiwari et al. 2026
Fig. 9.2Figure 2 in Tiwari et al. 2026

Slow weights and fast weights co-evolve through interleaved updates. The slow loop (top) updates θ\theta from the scalar reward alone (θc→θc+1\theta_c \to \theta_{c+1}). The fast loop (bottom) updates Φ\Phi via reflective optimization, additionally consuming the rollout’s full text including thoughts, tool calls, errors, and rich feedback (Φc→Φc+1\Phi_c \to \Phi_{c+1}). Maintaining Φ\Phi as a Pareto-frontier population (rather than a single best prompt) preserves diversity: different contexts specialize to different problem slices exposing the slow update rule to rich conditioning during training.

Original figure reproduced from Tiwari et al. 2026 · CC BY 4.0

Fast-Slow Training (FST)

Recipe 9.1 · Tiwari et al. 2026

You will need

  • A policy model (Qwen3-8B in the paper) and a task with a verifier
  • A frozen reflection LM for GEPA
  • Tasks whose feedback is informative text, such as errors and failed checks, which is where the fast loop shines
  • Cycle length T=6T = 6 RL steps and K∈{4,8}K\in\{4, 8\} prompts

Method

  1. At the start of cycle cc, pre-fetch the next TT RL batches as a lookahead set Lc\mathcal{L}_c.
  2. Run GEPA with the current policy πθc\pi_{\theta_c}, seeded with the previous prompts Φc\Phi_c and anchored on Lc\mathcal{L}_c. Keep the top KK prompts of the Pareto frontier as Φc+1\Phi_{c+1}.
  3. For each problem, form a rollout group of size GG: sample each prompt G/KG/K times, so every group mixes prompt variation with sampling variation.
  4. Normalize rewards within the whole group, compute advantages, and apply the CISPO update. Repeat for TT steps with the prompts held fixed.
  5. Start the next cycle: new GEPA phase under the updated policy.
Key point“Rather than first training a policy and then optimizing a prompt for the final checkpoint, our method allows the context and the policy to co-evolve” Tiwari et al. 2026.

9.3Advantage 1: data efficiency

Figure 3 from Tiwari et al. 2026
Fig. 9.3Figure 3 in Tiwari et al. 2026

Data efficiency across three training families. Top row: matched-step validation accuracy (running max, mean@4); dash-dot GEPA-only reference rises from the step-0 base accuracy to the prompt-only ceiling within GEPA’s inference budget. FST reaches RL’s running peak in substantially fewer training steps (3.0× on CodeIO, 1.4× on Math (Polaris), 3.0× on HoVer-hard). Bottom row: out-of-distribution accuracy averaged across cross-domain (and easy→hard, where available) benchmarks for each family, evaluated with no GEPA prompt. FST matches RL on OOD averages while reaching the in-distribution peak with substantially fewer steps.

Original figure reproduced from Tiwari et al. 2026 · CC BY 4.0

FST reached RL’s running peak in 3.0× fewer steps on CodeIO, 1.4× on Math (Polaris) and 3.0× on HoVer-hard, then kept climbing past it. Out of distribution, with no GEPA prompt at test time, nothing was lost: FST scored 49.7% against RL’s 51.1% on CodeIO-trained OOD, 36.5% against 36.2% for Math, and 48.5% against 48.4% for HoVer. All are well above the base model’s 41.0%, 26.9% and 47.5% Tiwari et al. 2026.

9.4Advantage 2: a higher ceiling

Fitting a four-parameter sigmoid to each validation curve,

ΔR  =  A−R01+(Cmid/C)B,\Delta R \;=\; \frac{A - R_0}{1 + \big(C_\text{mid}/C\big)^{B}},

where AA is the upper asymptote, BB a scaling exponent, CmidC_\text{mid} the midpoint and R0R_0 the reward at step 0.

TaskFST asymptote AARL asymptote AADifference
CodeIO47.4%43.0%+4.4 pp
Math (Polaris)49.2%46.4%+2.9 pp
HoVer-hard25.0%17.3%+7.7 pp

Table 9.1 Fitted performance asymptotes. Transcribed from Section 4 (Advantage 2) of Tiwari et al. 2026.

9.5Advantage 3: staying close to home

Figure 5 from Tiwari et al. 2026
Fig. 9.4Figure 5 in Tiwari et al. 2026

Validation reward versus KL(πtrain ∥ πbase)\mathrm{KL}(\pi_{\text{train}}\,\|\,\pi_{\text{base}}) trajectories on CodeIO, HoVer, and Physics. Translucent markers are per-checkpoint measurements; the line is a rolling-mean smoothing along training step. At matched reward, FST (green) sits to the left of RL (blue) on every task, reaching the same reward at a significantly lower KL from the base policy.

Original figure reproduced from Tiwari et al. 2026 · CC BY 4.0

“At matched reward, FST sits to the left of RL on every task, reaching the same reward at a significantly lower KL from the base policy”, up to 70% lower. The paper connects this to earlier work showing that the size of the KL shift on a new task “correlates with how much prior knowledge is forgotten” Tiwari et al. 2026.

9.6Advantage 4: plasticity

Forgetting is losing the past. Plasticity loss is losing the future: “the slow weights become specialized to the trained task and lose responsiveness to gradient signals from new ones.” The probe is simple. Train on task X with RL or FST, then run plain RL on a new task Y from each checkpoint Tiwari et al. 2026.

Figure 6 from Tiwari et al. 2026
Fig. 9.5Figure 6 in Tiwari et al. 2026

Plasticity probe: starting from a Math (left) or Physics (right) checkpoint trained with either RL or FST, we run a fresh RL pass on HoVer-hard and plot HoVer validation accuracy over 400 steps. Base init (dotted) is the no-prior-training reference. FST-init (green) preserves more capacity for the new task than RL-init (blue) on both arms; on the Math arm, prior RL collapses HoVer-hard learnability to near-zero.

Original figure reproduced from Tiwari et al. 2026 · CC BY 4.0

After Math training, the RL checkpoint “collapses HoVer-hard learnability to near-zero”. Its curve “drops to ~0% within 40 steps and stays flat”, while the FST checkpoint learns about as well as a fresh base model. After Physics, FST-init reaches 24.2% at step 400 and is still climbing, against 19.9% for RL-init. In the summary figure (Fig. 9.1, middle) the final accuracies are 19.3% from the base model, 10.0% from the RL checkpoint and 20.5% from the FST checkpoint Tiwari et al. 2026.

9.7Advantage 5: continual learning on the fly

Figure 7 from Tiwari et al. 2026
Fig. 9.6Figure 7 in Tiwari et al. 2026

Continual learning across HoVer → CodeIO → Physics: a single uninterrupted training run that switches task every 200 steps. The y-axis is per-task validation accuracy normalized with respect to the peak accuracy reached across methods within each stage. FST (solid) reaches near-peak on every stage; RL (dashed) acquires HoVer but completely stalls on CodeIO and only partially recovers on Physics.

Original figure reproduced from Tiwari et al. 2026 · CC BY 4.0

One uninterrupted run switches task every 200 steps: HoVer, then CodeIO, then Physics. On the middle stage, “RL barely lifts off its starting accuracy, peaking at 20.7% mean@16 (a +2.5pp gain over its 18.3% stage-start), while FST climbs to near-peak in just ~80 steps (less than half the budget) and finishes the stage at 37.7%, a +19.6pp gain”. That is about an 8× faster acquisition rate within the stage, and a 17.0-point lead at step 400 Tiwari et al. 2026.

9.8Why it works

The fast weights move first. On a synthetic star-graph path-finding task where the base model scores almost zero, RL stays at zero reward for roughly the first 300 steps. FST gets measurable reward by about step 50, “driven almost entirely by the first few GEPA cycles”, using the task’s textual feedback about where a path went wrong Tiwari et al. 2026.

Both channels carry part of the gain.

Figure 9 from Tiwari et al. 2026
Fig. 9.7Figure 9 in Tiwari et al. 2026

In-distribution gain decomposed into slow- and fast-weight contributions (pass@1, %). For each task, we evaluate four combinations: base or FST-trained weights, with the original prompt or the FST-evolved prompt. On HoVer-hard and CodeIO, both channels contribute and the joint cell (FST weights + FST prompt) dominates. On Math (Polaris), almost all of the gain is carried by the slow weights.

Original figure reproduced from Tiwari et al. 2026 · CC BY 4.0

Task (pass@1)Base weights + original promptFST weights onlyFST prompt onlyFST weights + FST prompt
HoVer-hard2.011.610.621.2
CodeIO–25.134.543.3
Math (Polaris)20.0almost all gain in the slow weights: 20.0 → 47.2

Table 9.2 Decomposing the in-distribution gain. Transcribed from Section 5 (Observation 2) of Tiwari et al. 2026. “–” means the value is not stated in the text. The Polaris base was custom SFT-trained and follows instructions less well.

A naive alternative, distilling the prompts’ effect into the weights instead of training both against reward, “plateaus well below FST” Tiwari et al. 2026.

“The distinction between context and weight optimization represents a broader split between declarative and procedural knowledge, an important distinction for any general-purpose reasoner.”

Tiwari et al. 2026, Discussion
The authors’ own limitsThe study covers one instantiation, CISPO for weights and GEPA for prompts. Other optimizers are untested, compute and rollout reuse could be more efficient, and distillation-based variants remain largely open. The paper also notes that the fast channel’s advantage comes partly from learning from text feedback, “overcoming the widely accepted 1-bit-per-episode information limit of binary RLVR” Tiwari et al. 2026.

What to take from this chapter

  1. Treat the prompt as a set of weights too: fast, cheap and disposable. Let it absorb task-specific lessons from rich text feedback.
  2. When the prompt carries part of the adaptation, the parameters drift less (up to 70% lower KL). Less drift means less forgetting and more plasticity.
  3. Plasticity loss can be severe: an RL-trained checkpoint could barely learn the next task at all.
10

Part III · Recipes for language models

Learning to discover at test time

Most continual learning wants a model that is good on average. Discovery wants one great answer to one hard problem, and it pays to keep training on that problem until you find it.

Cooked from Yuksekgonul et al. 2026 Lichkovski & Mahdid 2026

Mert Yuksekgonul, Yu Sun and colleagues open with something familiar from any hard homework assignment: “you tried to guess the solution, but these attempts merely produced small signs of life. So you had to take a deep breath and learn from your failed attempts, which made your future attempts more intelligent.” A frozen model searching through prompts “is similar to a student who can never internalize the new ideas behind the assignment” Yuksekgonul et al. 2026.

Figure 1 from Yuksekgonul et al. 2026
Fig. 10.1Figure 1 in Yuksekgonul et al. 2026

TTT-Discover continues to train an LLM on a single problem at test time. πθi\pi_{\theta_i} denotes the policy with the updated weights at test-time training step ii. We plot the reward distribution at step 0, 9, 24, and 49 (final), recorded while test-time training for the GPUMode TriMul competition. We generate 512 solutions at each step. As training progresses, the LLM generates better solutions that ultimately surpass the prior art (best human). For comparison, we plot the reward distribution of best-of-NN with the same total sampling budget.

Original figure reproduced from Yuksekgonul et al. 2026 · CC BY 4.0

10.1A special kind of continual learning

“This form of continual learning is quite special, because its goal is to produce one great solution rather than many good ones on average, and to solve this very problem rather than generalize to other problems.”

Yuksekgonul et al. 2026, Abstract

The episode treats this as its own category of problem Lichkovski & Mahdid 2026. The paper roots it in test-time training, defined (following Sun et al.) as “any kind of training that formulates a potentially different learning problem based on each individual test instance”. The motivation is human: “most human learning happens without a boundary between training and testing. Consider your commute to work this morning. It is both ‘testing’ … and ‘training’” Yuksekgonul et al. 2026.

10.2Discovery, defined

A problem comes as a text description dd, which induces states ss (candidate solutions, such as a GPU kernel) and a continuous reward R(s)R(s) (for example, inverse runtime). Let ssotas_\text{sota} be the best known solution and rsota=R(ssota)r_\text{sota} = R(s_\text{sota}). Then:

Definition (Discovery)“A discovery is an event where a state ss is found such that R(s)>rsotaR(s) > r_\text{sota}. The larger the difference, the more significant the discovery.” Yuksekgonul et al. 2026

Actions a∼πθ(⋅∣d,s)a\sim\pi_\theta(\cdot\mid d, s) are thinking tokens followed by code. For maths problems, the code is executed to build a construction: s′=Python(Parse(a))s' = \texttt{Python}(\texttt{Parse}(a)).

Search methods the paper compares against

Best-of-NN: independent samples, ai∼πθ(⋅∣d,s)a_i\sim\pi_\theta(\cdot\mid d, s) with s=ssotas = s_\text{sota} or an empty start.

State reuse: warm-start from a buffer of earlier solutions,

si∼reuse(Hi),ai∼πθ(⋅∣d,si),Hi+1=Hi∪{(si′,ri)}.s_i\sim\texttt{reuse}(\mathcal{H}_i),\qquad a_i\sim\pi_\theta(\cdot\mid d, s_i),\qquad \mathcal{H}_{i+1} = \mathcal{H}_i\cup\{(s'_i, r_i)\}.

State-action reuse, also called evolutionary search, as in AlphaEvolve: also feed back context cic_i distilled from earlier attempts,

si,ci∼reuse(Hi),ai∼πθ(⋅∣d,si,ci).s_i, c_i\sim\texttt{reuse}(\mathcal{H}_i),\qquad a_i\sim\pi_\theta(\cdot\mid d, s_i, c_i).

In all three the model’s weights θ\theta never change. TTT-Discover changes them.

10.3Why naive RL is the wrong tool

Plain RL at test time maximises expected reward. The paper lists three mismatches with discovery Yuksekgonul et al. 2026:

  • Objective. “Naive RL optimizes average performance, and is indifferent to the state of the art.” If the record kernel runs in 2000 µs, reaching 1900 µs may need a breakthrough, yet earns almost the same reward.
  • Short horizon. Starting every attempt from scratch limits how far one attempt can go. Reusing solutions extends it.
  • Exploration. Optimizing the average makes the policy collapse “to safe, high-reward actions rather than risky ones that might achieve discovery.”

10.4The two ingredients

An entropic objective that chases the maximum

Jβ(θ)  =  Es∼reuse(H)[log⁡ Ea∼πθ(⋅∣s)[eβ(s)R(s,a)]]J_\beta(\theta) \;=\; \mathbb{E}_{s\sim\texttt{reuse}(\mathcal{H})}\Big[\log\,\mathbb{E}_{a\sim\pi_\theta(\cdot\mid s)}\big[e^{\beta(s)R(s,a)}\big]\Big]
∇θJβ(θ)  =  Es∼reuse(H),  a∼πθ(⋅∣s)[wβ(s)(a) ∇θlog⁡πθ(a∣s)],wβ(s)(a)=eβ(s)R(s,a)Eπθ(⋅∣s)[eβ(s)R(s,a)]\nabla_\theta J_\beta(\theta) \;=\; \mathbb{E}_{s\sim\texttt{reuse}(\mathcal{H}),\;a\sim\pi_\theta(\cdot\mid s)}\Big[w_{\beta(s)}(a)\,\nabla_\theta\log\pi_\theta(a\mid s)\Big],\qquad w_{\beta(s)}(a) = \frac{e^{\beta(s)R(s,a)}}{\mathbb{E}_{\pi_\theta(\cdot\mid s)}\big[e^{\beta(s)R(s,a)}\big]}

Advantages are shaped with a KL penalty toward the starting policy:

A(a;s)  =  wβ(s)(a)  −  1  −  λ log⁡πθ(a∣s)πθ0(a∣s),A(a; s) \;=\; w_{\beta(s)}(a) \;-\; 1 \;-\; \lambda\,\log\frac{\pi_\theta(a\mid s)}{\pi_{\theta_0}(a\mid s)},

The −1-1 is a baseline, since E[w]=1\mathbb{E}[w]=1. “As β→∞\beta\to\infty, the entropic objective tends to the max.” A fixed β\beta was hard to tune across tasks, so β(s)\beta(s) is set adaptively per starting state by limiting the KL of the induced policy. The KL coefficient λ\lambda is 0.1 (0.01 for algorithm engineering) Yuksekgonul et al. 2026.

PUCT to choose where to start

Each state in the buffer is scored as

score(s)  =  Q(s)  +  c⋅P(s)⋅1+T1+n(s),\text{score}(s) \;=\; Q(s) \;+\; c\cdot P(s)\cdot\frac{\sqrt{1+T}}{1+n(s)},
  • Q(s)Q(s) is the maximum reward among children of ss, not the mean: “we care about the best outcome starting from a state, not the average”.
  • P(s)P(s) grows with ss’s rank by reward.
  • n(s)n(s) counts how often ss or its descendants were expanded.
  • TT is the total number of expansions, and cc the exploration coefficient Yuksekgonul et al. 2026.

TTT-Discover

Recipe 10.1 · Yuksekgonul et al. 2026

You will need

  • One problem with a continuous, verifiable reward (0 for invalid solutions)
  • An open model (gpt-oss-120b) trainable with LoRA rank 32, via the Tinker API
  • About US$500 of compute: 50 steps × 512 rollouts
  • A buffer of attempts, initialised with an empty or random solution

Method

  1. Pick 8 starting states from the buffer with PUCT.
  2. From each, sample a group of 64 rollouts (thinking plus code) with the current weights. Contexts are capped near 26,000 tokens to leave room for the answer.
  3. Parse or execute each action, check validity, and score its reward. Add everything to the buffer.
  4. Take one gradient step on the whole batch with the adaptive entropic objective, with importance-ratio correction for the sampler/learner mismatch.
  5. Repeat for 50 steps, and return the best state ever found.
Fair comparisonEvery result is compared with Best-of-25,600 using the same model and sampling budget, and with OpenEvolve (an open AlphaEvolve) under the same budget Yuksekgonul et al. 2026.

10.5Results: every problem attempted

Erdős min. overlap ↓TriMul A100 ↓TriMul H100 ↓AtCoder AHC039 ↑Denoising ↑
Best human0.3809274531 µs1371 µs566,9970.64
Previous best AI0.380924N/AN/A558,026N/A
TTT-Discover0.3808762198 µs1161 µs567,0620.71

Table 10.1 Headline results from the first page of Yuksekgonul et al. 2026.

Mathematics

Erdős’ minimum overlap problem (1955): split {1,…,2n}\{1,\dots,2n\} into two halves AA and BB of size nn. Let MkM_k count solutions of ai−bj=ka_i - b_j = k, and let M(n)=min⁡A,Bmax⁡kMkM(n) = \min_{A,B}\max_k M_k. The goal is to bound c=lim⁡n→∞M(n)/nc = \lim_{n\to\infty} M(n)/n. Before AlphaEvolve the bounds were 0.379005<c<0.3809270.379005 < c < 0.380927, and AlphaEvolve lowered the upper bound to 0.380924 Yuksekgonul et al. 2026.

Figure 2 from Yuksekgonul et al. 2026
Fig. 10.2Figure 2 in Yuksekgonul et al. 2026

We show the normalized step functions including the prior state-of-the-art from AlphaEvolve. The step function f(x)f(x) is the limiting density of set AA. Unlike the previous state-of-the-art, the solution from TTT-Discover is an asymmetric construction. TTT-Discover found a 600-piece step function, while AlphaEvolve construction was 95-piece. The best human result was a 51-piece construction.

Original figure reproduced from Yuksekgonul et al. 2026 · CC BY 4.0

TTT-Discover lowered it to 0.380876, an improvement “16 times larger than AlphaEvolve’s improvement over the previous state-of-the-art”. It did this with a 600-piece asymmetric step function, where AlphaEvolve’s was 95 pieces and symmetric, and the best human result 51 pieces. The algorithm it found uses “FFT-accelerated gradient descent combined with random hill climbing and simulated annealing” Yuksekgonul et al. 2026.

MethodModelErdős ↓AC1 ↓AC2 ↑
Best human–0.3809271.509730.9015
AlphaEvolveGemini-2.0 Pro + Flash0.3809241.505300.8962
AlphaEvolve V2Gemini-2.0 Pro + Flash0.3809241.503170.9610
ThetaEvolveR1-Qwen3-8Bn/a1.506810.9468
ThetaEvolve w/ SOTA reuseR1-Qwen3-8Bn/a1.50314n/a
OpenEvolvegpt-oss-120b0.3809651.507190.9449
Best-of-25600gpt-oss-120b0.3809061.510040.9344
TTT-DiscoverQwen3-8B0.3809321.505250.9472
TTT-Discovergpt-oss-120b0.3808761.502870.9591

Table 10.2 Mathematics. Table 2 of Yuksekgonul et al. 2026. AC1 and AC2 are the first and second autocorrelation inequalities. TTT-Discover sets a new record on Erdős and AC1, but not on AC2, where AlphaEvolve V2 still leads.

GPU kernels

MethodA100 (µs)H100 (µs)B200 (µs) [95% CI]MI300X (µs) [95% CI]
1st human4531.51371.11038.9 [1016.3, 1061.6]2515.8 [2510.9, 2520.7]
2nd human4918.52368.02362.4 [2335.7, 2389.1]5165.0 [5163.0, 5167.0]
3rd human5182.22545.71931.0 [1910.9, 1951.1]5359.3 [5343.5, 5375.1]
4th human6097.83654.82248.9 [2089.4, 2408.4]5981.4 [5978.4, 5984.4]
5th human8345.04233.16503.8 [6400.5, 6607.1]8365.1 [8347.7, 8382.5]
Best-of-256009219.75390.33254.9 [3252.5, 3257.4]4902.0 [4897.6, 4906.4]
TTT-Discover2198.21161.2914.2 [907.3, 921.1]1555.7 [1550.8, 1560.6]

Table 10.3 GPUMode TriMul (triangular matrix multiplication, used in AlphaFold). Table 4 of Yuksekgonul et al. 2026. One model was trained using only H100 runtimes, and the kernels generalized to the other GPUs. On A100 the kernel is 50% faster than the top human.

The organisers reviewed the winning kernel: it “correctly determined that the problem is memory bound because of the surrounding point-wise operations”, fusing operations, using fp16, and handing the big matmuls to cuBLAS. “This is similar to the current best human solutions, but executed on better.” On a second kernel competition, AMD MLA-Decode, TTT-Discover did not beat the top human with statistical significance Yuksekgonul et al. 2026.

Algorithms and biology

MethodGeometry (ahc039)Scheduling (ahc058)
1st human566,997847,674,723
ALE-Agent550,647848,373,282
ShinkaEvolve558,026n/a
Best-of-25600554,171772,429,752
TTT-Discover567,062848,414,228

Table 10.4 AtCoder Heuristic Contests. Table 6 of Yuksekgonul et al. 2026. Either submission would have placed first in its contest.

On single-cell RNA-seq denoising (OpenProblems), starting from the MAGIC algorithm, TTT-Discover added “gene-adaptive transform ensembling, low-rank SVD refinement, and log-space polishing”. It reached a score of 0.71 on PBMC and 0.73 on Tabula, up from MAGIC’s 0.64. The paper adds its own disclaimer that “benchmark metrics are inherently incomplete and do not guarantee biological validity”, and the reviewing biologist made the same point Yuksekgonul et al. 2026.

10.6Which ingredient matters?

Figure 4 from Yuksekgonul et al. 2026
Fig. 10.3Figure 4 in Yuksekgonul et al. 2026

Reward distributions for each ablation. We match the sampling budget across all ablations. We sample 512 rollouts in each step. For example, for Best-of-NN, we have N=50×512N = 50 \times 512 rollouts.

Original figure reproduced from Yuksekgonul et al. 2026 · CC BY 4.0

trainreuseBest runtime (µs) ↓
Best human kernel–1371.1
TTT with adaptive entropicPUCT1203.10
TTT with constant β entropicPUCT1483.83
TTT with expected rewardPUCT1985.67
No TTTPUCT2060.70
TTT with adaptive entropicε-greedy1328.89
TTT with adaptive entropicno reuse5274.03
Naive test-time RL (expected reward)no reuse5328.73
Best-of-N (no TTT)no reuse5352.36

Table 10.5 Ablations on TriMul, timed on H100. Table 8 of Yuksekgonul et al. 2026, using the authors’ evaluator. Only the full method beats the best human.

Both halves are needed. Learning without reuse barely helps, and reuse without learning stalls. “Without any test-time training, both the mean reward and the max reward stagnates” Yuksekgonul et al. 2026.

The authors’ own limits“The current form of our method can only be applied to problems with continuous rewards, and the most important direction for future work is test-time training for problems with sparse or binary rewards, or problems in non-verifiable domains.” Yuksekgonul et al. 2026

What to take from this chapter

  1. When the goal is one record-breaking answer, train on the test problem itself. The model’s own attempts are the most relevant data there is.
  2. Optimize for the maximum, not the mean: an entropic objective log⁡E[eβR]\log\mathbb{E}[e^{\beta R}] and PUCT reuse scored by the best child.
  3. Forgetting other skills hardly matters here, which shows how much the right continual learning method depends on the goal.
11

Part IV · Tasting

Did it actually learn? Continual Learning Bench

A strong model can score well without learning anything along the way. To taste continual learning you have to subtract what the system already knew.

Cooked from Asawa et al. 2026 Lichkovski & Mahdid 2026

The episode calls for method-agnostic benchmarking at 01:10:45 Lichkovski & Mahdid 2026. In June 2026, Parth Asawa, Matei Zaharia, Joseph Gonzalez and colleagues released one. The abstract says: “Continual learning, the ability of AI systems to improve through sequential experience, has attracted substantial interest, but no high-quality benchmark exists to evaluate it” Asawa et al. 2026.

11.1Why existing tests miss the point

Existing evaluations each test a proxy. Memory systems are scored on recall over past conversations. Context-compaction methods are scored on preserving full-context behaviour. Test-time-training methods are scored on loss, knowledge insertion or new-task accuracy. “These proxies do not directly test whether a system improves online by learning environment-specific latent structure across related tasks” Asawa et al. 2026.

Figure 1 from Asawa et al. 2026
Fig. 11.1Figure 1 in Asawa et al. 2026

The CL-Bench evaluation framework, illustrated via a simplified Database Exploration task. In each CL-Bench task, an agent completes a sequence of instances in a shared environment, accumulating past experience and feedback to improve over time. Tasks contain exploitable latent structure not known a priori — here, obfuscated schema conventions — which a learning agent needs to discover to improve reward (e.g. 4× less queries by Q10). Tasks may also feature concept drift: a database migration at Q20 invalidates parts of past experience, testing whether agents can adapt rather than blindly memorize.

Original figure reproduced from Asawa et al. 2026 · CC BY 4.0

11.2Vocabulary

  • A task is a sequence of problem instances.
  • An instance is one problem, such as one database question. Reward is defined per instance.
  • A step is one agent action, such as one SQL query.
  • A system is anything under test: a model plus any learning mechanism. “CL-Bench does not prescribe a specific adaptation mechanism.”
  • Variants change the environment to introduce concept drift. A schedule is the full ordered run across variants Asawa et al. 2026.

11.3What makes a good continual learning task

Three admission criteria “jointly define when measured improvement reflects online learning rather than static model capability” Asawa et al. 2026:

  1. Headroom. Initial performance must be well below the maximum, and the structure to be learned must not be recoverable from general training. Otherwise “a stronger base model and a learning system are indistinguishable”.
  2. Shared latent structure. Something discoverable, “such as codebase structure, schema conventions, opponent strategies”, must be shared across instances and never stated explicitly.
  3. Learning mechanism. Earlier instances must produce feedback that is informative for later ones: test failures, error messages, intermediate predictions.
Running example: Database ExplorationAn agent answers 40 questions about an unfamiliar SQLite database of Amazon product reviews, with a budget of 15 exploratory queries per question. The schema is deliberately obfuscated: table g2_reviews, a column vrf for verified status, and prices stored as integer cents for Electronics but float dollars for other groups. Reward is the fraction of the query budget saved. Halfway through, a migration renames tables and reformats columns, so the agent must notice which knowledge has gone stale Asawa et al. 2026.

These criteria rule out a common shortcut: you cannot build such a benchmark by chaining instances from existing benchmarks, because those instances “are designed to be diverse and independent”. Each task was designed from scratch and reviewed by two authors. Two or three domain experts per task then judged realism, reusable knowledge and learnability, spending on average 2.14 hours per review cycle Asawa et al. 2026.

Figure 3 from Asawa et al. 2026
Fig. 11.2Figure 3 in Asawa et al. 2026

CL-Bench task overview. NN is the number of instances per rollout (with each instance consisting of up to 40 steps depending on the task). Latent structure is what a learning system can discover and exploit across instances; reward is the axis along which performance is tracked.

Original figure reproduced from Asawa et al. 2026 · CC BY 4.0

The six domains are software engineering (Codebase Adaptation), database analytics (Database Exploration), epidemiological forecasting (Cohort Studies), RF spectrum monitoring (Blind Spectrum Monitoring), sales forecasting (Sales Prediction) and strategic gaming (Exploitable Poker). Codebase Adaptation and Sales Prediction run agents in a persistent terminal with full shell access Asawa et al. 2026.

11.4The metrics

A system processes instances x1,…,xNx_1,\dots,x_N and receives rewards rtr_t. A stateless system uses only the current instance, πt=π(xt)\pi_t = \pi(x_t). A stateful one also uses the history Ht−1={(xi,ri)}i=1t−1\mathcal{H}_{t-1} = \{(x_i, r_i)\}_{i=1}^{t-1}, so πt=π(xt,Ht−1)\pi_t = \pi(x_t, \mathcal{H}_{t-1}). The task reward is the stateful system’s total:

rsf  =  ∑t=1Nrtsf.r^{sf} \;=\; \sum_{t=1}^{N} r^{sf}_t .

A rising curve is not enough, because difficulty varies between instances and between systems: “A generically strong system may produce high reward with no learning at all while a weaker system that exploits prior experience may show lower absolute reward but actually improves over time.” Hence gain: run the same system statelessly on the same instances and subtract.

gt  =  rtsf−rtsl,g  =  ∑t=1Ngt.g_t \;=\; r^{sf}_t - r^{sl}_t, \qquad g \;=\; \sum_{t=1}^{N} g_t .

“Whatever makes instance tt intrinsically easy or hard for a given system appears equally in both terms. The difference isolates only the contribution of the accumulated state” Asawa et al. 2026.

Figure 4 from Asawa et al. 2026
Fig. 11.3Figure 4 in Asawa et al. 2026

Overview of the gain metric. We compute the difference between a system’s stateful performance on task instances vs. its performance if it had seen each instance independently. This allows us to isolate the performance improvement due to learning from prior experience.

Original figure reproduced from Asawa et al. 2026 · CC BY 4.0

Each task specifies a maximum average reward rmaxr_\text{max}, which lets scores be compared across tasks. Normalized gain divides by the system’s own headroom:

g^  =  rˉsf−rˉslrmax−rˉsl,\widehat{g} \;=\; \frac{\bar r^{sf} - \bar r^{sl}}{r_\text{max} - \bar r^{sl}},

and normalized reward uses a fixed external reference, the stateless reward of GPT-5.4 with ICL, so that a system’s score “does not change as new systems are added”:

r^  =  rˉsf−rexternalrmax−rexternal.\widehat{r} \;=\; \frac{\bar r^{sf} - r_\text{external}}{r_\text{max} - r_\text{external}} .

11.5The results

The systems tested were full-context ICL; ICL Notepad (the agent maintains its own notes); Mem0 (automatic memory extraction with top-10 retrieval); ACE (a playbook of memories updated after each instance); and Claude Code and Codex run headless with automatic context compaction. Models were Claude Opus 4.7, Claude Sonnet 4.6, Gemini 3.1 Pro, Gemini 3 Flash and GPT-5.4, each averaged over 5 rollouts per task Asawa et al. 2026.

RankSystemModelNorm. reward (%)Norm. gain (%)Cost ($)
1ICLClaude Sonnet 4.622.3 ± 4.125.4 ± 3.630.4
2ICLGPT-5.420.1 ± 9.120.1 ± 9.118.4
3Claude CodeSonnet 4.619.0 ± 7.123.9 ± 5.738.6
4Mem0GPT-5.415.1 ± 6.420.2 ± 5.918.3
5ICLClaude Opus 4.710.2 ± 4.419.5 ± 4.149.6
6ICL NotepadGPT-5.48.0 ± 3.37.8 ± 3.014.3
7ICLGemini 3 Flash8.0 ± 4.716.4 ± 3.87.6
8CodexGPT-5.46.614.627.2
9ACEGPT-5.44.6 ± 2.78.6 ± 2.562.8
10ICL NotepadClaude Sonnet 4.63.5 ± 5.718.2 ± 3.431.5
11ICL NotepadGemini 3.1 Pro−0.2 ± 3.49.4 ± 3.013.3
12ICLGemini 3.1 Pro−5.6 ± 4.16.2 ± 3.815.2

Table 11.1 “ICL is a strong baseline continual learning system.” Table 1 of Asawa et al. 2026. Averages over the six tasks, with 95% CIs from per-task rollout variance (none for Codex). Cost is the mean total rollout cost across tasks in USD. The live leaderboard at continual-learning-bench.com may have changed since.

Simple wins. Full-context ICL with Sonnet 4.6 has both the highest reward and the highest gain. Dedicated memory systems “do poorly relative to their cost”: ACE ranks tenth by gain at the highest cost. The same Sonnet model with a Notepad drops to sixth by gain, which shows “the choice of learning medium matters as much as the underlying model” Asawa et al. 2026.

Figure 5 from Asawa et al. 2026
Fig. 11.4Figure 5 in Asawa et al. 2026

Learning curves across all six tasks for the top-ranked system (ICL + Claude Sonnet 4.6). Solid lines show mean reward per instance when stateful; dashed lines show the same system run statelessly. The gap between lines isolates the contribution of learning from experience to performance. Sales Prediction and BSM show the largest and earliest-forming gaps; whereas Database Exploration is notable for the frequency with which stateless reward collapses to zero in contrast to stateful; Cohort Studies, Codebase, and Poker show minimal gain throughout with both curves overlapping.

Original figure reproduced from Asawa et al. 2026 · CC BY 4.0

Learning looks different in each task. Sales Prediction and Blind Spectrum Monitoring show early, clear gaps. In Database Exploration the gain shows up mostly as the stateless system’s reward “collapses to zero” while the stateful one keeps a floor. In Cohort Studies, Codebase and Poker the two curves overlap. In Cohort Studies, “experts validated the learnability of the latent structure but no evaluated system currently extracts it, appearing misled by spurious correlations” Asawa et al. 2026.

Figure 6 from Asawa et al. 2026
Fig. 11.5Figure 6 in Asawa et al. 2026

Aggregate Pareto views of the public CL-Bench leaderboard. We compare the normalized reward against the rollout cost and the normalized gain against the rollout cost. Black lines connect configurations not dominated by another configuration on the plotted axes. Model names that start with solely G are shorthand for Gemini models.

Original figure reproduced from Asawa et al. 2026 · CC BY 4.0

On cost, “no dedicated memory system dominates ICL on either cost axis”. ICL with Gemini 3 Flash gives 16.4% gain at $7.6 per run. Claude Code is the one clear exception on the frontier, with 23.9% gain and the strongest single-task gains on Sales Prediction (65.1%) and Database Exploration (43.6%) Asawa et al. 2026.

Stability and plasticity, measured

Variant boundaries give a natural split. Gain on the first instance of a new variant measures stability: transferring old knowledge before any feedback in the new variant. Gain within a variant measures plasticity: adapting to new information Asawa et al. 2026.

Figure 7 from Asawa et al. 2026
Fig. 11.6Figure 7 in Asawa et al. 2026

Decomposition of normalized gain into stability and plasticity terms. Normalized gain for each system and agent decomposed into (1) a stability term that measures how effective the agent is at re-using previously acquired information and (2) a plasticity term that measures how effective the agent is at incorporating new information to perform tasks.

Original figure reproduced from Asawa et al. 2026 · CC BY 4.0

ICL Notepad with Sonnet 4.6 shows the most stable learning. ICL and Claude Code are the most plastic. ACE and GPT-5.4 with ICL show “virtually no stable learning”: their gains come from repeated exposure to the same variant, “offset by information loss after switches to new variants” Asawa et al. 2026.

11.6Try it yourself

The benchmark is open source (Apache-2.0). From the repository README Asawa et al. 2026:

git clone https://github.com/pgasawa/continual-learning-bench
uv sync --all-extras && source .venv/bin/activate
clbench run exploitable_poker --schedule quick_test --system icl

It needs Python 3.13+, uv and Docker. Tasks live in src/tasks/ and systems in src/systems/. The harness runs multi-episode rollouts and records traces. The paper invites contributions: “We expect CL-Bench to be a continuously improving benchmark, leveraging the open-source community to add more varied and challenging tasks.”

The authors’ own limitsSix domains do not cover all real-world continual learning. Sequences are tens of instances long, shorter than real deployments. Only context-based memory paradigms were evaluated: “we do not evaluate parametric approaches such as test-time training”, the methods of Chapters 6–10. Tasks need frontier-level models, so failure modes of smaller models may not show up Asawa et al. 2026.

“Naive ICL outperforms dedicated memory architectures on most tasks, and even the best system achieves only 25.4% normalized gain over its stateless baseline. Accumulated state frequently hurts rather than helps.”

Asawa et al. 2026, Conclusion

What to take from this chapter

  1. Measure learning, not capability: gain =rsf−rsl= r^{sf} - r^{sl}, the same system with and without its memory, on the same instances.
  2. Good tasks need headroom, hidden shared structure, and feedback that teaches. Chained independent benchmarks will not do.
  3. Today, keeping the whole history in context beats engineered memory, and even the best system captures only about a quarter of the available headroom.
12

Part IV · Tasting

Usable information

Shannon says processing data cannot create information. For a learner with limited computation it can, and that changes how to think about what learning from experience adds.

Cooked from Xu et al. 2020 Lampinen et al. 2025

This last technical chapter is theory, and it explains a pattern you have now seen several times. In Chapter 7, fine-tuning on a model’s own in-context inferences improved generalization, even though those inferences added no new facts. Lampinen et al. explain this with a 2020 paper: “computation can increase the accessibility of information” Lampinen et al. 2025. That paper is Yilun Xu, Shengjia Zhao, Jiaming Song, Russell Stewart and Stefano Ermon’s theory of usable information Xu et al. 2020.

12.1The puzzle

“Consider a dataset of encrypted messages intercepted from an opponent. According to information theory, these encrypted messages have high mutual information with the opponent’s plans. Indeed, with infinite computation, the messages can be decrypted and the plans revealed.”

Xu et al. 2020

Shannon’s theory assumes an observer with unlimited computation. Real learners, people and neural networks alike, have limits. The paper proposes a measure of information that accounts for “the modeling power and computational constraints of the observer” Xu et al. 2020.

12.2Definitions

Predictive family. Let Ω={f:X∪{∅}→P(Y)}\Omega = \{f: \mathcal{X}\cup\{\varnothing\}\to\mathcal{P}(\mathcal{Y})\} be all ways to map side information (or nothing, ∅\varnothing) to a distribution over outcomes. A subset V⊆Ω\mathcal{V}\subseteq\Omega is a predictive family if it satisfies optional ignorance:

∀f∈V,  ∀P∈range(f),    ∃f′∈V   s.t.   ∀x∈X,  f′[x]=P,  f′[∅]=P.\forall f\in\mathcal{V},\;\forall P\in\mathrm{range}(f),\;\;\exists f'\in\mathcal{V}\;\text{ s.t. }\;\forall x\in\mathcal{X},\; f'[x] = P,\; f'[\varnothing] = P .

In words, the observer can always choose to ignore the side information. V\mathcal{V} is the set of models the agent is allowed to use, “e.g., due to computational or statistical constraints”.

Predictive conditional V\mathcal{V}-entropy is the best expected log-loss achievable within the family:

HV(Y∣X)  =  inf⁡f∈V  Ex,y∼X,Y[−log⁡f[x](y)],HV(Y∣∅)  =  inf⁡f∈V  Ey∼Y[−log⁡f[∅](y)].H_\mathcal{V}(Y\mid X) \;=\; \inf_{f\in\mathcal{V}}\;\mathbb{E}_{x,y\sim X,Y}\big[-\log f[x](y)\big], \qquad H_\mathcal{V}(Y\mid\varnothing) \;=\; \inf_{f\in\mathcal{V}}\;\mathbb{E}_{y\sim Y}\big[-\log f[\varnothing](y)\big].

Predictive V\mathcal{V}-information from XX to YY is how much the side information helps:

  IV(X→Y)  =  HV(Y∣∅)  −  HV(Y∣X)  \boxed{\; I_\mathcal{V}(X\to Y) \;=\; H_\mathcal{V}(Y\mid\varnothing) \;-\; H_\mathcal{V}(Y\mid X) \;}

Compare it with Shannon’s mutual information, which is the same formula with the unrestricted family Ω\Omega:

I(X;Y)  =  H(Y)−H(Y∣X)  =  HΩ(Y)−HΩ(Y∣X).I(X;Y) \;=\; H(Y) - H(Y\mid X) \;=\; H_\Omega(Y) - H_\Omega(Y\mid X).

12.3Familiar quantities as special cases

Choosing V\mathcal{V} recovers well-known measures (Proposition 1) Xu et al. 2020:

  • V=Ω\mathcal{V} = \Omega: Shannon entropy, conditional entropy and mutual information.
  • Laplace-like densities ∝e−∥y−μ∥2\propto e^{-\|y-\mu\|_2} with free mean: V\mathcal{V}-entropy is the mean absolute deviation, up to a constant.
  • Gaussians N(μ,12I)\mathcal{N}(\mu, \tfrac12 I) with free mean: V\mathcal{V}-entropy is the trace of the covariance, tr(Cov(Y))\mathrm{tr}(\mathrm{Cov}(Y)), up to a constant.
  • Gaussians whose mean is a linear function of xx: V\mathcal{V}-information equals the unnormalised coefficient of determination, R2⋅tr(Cov(Y))R^2\cdot\mathrm{tr}(\mathrm{Cov}(Y)).

12.4Properties

Three good properties carry over from Shannon (Proposition 2):

  • Monotonicity: if V⊆U\mathcal{V}\subseteq\mathcal{U}, then HV(Y)≥HU(Y)H_\mathcal{V}(Y)\ge H_\mathcal{U}(Y) and HV(Y∣X)≥HU(Y∣X)H_\mathcal{V}(Y\mid X)\ge H_\mathcal{U}(Y\mid X).
  • Non-negativity: IV(X→Y)≥0I_\mathcal{V}(X\to Y)\ge 0.
  • Independence: if XX is independent of YY, then IV(X→Y)=IV(Y→X)=0I_\mathcal{V}(X\to Y) = I_\mathcal{V}(Y\to X) = 0.

One famous property deliberately breaks. The data processing inequality says no function tt of the data can add information: I(t(X);Y)≤I(X;Y)I(t(X);Y)\le I(X;Y). For usable information it can fail. With tt a decryption algorithm and V\mathcal{V} a class of natural-language models:

IV(t(X)→Y)  >  IV(X→Y)  ≈  0.I_\mathcal{V}\big(t(X)\to Y\big) \;>\; I_\mathcal{V}(X\to Y) \;\approx\; 0 .

“Because of this key difference between V\mathcal{V}-information and Shannon information, machine learning practices such as representation learning can be justified in the information theoretic context” Xu et al. 2020. Learning good features creates usable information.

It is also asymmetric. If hh is a one-way function, easy to compute and hard to invert, then IV(X→h(X))≫IV(h(X)→X)I_\mathcal{V}(X\to h(X)) \gg I_\mathcal{V}(h(X)\to X). That matches the intuition, used in causal discovery, that causes predict effects more easily than the reverse Xu et al. 2020.

Finally, because V\mathcal{V} is restricted, V\mathcal{V}-information “can be reliably estimated from data even in high dimensions with PAC-style guarantees”, unlike Shannon mutual information, which is notoriously hard to estimate for continuous high-dimensional variables Xu et al. 2020.

12.5A picture: usable information between video frames

Take Moving-MNIST videos (two digits moving with random dynamics, 20 frames each) and use a conditional PixelCNN++ as the family V\mathcal{V}. Usable information between two frames falls as they get further apart Xu et al. 2020:

Figure 1(c) from Xu et al. 2020
Fig. 12.1Figure 1(c) in Xu et al. 2020

(c) The predictive V\mathcal{V}-information versus frame distance. Panel (c) of the paper’s Figure 1: frames of Moving-MNIST videos, with a conditional PixelCNN++ as the predictive family V\mathcal{V}.

Original figure reproduced from Xu et al. 2020 · arXiv non-exclusive distribution licence

A Chow–Liu tree built from these scores “perfectly recovers the relative order of the frames”. The paper then makes the motion deterministic. Now every pair of frames has the same Shannon mutual information, so a standard Chow–Liu tree cannot find the order. With the observer restricted to PixelCNN++, the order is still recovered for frame distances below 9 Xu et al. 2020. Structure that is invisible to an all-powerful observer can be visible to a bounded one.

12.6Why this belongs in a continual learning book

The link the sources themselves make is the one in Chapter 7. Reversals and syllogisms are already implied by the training documents, so the in-context inferences add no Shannon information. They do add usable information for the fine-tuned model, “making this information more explicit and thus more readily accessible at test time” Lampinen et al. 2025.

A reading for this book, not a claim of the paperThe same lens fits the other chapters. A CL-Bench schedule contains a task’s hidden structure from the first few instances, but a system only gains once it has computed features that make that structure usable (Chapter 11). A demonstration in context gives the SDFT teacher usable information the student lacks (Chapter 8). The GEPA prompts of Chapter 9 turn rollout text into usable conditioning. Continual learning is, in part, the work of turning experience into information the learner can actually use.
The authors’ own limitsThe framework depends on choosing V\mathcal{V}. The fairness experiments show that representations scrubbed against one family of adversaries can still leak information to another family Xu et al. 2020. Usable information is always relative to an observer.

What to take from this chapter

  1. IV(X→Y)=HV(Y∣∅)−HV(Y∣X)I_\mathcal{V}(X\to Y) = H_\mathcal{V}(Y\mid\varnothing) - H_\mathcal{V}(Y\mid X) measures what a bounded learner can extract.
  2. Computation can create usable information, breaking the data processing inequality. That is what representation learning does.
  3. This is why fine-tuning on a model’s own inferences helps: no new facts, but more usable ones.
∞

The episode ends on future directions at 01:30:40 Lichkovski & Mahdid 2026. This book ends the same way, but only with directions the authors themselves wrote down. Nothing on this page is a research gap invented here. Each item is quoted from a paper’s limitations or future-work section.

∞.1Where each recipe keeps the past

First, a summary of the whole book. Every method in it answers one question differently: where does knowledge from earlier experience live?

RecipeWhere the past is keptMain cost or risk, as reportedChapter
EWC / SIIn the loss: a quadratic spring on important weightsFails in class-incremental learning; diagonal Fisher underestimates uncertainty2, 4
Replay (ER, BI-R, …)In the data: stored or generated examplesMemory and storage; generative replay struggles on complex inputs4
Templates (iCaRL, generative classifier)In per-class prototypes or generatorsExtra models or stored exemplars4
Meta-learning (MLC, ACL)In the learner: a learned in-context algorithmExpensive meta-training; limited out-of-distribution transfer5
Hypernetworks (T2L, D2L)In generated adapters; base weights frozenNeeds aligned descriptions or large meta-training corpora6
Augmented fine-tuningIn weights, via the model’s own in-context inferencesExtra train-time compute; tested on synthetic data7
SDFTIn weights, updated on-policy from a self-teacherAbout 2.5× FLOPs; needs strong in-context learning8
Fast–slow trainingSplit: task detail in prompts, durable skill in weightsAlternating optimisers; one instantiation tested9
TTT-DiscoverIn weights adapted to one problem, plus a solution bufferContinuous rewards only10
Full-context ICL (CL-Bench)In the context windowCaptures at most about 25% of the available learning headroom11

Table ∞.1 A summary written for this book. Each risk is taken from the chapter that covers the method.

∞.2Open problems, in the authors’ words

Keeping what you learn across time

  • “While within-session learning was well established, between-session learning over multiple days was not robustly observed. Cultures appeared to relearn associations with each new session.” Kagan et al. 2022
  • “Although on-policy learning substantially reduces catastrophic forgetting compared to off-policy methods, some degradation of prior capabilities remains. Developing complementary techniques that further minimize forgetting represents an important avenue for future research.” Shenfeld et al. 2026

Estimating what matters

  • “It is therefore likely that the chief limitation of the current implementation is that it under-estimates parameter uncertainty.” Kirkpatrick et al. 2017

Telling apart things never seen together

  • “For learning to distinguish between classes not observed together, it might be unavoidable to use either replay … or template-based classification.” And for the task-incremental case: “positive forward or backward transfer between contexts is necessary, but achieving such positive transfer is not trivial.” van de Ven et al. 2022

Making learned learners general

  • “It remains an open challenge to build a meta-meta-learning framework to support generalization of the high-level skills for compositional learning, continual learning, few-shot learning, or multi-step reasoning abilities, across different problem settings.” Irie & Lake 2025
  • “Directly scaling ACL for real-world tasks involving many more classes does not seem straightforward: it would involve very long meta-training sequences.” Irie, Csordás & Schmidhuber 2025

Knowing what a model absorbs

  • “Further investigation of when augmentation does and does not address Negation Neglect is an interesting direction for future work.” And on its cause: “Exploration of the origins of this inductive bias is left for future work.” Mayne et al. 2026
  • On fine-tuning versus in-context learning: “future work should study more carefully the differences in how models learn and generalize in these settings, including newer reasoning models.” Lampinen et al. 2025

Learning from imperfect teachers

  • “Extending SDFT to learn from non-expert or noisy demonstrations, or from unstructured data such as user conversations, would broaden its applicability to real-world continual learning settings where high-quality supervision is scarce.” Also: “SDFT … struggles when the desired behavior requires a fundamental shift in the model’s generation patterns.” Shenfeld et al. 2026

Many channels of adaptation

  • “Studying the impact of changing the prompt or the weight optimizer is an interesting avenue for future work … we believe a more comprehensive study of [distillation-based approaches] to be an exciting avenue.” Tiwari et al. 2026
  • Doc-to-LoRA’s authors “envision that D2L can facilitate rapid adaptation of LLMs, opening up the possibility of frequent knowledge updates and personalized chat behavior.” Charakorn et al. 2026
  • Text-to-LoRA works only with good descriptions: “if the descriptions are not aligned with the task at hand, the generated LoRAs will not perform as well.” Charakorn et al. 2025

Beyond verifiable, continuous rewards

  • “The most important direction for future work is test-time training for problems with sparse or binary rewards, or problems in non-verifiable domains.” Yuksekgonul et al. 2026

Measuring all of the above

  • “We do not evaluate parametric approaches such as test-time training, though we seek to add them via community contributions.” And the headline: “continual learning in LLM-based agents remains an open problem.” Asawa et al. 2026

∞.3Where to go next

  1. Watch the full episode Lichkovski & Mahdid 2026, and fill in the “five desirable aspects” from 00:20:10.
  2. Reproduce the EWC result on permuted MNIST with the hyperparameters in Table 2.1, then run the same code class-incrementally and watch it fail, as Table 4.1 predicts. The three-types authors released their code under the MIT licence at github.com/GMvandeVen/continual-learning van de Ven et al. 2022.
  3. Run a CL-Bench task with the command in Chapter 11, then try to beat full-context ICL.

Every source, with links and licences, is in the References.

R

Back matter

References & credits

Every source in this book, with links and licences.

Every figure in this book is an original figure from one of the works below, shown with its original caption and figure number. Equations are typeset from the papers' own definitions. Tables are transcribed from the papers. Text that is not quoted is written for this book.

  1. Yacine Mahdid (host), with Ilija Lichkovski (Prime Intellect). “What Continual Learning Actually Means feat. Ilija Lichkovski from Prime Intellect.” Learning with Yacine, 12 October 2026. Video conversation, about 1 h 30 min.

    www.yacinemahdid.com/p/what-continual-learning-actually

    Licence: All rights reserved by the publisher; thumbnail shown with credit and link.

  2. Brett J. Kagan, Andy C. Kitchen, Nhi T. Tran, Forough Habibollahi, Moein Khajehnejad, Bradyn J. Parker, Anjali Bhat, Ben Rollo, Adeel Razi, Karl J. Friston. “In vitro neurons learn and exhibit sentience when embodied in a simulated game-world.” Neuron 110(23): 3952–3969.e8, 2022.

    doi.org/10.1016/j.neuron.2022.09.001

    Licence: CC BY 4.0 (open access)

    Figures used: Fig. 1.1 (Graphical abstract), Fig. 1.2 (Figure 1), Fig. 1.3 (Figure 4), Fig. 1.4 (Figure 5), Fig. 1.5 (Figure 6), Fig. 1.6 (Figure 7)

  3. SeanCole02. “doom-neuron”: human brain cells on Cortical Labs’ CL1 playing Doom. GitHub repository, GPL-3.0.

    github.com/SeanCole02/doom-neuron

    Licence: GPL-3.0 (code). No figures reproduced.

  4. James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, Raia Hadsell. “Overcoming catastrophic forgetting in neural networks.” PNAS 114(13), 2017. arXiv:1612.00796.

    arxiv.org/abs/1612.00796

    Licence: arXiv non-exclusive distribution licence. Figures reproduced with attribution for study.

    Figures used: Fig. 2.1 (Figure 1), Fig. 2.2 (Figure 2), Fig. 2.3 (Figure 3)

  5. Gido M. van de Ven, Tinne Tuytelaars, Andreas S. Tolias. “Three types of incremental learning.” Nature Machine Intelligence 4: 1185–1197, 2022.

    www.nature.com/articles/s42256-022-00568-3

    Licence: CC BY 4.0 (open access)

    Figures used: Fig. 3.1 (Figure 1), Fig. 3.2 (Figure 2), Fig. 4.1 (Figure 3), Fig. 4.2 (Extended Data Fig. 1)

  6. Kazuki Irie, Brenden M. Lake. “Overcoming classic challenges for artificial neural networks by providing incentives and practice.” Nature Machine Intelligence (2025). arXiv:2410.10596.

    arxiv.org/abs/2410.10596

    Licence: CC BY 4.0

    Figures used: Fig. 5.1 (Figure 1), Fig. 5.2 (Figure 2), Fig. 5.3 (Figure 3)

  7. Brenden M. Lake, Marco Baroni. “Human-like systematic generalization through a meta-learning neural network.” Nature 623: 115–121, 2023.

    doi.org/10.1038/s41586-023-06668-3

    Licence: CC BY 4.0 (open access)

    The reading list linked nature.com/articles/s41586-018-0308-0, which does not resolve to this paper; the DOI above is the correct one.

    Figures used: Fig. 5.4 (Figure 1), Fig. 5.5 (Figure 4), Fig. 5.6 (Figure 2)

  8. Kazuki Irie, Róbert Csordás, Jürgen Schmidhuber. “Metalearning Continual Learning Algorithms.” Transactions on Machine Learning Research, 2025. arXiv:2312.00276.

    arxiv.org/abs/2312.00276

    Licence: CC BY 4.0

    Figures used: Fig. 5.7 (Figure 1), Fig. 5.8 (Figure 2)

  9. Rujikorn Charakorn, Edoardo Cetin, Yujin Tang, Robert Tjarko Lange. “Text-to-LoRA: Instant Transformer Adaption.” ICML 2025. arXiv:2506.06105.

    arxiv.org/abs/2506.06105

    Licence: CC BY-NC-SA 4.0

    Figures used: Fig. 6.1 (Figure 1), Fig. 6.2 (Figure 2), Fig. 6.3 (Figure 4), Fig. 6.4 (Figure 5)

  10. Rujikorn Charakorn, Edoardo Cetin, Shinnosuke Uesaka, Robert Tjarko Lange. “Doc-to-LoRA: Learning to Instantly Internalize Contexts.” arXiv:2602.15902, 2026.

    arxiv.org/abs/2602.15902

    Licence: CC BY-SA 4.0

    Figures used: Fig. 6.5 (Figure 1), Fig. 6.6 (Figure 2), Fig. 6.7 (Figure 3)

  11. Andrew K. Lampinen, Arslan Chaudhry, Stephanie C. Y. Chan, Cody Wild, Diane Wan, Alex Ku, Jörg Bornschein, Razvan Pascanu, Murray Shanahan, James L. McClelland. “On the generalization of language models from in-context learning and finetuning: a controlled study.” FoRLM Workshop, NeurIPS 2025. arXiv:2505.00661.

    arxiv.org/abs/2505.00661

    Licence: CC BY 4.0

    Figures used: Fig. 7.1 (Figure 1), Fig. 7.2 (Figure 2), Fig. 7.3 (Figure 3), Fig. 7.4 (Figure 4)

  12. Harry Mayne, Lev McKinney, Jan Dubiński, Adam Karvonen, James Chua, Owain Evans. “Negation Neglect: When models fail to learn negations in training.” arXiv:2605.13829, 2026.

    arxiv.org/abs/2605.13829

    Licence: CC BY 4.0

    Figures used: Fig. 7.5 (Figure 1), Fig. 7.6 (Figure 3), Fig. 7.7 (Figure 5), Fig. 7.8 (Figure 6), Fig. 7.9 (Figure 8), Fig. 7.10 (Figure 9)

  13. Idan Shenfeld, Mehul Damani, Jonas Hübotter, Pulkit Agrawal. “Self-Distillation Enables Continual Learning.” arXiv:2601.19897, 2026.

    arxiv.org/abs/2601.19897

    Licence: CC BY 4.0

    Figures used: Fig. 8.1 (Figure 1), Fig. 8.2 (Figure 2), Fig. 8.3 (Figure 8), Fig. 8.4 (Figure 4), Fig. 8.5 (Figure 3), Fig. 8.6 (Figure 5), Fig. 8.7 (Figure 6)

  14. Rishabh Tiwari, Kusha Sareen, Lakshya A Agrawal, Joseph E. Gonzalez, Matei Zaharia, Kurt Keutzer, Inderjit S Dhillon, Rishabh Agarwal, Devvrit Khatri. “Learning, Fast and Slow: Towards LLMs That Adapt Continually.” arXiv:2605.12484, 2026.

    arxiv.org/abs/2605.12484

    Licence: CC BY 4.0

    Figures used: Fig. 9.1 (Figure 1), Fig. 9.2 (Figure 2), Fig. 9.3 (Figure 3), Fig. 9.4 (Figure 5), Fig. 9.5 (Figure 6), Fig. 9.6 (Figure 7), Fig. 9.7 (Figure 9)

  15. Mert Yuksekgonul, Daniel Koceja, Xinhao Li, Federico Bianchi, Jed McCaleb, Xiaolong Wang, Jan Kautz, Yejin Choi, James Zou, Carlos Guestrin, Yu Sun. “Learning to Discover at Test Time.” arXiv:2601.16175, 2026.

    arxiv.org/abs/2601.16175

    Licence: CC BY 4.0

    Figures used: Fig. 10.1 (Figure 1), Fig. 10.2 (Figure 2), Fig. 10.3 (Figure 4)

  16. Parth Asawa, Christopher M. Glaze, Gabriel Orlanski, Ramya Ramakrishnan, Benji Xu, Asim Biswal, Vincent Sunn Chen, Frederic Sala, Matei Zaharia, Joseph E. Gonzalez. “Continual Learning Bench: Evaluating Frontier AI Systems in Real-World Stateful Environments.” arXiv:2606.05661, 2026. Website: continual-learning-bench.com. Code: github.com/pgasawa/continual-learning-bench (Apache-2.0).

    arxiv.org/abs/2606.05661 · Website & leaderboard · GitHub repository

    Licence: CC BY 4.0

    Figures used: Fig. 11.1 (Figure 1), Fig. 11.2 (Figure 3), Fig. 11.3 (Figure 4), Fig. 11.4 (Figure 5), Fig. 11.5 (Figure 6), Fig. 11.6 (Figure 7)

  17. Yilun Xu, Shengjia Zhao, Jiaming Song, Russell Stewart, Stefano Ermon. “A Theory of Usable Information Under Computational Constraints.” ICLR 2020. arXiv:2002.10689.

    arxiv.org/abs/2002.10689

    Licence: arXiv non-exclusive distribution licence. Figure reproduced with attribution for study.

    Figures used: Fig. 12.1 (Figure 1(c))