AnyLearn
All lessons
AIadvanced

Measuring Continual Learning: Scenarios, Transfer Metrics, and Honest Baselines

The same method can score 99% or 21% on one benchmark depending on what the model is told at test time. Learn the task-, domain- and class-incremental scenarios, the accuracy matrix with backward and forward transfer, and the protocol choices and baselines that make a continual learning result trustworthy.

Updated · AI-authored, review-gated · how lessons are made

Progress1 / 9

Same method, three different verdicts

A continual learning result means little until you know exactly what the model was asked to do at test time. The same method on the same data can look solved or useless depending on one protocol choice, and many published disagreements trace back to papers quietly using different ones.

Split MNIST is the standard toy benchmark: the ten digits are split into five tasks of two digits each (0 and 1, then 2 and 3, and so on), learned one after another.

Predict first

On Split MNIST, elastic weight consolidation reaches 99.06% final accuracy when the model is told which task each test image comes from (van de Ven, Tuytelaars and Tolias, Nature Machine Intelligence 2022). Predict its accuracy when the model must instead say which of the ten digits it sees.

This lesson builds the vocabulary that makes such results comparable: the three scenarios, the accuracy matrix and its transfer metrics, and the protocol details and baselines that keep a comparison honest.

Sign in free to save your progress and earn certificates.

Full lesson text

All 9 steps on one page, for reading, reference, and search.

Show

1. Same method, three different verdicts

A continual learning result means little until you know exactly what the model was asked to do at test time. The same method on the same data can look solved or useless depending on one protocol choice, and many published disagreements trace back to papers quietly using different ones.

Split MNIST is the standard toy benchmark: the ten digits are split into five tasks of two digits each (0 and 1, then 2 and 3, and so on), learned one after another.

Predict first

On Split MNIST, elastic weight consolidation reaches 99.06% final accuracy when the model is told which task each test image comes from (van de Ven, Tuytelaars and Tolias, Nature Machine Intelligence 2022). Predict its accuracy when the model must instead say which of the ten digits it sees.

This lesson builds the vocabulary that makes such results comparable: the three scenarios, the accuracy matrix and its transfer metrics, and the protocol details and baselines that keep a comparison honest.

2. The three scenarios

Van de Ven, Tuytelaars and Tolias define three scenarios by what the model must learn to map, and in particular by whether the context, meaning which task or episode an example belongs to, is known at test time.

ScenarioContext at test timeWhat the model outputsSplit MNIST version
Task-incremental (Task-IL)GivenAn answer within the given taskTold the pair, say first or second digit
Domain-incremental (Domain-IL)Not given, and not neededAn answer whose label set is shared by every contextIs the digit the first or second of its pair, which amounts to even or odd
Class-incremental (Class-IL)Not given, must be inferredAn answer from all classes seen so farWhich digit, 0 to 9

Task-IL is usually implemented with a separate output head per task. Domain-IL covers a model that must keep doing one job while the input distribution shifts, such as a recogniser moving between lighting conditions. Class-IL is the case of a classifier that keeps acquiring new categories and must choose among all of them.

Definition: In this framework a context is whatever changes over time in the data stream, usually a task. The scenario is fixed by what the model is told about it at test time.

3. Which scenario am I in?

Two questions settle it. They are about the test-time situation of your real system, not about how the training data happens to be organised.

flowchart TD
  Q1["Is the context or task given at test time?"] -->|"yes"| T["Task-incremental"]
  Q1 -->|"no"| Q2["Must the model say which context the input came from?"]
  Q2 -->|"no, labels are shared"| D["Domain-incremental"]
  Q2 -->|"yes, choose among all classes"| C["Class-incremental"]

4. The evidence across scenarios

The chart shows final accuracy, averaged over the five tasks, for representative methods in each scenario.

Split MNIST final accuracy by scenario
Task-ILDomain-ILClass-IL
%020406080100NoneEWCSILwFA-GEMReplayBI-RJoint
Source: van de Ven, Tuytelaars and Tolias, Nature Machine Intelligence 2022, Table 2 (mean of 20 seeds; A-GEM and replay store 100 examples per class)

Three patterns stand out. Almost everything works in Task-IL; even no protection scores 84.3%, because a separate head per task removes most competition. Weight regularisation (EWC, SI) and output distillation (LwF) decline sharply in Domain-IL and collapse to the no-protection level in Class-IL. Methods that replay data, stored or generated, are among the top performers in all three. The authors report the same ordering on Split CIFAR-100, where in Class-IL replay of stored examples reached 37.57% against 8.24% for EWC.

5. Why weight penalties fail when the task must be inferred

In Class-IL the model must eventually tell a 3 from a 7, but it never saw 3s and 7s in the same task. Learning task four (6 and 7) trains the output layer to prefer 6 or 7 over everything else, because during that task nothing else exists. Penalties on weights can keep the features for 2 and 3 intact and still do nothing to stop the 6 and 7 outputs from winning every comparison.

Two consequences follow:

  • The output layer becomes biased toward recent classes. Wu et al. (CVPR 2019) showed this bias in the final fully connected layer of class-incremental models and corrected it with a small bias-correction layer trained on held-out exemplars.
  • Cross-task comparisons need cross-task evidence. Only methods that present old and new classes together, through stored samples, generated samples or class templates, give the classifier anything to compare. That is why iCaRL's nearest-mean classifier and generative classifiers scored above 92% in Class-IL in van de Ven et al.'s Split MNIST table.

Key idea: Protecting what each task learned is not the same as learning how tasks relate. Class-IL requires the second, and it cannot be obtained without some form of joint exposure.

6. The accuracy matrix and transfer metrics

Final accuracy alone hides the trajectory. The standard record, from Lopez-Paz and Ranzato's Gradient Episodic Memory paper (NeurIPS 2017), is a matrix: Ri,jR_{i,j} is test accuracy on task jj after training on tasks up to ii, with TT tasks in all and bˉj\bar b_j the accuracy of the untrained model on task jj.

ACC=1T∑j=1TRT,jBWT=1T−1∑j=1T−1(RT,j−Rj,j)\text{ACC} = \frac{1}{T}\sum_{j=1}^{T} R_{T,j} \qquad \text{BWT} = \frac{1}{T-1}\sum_{j=1}^{T-1} \left(R_{T,j} - R_{j,j}\right)

FWT=1T−1∑j=2T(Rj−1,j−bˉj)\text{FWT} = \frac{1}{T-1}\sum_{j=2}^{T} \left(R_{j-1,j} - \bar b_j\right)

Backward transfer (BWT) asks how learning later tasks changed earlier ones: negative means forgetting, positive means later tasks helped. Forward transfer (FWT) asks how much earlier learning helped a task before it was trained at all.

Chaudhry et al. (ECCV 2018) added a forgetting measure that compares each old task with its best accuracy at any earlier point, not just right after it was learned:

fj=max⁡l<TRl,j−RT,jf_j = \max_{l < T} R_{l,j} - R_{T,j}

7. Computing the metrics from a run

Suppose a three-task run logged the matrix below. Rows are checkpoints after each task; columns are tasks. The metrics are a few lines of NumPy.

import numpy as np

# R[i, j] = test accuracy on task j after training on tasks 0..i
R = np.array([[0.95, 0.12, 0.10],
              [0.70, 0.94, 0.15],
              [0.62, 0.81, 0.93]])
b = np.array([0.10, 0.10, 0.10])     # accuracy of the untrained model, per task
T = len(R)

acc = R[-1].mean()
bwt = np.mean([R[-1, i] - R[i, i] for i in range(T - 1)])
fwt = np.mean([R[i - 1, i] - b[i] for i in range(1, T)])
forget = np.mean([R[:-1, j].max() - R[-1, j] for j in range(T - 1)])

print(f"ACC {acc:.3f}  BWT {bwt:+.3f}  FWT {fwt:+.3f}  forgetting {forget:.3f}")

Output:

ACC 0.787  BWT -0.230  FWT +0.035  forgetting 0.230

Task 0 fell from 0.95 to 0.62 and task 1 from 0.94 to 0.81, so the average drop is 0.23. Forward transfer is barely positive: before training, tasks 1 and 2 sat just above the 0.10 chance level.

Predict first

In this run the forgetting measure equals minus the backward transfer. In what kind of run would the two differ?

8. Protocol choices that move the numbers

Beyond the scenario, several choices change results enough that a comparison is meaningless unless they match:

ChoiceWhy it matters
Are task boundaries given during training?Many methods compute an importance estimate or snapshot at each boundary; a stream with no boundaries breaks them
Single pass or many epochs per task?Online, single-pass streams are much harder; A-GEM's authors (Chaudhry et al., ICLR 2019) argued for single-pass evaluation
How is memory counted?A generator's parameters are memory too; van de Ven et al. list stored examples and generative models as separate budgets
How much compute per step?Prabhu et al. (CVPR 2023) ran over 1,500 GPU-hours and found that under a fixed compute budget, standard methods did not beat uniform sampling from memory
How were hyperparameters chosen?Tuning on the full task sequence uses knowledge of the future; Chaudhry et al. tune on a small, disjoint set of tasks instead
Is the backbone pretrained?If pretraining data overlaps the benchmark, much of the "continual" knowledge was never learned continually

Gotcha: A method tuned with access to all tasks, evaluated in Task-IL, with unbounded epochs and an uncounted generator can post excellent numbers that say nothing about deployment.

9. Baselines that keep the field honest

The most useful papers in this area are often the ones that embarrass it. GDumb (Prabhu, Torr and Dokania, ECCV 2020) does almost nothing continual: it greedily stores a class-balanced sample of the stream and, at test time, trains a model from scratch on that memory alone. It obtained state-of-the-art accuracy, often by large margins, in almost all of the experiments the authors compared against a range of recent methods, including in the settings those methods were designed for.

A minimum honest report therefore includes:

  1. Both bounds: sequential training with no protection, and joint training on all data.
  2. A replay baseline with the same memory budget as the method.
  3. Results per scenario, stated explicitly, ideally in all three.
  4. ACC with BWT, plus accuracy on the newest task, so neither forgetting nor intransigence can hide.
  5. Memory and compute accounting, including generators and extra forward passes.
  6. Several seeds; van de Ven et al. ran each experiment 20 times and report the mean with standard error.

The final lesson applies this toolkit to large language models, where the tasks are pretraining stages and the forgetting is measured on capabilities rather than digits.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. A photo app's classifier keeps adding new product categories and must label any photo with one of all the categories learned so far. Which scenario is this?
    • Task-incremental
    • Domain-incremental
    • Class-incremental
    • None, because the categories are fixed
  2. Why does even unprotected sequential training score 84.3 percent on task-incremental Split MNIST?
    • MNIST digits are too easy to forget
    • A separate output head per task, chosen by the given task label, removes most competition between tasks
    • The network is retrained on all data at the end
    • Task-incremental learning uses a replay buffer by definition
  3. In an accuracy matrix with entries R(i, j), what does a negative backward transfer (BWT) indicate?
    • Earlier tasks lost accuracy after later tasks were learned
    • Later tasks were learned faster thanks to earlier ones
    • The model performs below chance on new tasks
    • The newest task was not learned at all
  4. What did GDumb show about many continual learning methods?
    • That weight regularisation outperforms replay in every scenario
    • That generative replay is the only method that scales
    • That training from scratch is always too expensive for continual learning
    • That a model trained from scratch on a greedily filled, class-balanced memory matched or beat them in almost all tested settings
  5. Why are elastic weight consolidation and synaptic intelligence close to the no-protection baseline in class-incremental Split MNIST?
    • They require more memory than the benchmark allows
    • They protect each task's weights but give the classifier no evidence for comparing classes from different tasks
    • Their Fisher estimates are wrong on images
    • They only work with a single pass over the data

Related lessons

AI
advanced

Fixing Forgetting: Replay, Regularisation, and Parameter Isolation

The three families of continual learning methods, taken apart: experience and generative replay, gradient projection with GEM, weight penalties from EWC and synaptic intelligence, distillation, and per-task adapters. Includes a runnable PyTorch comparison of EWC and replay, and a table for choosing among them.

9 steps·~14 min
AI
intermediate

Catastrophic Forgetting: Why Neural Networks Overwrite What They Knew

Train a network on one task, then another, and the first often collapses. This lesson shows why: shared weights and conflicting gradients, demonstrated in twenty lines of code, then the stability-plasticity dilemma, the less known loss of plasticity, and how the brain's replay suggests the fixes.

10 steps·~15 min
AI
intermediate

Learned Simulators for Robots and Cars, and How World Models Fail

How world models train and test robots and driving systems, and where they break. Covers learning to walk in an hour with DayDreamer, driving world models, ranking robot policies in a video simulator, compounding error in code, model exploitation and its defences, hallucinated physics, and why evaluation is the hardest part.

10 steps·~15 min
AI
advanced

Continual Learning in Large Language Models: Continued Pretraining, Drift, and Editing

Every stage of a language model's life trains the same weights on new data, so every stage can erase the last. Learn the continued-pretraining recipe of re-warming, re-decaying and replay, how fine-tuning erodes skills and safety, why LoRA and on-policy RL forget less, and when editing or retrieval beats training.

10 steps·~15 min