Forgetting Curves as Contamination Fingerprints

When a language model has seen a benchmark's test questions during training, its high score may reflect recall rather than skill. Most tools for catching this leakage ("contamination") read the model's token probabilities: memorized text gets suspiciously confident predictions. That signal is fragile. A recent study showed that a single epoch of reinforcement learning after contaminated fine-tuning pushes most detectors toward chance, even though the inflated accuracy remains (On The Fragility of Benchmark Contamination Detection in Reasoning Models). We propose a different kind of evidence. Instead of asking how confident the model is, we ask how its benchmark accuracy breaks when we briefly fine-tune it on nearby problems.

Continual-learning theory predicts what to look for. When a network learns a second task after a first, forgetting of the first task is often largest when the two tasks are moderately similar, not when they are most different. Moderately similar tasks reuse the same internal units but demand different outputs from them. This peak shows up mainly when the knowledge is stored in specialized, localized units, and it disappears when representations are diffuse. Memorized test answers are a natural candidate for exactly this kind of localized storage. Our hypothesis is that contaminated items show a ∩-shaped accuracy drop as we vary the similarity of a short fine-tuning probe, while genuinely solved items degrade flatly or monotonically. The shape of this forgetting curve would then be a contamination fingerprint. Because it relies on accuracy changes after weight updates rather than on raw probability gaps, it should survive the reinforcement-learning "cloaking" that defeats current detectors.

Core Claim

The claim is that the similarity profile of forgetting distinguishes memorized benchmark items from reasoned ones. Take a set of benchmark items $B$. Build probe datasets $P_s$ whose items are derived from $B$ but altered by a controlled fraction $s \in [0,1]$ of their problem structure: numbers, relations, which quantity is asked for. Each probe item keeps its correct, recomputed answer. Fine-tune a copy of the model on $P_s$ for a fixed small budget and record the drop in accuracy on the original items, $F(s)$. The original test items never appear in any probe.

For a model that solves $B$ by reasoning, training on correctly solved variants should not hurt, and may even help, so $F(s)$ stays near zero. For a model that memorized $B$, the picture changes. At small $s$, probe items reinforce the stored answers. At large $s$, they land in unrelated directions. At intermediate $s$, they share surface features with the stored items but require different outputs, which is the "conflict regime."

The analytical model of The Joint Effect of Task Similarity and Overparameterization on Catastrophic Forgetting — An Analytical Model gives a concrete curve shape to test. In two-task linear regression with a dissimilarity knob, forgetting in the wide limit scales as $\alpha^2(1-\alpha)^2$, which peaks at $\alpha = 1/2$. We therefore fit

$$F(s) = a\, s^2 (1-s)^2 + b\, s + c,$$

where $a$ measures the non-monotonic "bump," $b$ captures generic monotonic drift from fine-tuning, and $c$ is an offset. We use $\hat a$, normalized by the spread of $F$ across seeds, as the contamination score.

Prior work plays three different roles here. The mechanistic story comes from two papers. Maslow's Hammer in Catastrophic Forgetting shows that at intermediate similarity, gradient descent prefers to reuse existing units and overwrites them. A Theory of Initialisation's Impact on Specialisation shows that the peak appears only when representations are specialized; diffuse networks forget monotonically. Both are shallow-network theories on synthetic or image data. We do not assume they transfer to transformers; testing whether they do is part of the contribution. The detection framing builds on Detecting Data Contamination in LLMs via In-Context Learning (CoDeC). CoDeC disrupts memorized items with in-context examples and reads the confidence change. We replace prompt-level disruption with weight-update disruption and read accuracy, not confidence. The closest dynamic-benchmark work, CLDyB, searches for task orders that maximize forgetting in vision models. It never maps forgetting against continuous similarity and never quantifies contamination itself.

Research Program

The first component is a similarity knob for math word problems. For GSM8K (Training Verifiers to Solve Math Word Problems) and the competition sets used by the Fragility paper (AMC, Minerva Math, OlympiadBench), we parse each problem into a computation graph, in the spirit of DyVal. We then rewrite a fraction $s$ of its nodes, at about seven levels from $s=0$ to $s=1$. At $s=0$ the problem is a paraphrase with the same answer. At $s=1$ we use same-domain problems drawn from a disjoint source. Answers are recomputed from the graph, so every probe label is correct. The knob is the analogue of the "permutation size" used for Permuted MNIST by Goldfarb et al..

The second component is a set of models with known contamination, built following the Fragility protocol. We start from Qwen2.5-7B-Instruct and inject a random half of each benchmark's test set into supervised fine-tuning, in three forms. The first is verbatim. The second is rephrased, following Rethinking Benchmark and Contamination for Language Models with Rephrased Samples, which shows that such leaks evade n-gram checks. The third is chain-of-thought solutions. We then apply clean GRPO, the reinforcement-learning method used in the Fragility study. The held-out half of each test set provides non-member items with matched difficulty, which gives item-level ground truth before and after the cloaking step.

The third component is mechanistic validation. We track how much each layer's representations change across the probe fine-tune, using centered kernel alignment (CKA, a similarity score between two sets of activations), as in Anatomy of Catastrophic Forgetting. The question is whether intermediate-$s$ probes concentrate change in a narrow set of late-layer units for member items, which would be the signature of unit reuse. Following Goldfarb's finding that the peak vanishes in low-capacity models, we repeat the study at roughly 0.5B, 1.5B and 7B parameters. We predict a weaker bump at small scale, consistent with DCR's observation that sub-1B models are memorization-limited (DCR).

Baselines

The naive reference point is chance-level detection (AUROC 0.5), together with the raw accuracy gap between member and non-member halves. That gap is an oracle quantity, available only in our controlled setting, and it bounds how much signal exists at all.

The strongest reported competitors are likelihood-based detectors from the Fragility study. LiRA reached 89.1% AUROC immediately after contaminated fine-tuning and lost about 14 points after one GRPO epoch; loss-based detection lost about 16 points, and reference-free detectors fell to near 50% (On The Fragility of Benchmark Contamination Detection in Reasoning Models). In that paper's chain-of-thought contamination setting on DeepSeek-R1-Distill-Llama-8B, ten detectors scored 50 to 58% AUROC. We rerun LiRA, loss, MIN-K% PROB (Detecting Pretraining Data from Large Language Models) and PAC (Data Contamination Calibration for Black-box LLMs) on our exact checkpoints and item splits. LiRA gets the same reference models used in Fragility.

CoDeC is the strongest prompt-based method. It reports 99.9% dataset-level AUC on pre-training membership. We found no reported result on Lacuna for CoDeC after RL post-training, so we run it ourselves, at dataset level and at the subset level we also report for our probe.

Fairness is enforced through compute. Every method gets the same item splits. Hyperparameters for all methods, including our fine-tuning budget, step count and learning rate, are tuned on a separate calibration benchmark and then frozen. We report detection quality against total GPU-hours, since our probe costs several short fine-tunes while likelihood detectors cost forward passes.

Beating the field means the following. After GRPO, our AUROC must exceed 80% in Stage I, where likelihood detectors sit near 50 to 75%. In the chain-of-thought setting, it must exceed 70%, versus the reported 50 to 58%. Before RL, it must remain within a few points of LiRA.

Three ablations isolate the key ingredient. The first uses a single intermediate-$s$ probe instead of the full curve. The second fine-tunes on unrelated same-domain data with the same step budget, which controls for generic fine-tuning noise. The third is an answer-consistent control at matched surface similarity: variants whose recomputed answer happens to equal the original. This separates the effect of output conflict from the effect of surface overlap.

Why not just…?

Why not just fine-tune once on perturbed variants and measure the accuracy drop? This is the most serious threat, and it is a strict simplification of our method. If the single-level ablation matches the full curve's AUROC, we will report that cheaper probe as the practical tool and treat the curve as a mechanistic explanation. We expect the curve to win for two reasons. First, the best $s$ is unknown in advance and should shift with model scale and contamination type, so a fixed level would need per-model tuning. Second, fitting $b$ separates the bump from the monotonic drift that any fine-tune causes, and that drift differs across models. The ablation settles which matters.

Why not just evaluate on perturbed test variants without any training? A memorized model fails altered problems, so the gap between original and perturbed accuracy is a cheap signal. The problem is that clean models are also brittle under perturbation: GPT-4 lost 13.6% on reachability when only the description order was flipped (DyVal). Brittleness therefore confounds with contamination. Rephrased-contamination training also teaches robustness to exactly these surface changes (Yang et al.). We include this gap as a baseline. Our probe measures something different: whether learning correct neighbors overwrites the original answers, which a reasoning model should not suffer.

Why not just use CoDeC, which already disrupts memorization? CoDeC reads confidence changes. The Fragility study shows RL compresses exactly such confidence gaps through clipping of the policy-update ratio, so the same cloaking could plausibly erase CoDeC's signal. That is untested, and we test it directly. If CoDeC survives RL on our checkpoints, its far lower cost makes it the better tool, and our contribution narrows to the forgetting mechanism itself.

Why not just move to contamination-free dynamic benchmarks? These help for new evaluations. However, DyVal-style generation covers formal reasoning only, and public comparisons still rest on static sets like GSM8K and MMLU. Auditing already-trained models on those sets remains necessary.

Proposed Experiments

The first decisive check is whether the curve exists in transformers at all. On the verbatim-contaminated 7B model before RL, member items should show $\hat a$ significantly above zero across five seeds, and non-member items should not. If member items show only monotonic decline, the theoretical bridge fails and the project reduces to the single-level probe.

The second check is survival under cloaking. Using item-level and 50-item-subset AUROC, we compare the probe to LiRA, loss, MIN-K%, PAC and CoDeC, before and after one and three GRPO epochs. Separately, we measure whether the inflated accuracy persists after GRPO, which distinguishes hidden contamination from erased contamination. A probe that detects only hidden contamination is the useful outcome.

The third check covers the three contamination types and model scale. We predict the bump to be strongest for verbatim leaks, present but shifted toward smaller $s$ for rephrased leaks, and weakest below 1B parameters. Together with the CKA localization result, a pattern that matches these predictions would support the claim that memorization is stored the way the specialization theory says the peak requires. A pattern that contradicts them would bound how far the shallow-network theory of non-monotonic forgetting extends to language models.