Independent research note · October 2026

What survives when a model learns something new?

ReplayGate: a small, reproducible experiment in continual learning, replay, and forgetting

TL;DR

A model can learn a new task and, in the process, lose something it previously knew. We tested this under a simple, controlled sequence of five classification tasks built from 1,797 real handwritten digit images. An online classifier trained only on the newest task retained just 19.0% accuracy across all previously seen digit classes at the end. Keeping a small memory of earlier examples changed the outcome: rehearsal achieved 91.3%, and a retrieval-only memory achieved 93.0%. These are measured averages across three seeded runs, not illustrative values.

The result is useful as a concrete illustration of catastrophic forgetting. It is not evidence that the same approaches improve LLMs or coding agents. The purpose here was to examine the retention–adaptation tradeoff before attempting an agent-scale evaluation.

1. The question

Suppose a system works well today, encounters a new task tomorrow, and changes how it behaves. That change might live in its model weights, in a replay buffer used during training, or in an external memory consulted at inference time. All three can help it adapt, but they preserve old abilities in different ways.

The difficulty is that performance on the latest task is not a reliable measure of continual learning. A system might score highly on its new task while failing at an old one. To see that failure rather than hide it, we need to evaluate earlier tasks again after each new training stage.

For this first experiment, we deliberately use a small real-world classification setting instead of an expensive agent benchmark. This isolates the question of retention; it does not pretend that classifying digits captures every complication of learning from agent trajectories.

2. Experimental setup

2.1 Dataset and task sequence

The data are the UCI Optical Recognition of Handwritten Digits images, loaded through sklearn.datasets.load_digits(). There are 1,797 authentic handwritten examples, each represented by 64 pixel intensities. No synthetic or handwritten-for-this-demo evaluation cases were added.

Each seed has a stratified 75% training / 25% held-out testing split. The learner sees five tasks in this fixed order:

StageNew digit classesClasses evaluated afterwards
10, 10–1
22, 30–3
34, 50–5
46, 70–7
58, 90–9

2.2 Three ways to handle past experience

Weights only. A multiclass logistic classifier receives 120 stochastic-gradient minibatch updates per stage, using only examples of the two most recent classes. It has no way to revisit earlier examples. This is our forgetting-prone baseline.

Reservoir replay. The classifier gets the same 120 parameter-update steps per stage, but can fill half a minibatch from an online reservoir of at most 160 previously encountered training examples. The reservoir samples uniformly from experience seen so far. Learning still happens in model weights, while memory supplies rehearsal data.

Exemplar memory. A distance-weighted, 3-nearest-neighbor classifier predicts labels using a reservoir of 160 real training examples. It does not use the same parameter-update process. This makes it a useful retrieval-only reference, but not an equal-compute comparison to the other models.

We used seeds 7, 13, and 29 and evaluated every method on that seed’s untouched test split. The full Python implementation specifies the data, sampling, training loop, and evaluation procedure.

3. Findings

3.1 Learning the new task is not retaining the old ones

Figure 1. Mean accuracy on held-out examples from all classes seen so far (3 seeds). The plotted points are drawn from the recorded measurements, not invented demonstration values.

At the final stage, the weight-only model is still good at classifying the new digits, but its accuracy on the first task has dropped to 0%. This is the central failure the experiment was meant to expose: a high latest-task score can coexist with almost complete loss of earlier ability.

3.2 Memory changes the retention–adaptation balance

Final checkpoint, mean of 3 seedsAll 10 classesFirst task (0–1)Latest task (8–9)
Weights only18.96%0.00%96.97%
Reservoir replay91.33%81.32%94.70%
Exemplar retrieval92.96%99.27%79.92%

The replay model preserves much more of the first task while learning the final task reasonably well. The retrieval-only system keeps the earliest task almost intact, but scores lower on the newest one. These numbers should not be used to declare a universal winner: the methods have different computational costs and inductive biases.

4. Interpretation

A growing system has at least two separate obligations: acquire new behavior and avoid unnecessary regressions. The baseline optimizes the first with almost no protection for the second. Replay reintroduces earlier data during adaptation; exemplar retrieval avoids overwriting a learned classifier altogether.

This is a useful reminder for work on continual learning and agent memory, where it is tempting to measure only performance on the latest benchmark. A more complete evaluation should ask what happens to older tasks, whether retained information transfers to unseen situations, and what it costs in compute, storage, and inference time.

My separate coding-agent memory study examines another piece of this problem: whether earlier experiences should be promoted and exposed to later agents. That work produced a negative full-task result under the memory conditions tested. The two studies address related questions, but neither experimentally proves the other.

5. Limitations and next steps

There are important boundaries on what this experiment can support:

The next credible test would use authentic sequential agent tasks or recorded interaction trajectories, with old-task retention, unseen transfer, regression rates and cost tracked under a fixed harness. Until that experiment has been executed, it remains a research direction, not a finding.

Reproducibility. See the project folder for run.py, the run protocol and environment information, and results_summary.json for the reported measurements. The ReplayGate dashboard lets you compare all five stages interactively. It uses the same recorded values.

References

  1. UCI Machine Learning Repository. Optical Recognition of Handwritten Digits.
  2. scikit-learn documentation. load_digits dataset loader.
  3. ReplayGate source and run protocol. Independent experiment, October 2026.
  4. ReplayGate result record. Three seeded sequential runs and measured stage accuracies.