NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Did the Answer Come From the Question? Reading Benchmark Contamination Off a Model's Copy Path

When a language model answers a reading-comprehension question or a math word problem correctly, the answer can come from two places. It can be built from the passage, numbers and entities in the prompt. Or it can be recalled from training data that happened to contain that exact test item. Benchmark contamination, meaning test items that leaked into training data, is the second case passing for the first. This proposal treats that distinction as one a model's internals already track. Work on pointer-generator networks, decoders that mix copying tokens from the input with generating tokens from a vocabulary, has shown that a decoder-only model can be read as such a mixture. Its attention over the prompt behaves like a copy pointer. Its feed-forward layers, the per-token multilayer blocks where much stored knowledge lives, supply a parametric "generate from memory" distribution. We propose to measure, on the unmodified benchmark item, how much of the answer flows through the copy path from the evidence tokens. A model that is confident in the answer yet barely routes it through the evidence is flagged as having memorized it.

The opportunity is that this signal does not require editing the benchmark. Existing contamination tests either perturb items, which runs into a known trade-off between keeping the task valid and breaking memorized associations, or score raw answer likelihood, which cannot tell "easy given the context" apart from "remembered." A routing-based test reads the intact item and asks where the confidence came from. That directly targets the gap left between these two families of detectors.

Core Claim

For tasks whose answer must be derived from the prompt, label-level contamination leaves an internal signature: high answer confidence together with low copy-path routing to the evidence span. A clean model that is confident must have attended to the evidence. A contaminated one can be confident without it. We claim this signature can be read with no reference model and no perturbation. We also claim it beats likelihood-based membership tests at low contamination doses. Finally, we claim it beats black-box "remove or alter the evidence" tests, because those edits also destroy the cue that triggers the memorized recall.

Where This Sits

The mechanism comes from LargePiG. That paper shows a pretrained decoder-only model can be decoded as a pointer generator without training. It takes attention from the current token to the input as the copy distribution and the final-layer logits as the vocabulary distribution. It sets a copy probability from the Jensen-Shannon divergence between intermediate and final-layer predictions, on the observation that content tokens keep changing until the last layer. LargePiG uses this to reduce hallucination on query generation, FACTOR and SQuAD. It never considers contamination. We reuse its decomposition as a measuring instrument rather than a decoding rule. The classical formulation in Get To The Point, a learned gate mixing a vocabulary distribution with attention-weighted copying, is the conceptual template.

Two lines of work motivate the claim that memorized content lives on the "generate" side. Memorization Sinks shows verbatim memorization localizes in feed-forward neurons and can be routed into prunable sink neurons during training. That is a training-time intervention, whereas we diagnose already-trained models. LargePiG itself argues that attention is the more input-faithful pathway.

The detectors we must beat fall into two groups. Min-K%++ scores membership from vocabulary-normalized token log-probabilities, on the argument that training sequences become local maxima of the model's distribution. It never asks whether a confident token was supported by the context. ConStat detects contamination as a performance gap between an original benchmark and a rephrased reference benchmark, calibrated with clean reference models. It works at the benchmark level, treats the model as a black box, and fails if the reference models are themselves contaminated.

The Emperor's New Clothes constrains any perturbation-based design. Across 20 mitigation strategies it found that shallow edits keep fidelity above 0.9 but barely disturb memorization, while aggressive edits break memorization but drop MMLU fidelity to 0.686. A test that needs no edit sidesteps that trade-off. Finally, the contamination taxonomy in Xu et al.'s survey separates data-level leakage (questions seen without answers) from label-level leakage (question-answer pairs seen). Our method makes a falsifiable prediction about which of these it can see.

Research Program

The instrument is a per-item routing score computed under teacher forcing of the gold answer on the intact prompt. Let $E$ be the evidence span: the passage sentence containing the answer for extractive QA, or the operand numbers and entities for word problems. Let $Y$ be the answer-token positions. Let $a_{t,i}$ be the attention from position $t$ to prompt token $i$, averaged over heads in the upper half of layers. Let $g_t$ be the LargePiG copy probability at step $t$. The routing score is

$$R(x,y) = \frac{1}{|Y|}\sum_{t \in Y} g_t \sum_{i \in E} a_{t,i},$$

the expected copy-path mass that the answer draws from the evidence. The contamination statistic pairs $R$ with answer confidence $C(x,y)$, the mean Min-K%++ token score of the gold answer. We flag an item when $C$ is high and $R$ is low relative to the model's own joint distribution of $(C, R)$ on held-out clean items, such as RepliQA's fictional-entity questions, which cannot have leaked.

Some tasks derive the answer rather than copy it, as with the final number in GSM8K. For these we add one more observable: whether the gold final answer is already decodable, in the logit-lens sense of projecting intermediate hidden states through the output layer, at the last question token, before any reasoning is written. A clean model should not know the answer to an eight-step problem before computing it.

We will also train a small logistic probe on these features using contamination labels from one benchmark and test it on another. This checks whether the signature transfers or merely fits benchmark quirks.

Ground truth comes from controlled contamination. Starting from open SmolLM checkpoints at 360M and 1.7B, the scales studied in Memorization Sinks, and from LLaMA2-7B, the model used in LargePiG, we continue pretraining on a web mix. For a random half of each benchmark's test items, we inject either label-level copies or data-level copies (question only) at repetition counts of 1, 4, 16 and 64. The other half stays clean, so every item has a known label and dose. External validity comes from released models that ConStat flags. It reports a contamination gap of about 8.3% for Mistral-7b-v0.1 on GSM8K and about 6.6% for Llama-3-70b on ARC-Challenge. We test whether our item-level flags, aggregated, reproduce those orderings without any reference model.

Baselines

The naive reference point is answer loss alone: the raw log-likelihood of the gold answer given the prompt, thresholded. It is what anyone would try first, and it shows how much of the problem is "confidence equals contamination." It is run on identical items and checkpoints with the threshold chosen on the same clean calibration split. Beating it means a higher area under the ROC curve at every injection dose.

The strongest likelihood-based competitor is Min-K%++. It is reference-free like our method and reports AUROC gains of 6.2 to 10.5 points over Min-K% on WikiMIA. The file contains no absolute AUROC for it, and no reported result found on Lacuna for Min-K%++ on GSM8K, RepliQA or SQuAD contamination. We will run it on the full prompt-plus-answer and on the answer alone, with k tuned over the same grid and calibration split we use. Beating it means higher AUROC and a higher true-positive rate at 5% false-positive rate, especially at repetition counts 1 and 4, where we expect pure likelihood to confuse easy items with memorized ones.

The strongest black-box competitor is evidence ablation. We delete or replace the evidence span, for example by swapping GSM8K operands or removing the RepliQA answer sentence, and flag items whose answer survives. This is the natural item-level analogue of the perturbation strategies examined in The Emperor's New Clothes. It gets the same items and the same calibration. Beating it means higher detection at matched false-positive rate without editing the item.

At the benchmark level, ConStat reports 98.4% accuracy at detecting sample-specific contamination on the Open LLM Leaderboard, against 71% for the prior best. Its unit of decision is a model-benchmark pair, not an item, so we compare it only on the aggregated question of which models and benchmarks are contaminated. We give it the same reference models it prescribes. Matching its verdicts without references counts as success. Beating it is not expected.

Two ablations isolate the key ingredient. The first replaces the evidence span $E$ with a random prompt span of equal length. If detection survives, the signal is generic attention diffuseness, not evidence routing. The second drops the copy gate $g_t$ and keeps only attention mass, or keeps only $g_t$, which is LargePiG's divergence signal alone. This tests whether the pointer-generator combination is doing the work.

Why not just…?

Why not just use Min-K%++ on the answer tokens? Min-K%++ measures whether a token sits at a peak of the model's distribution. In context-conditioned tasks, a clean model also puts the answer at a sharp peak whenever the passage states it plainly. Likelihood therefore mixes up ease with membership. This is a hypothesis, not an established result: the file contains no evaluation of Min-K%++ on context-derived benchmarks. The dose-stratified comparison will settle it. If Min-K%++ matches our AUROC at low doses on RepliQA and SQuAD, the routing score adds nothing and we will say so.

Why not just remove or change the evidence and see whether the model still answers? This is the most serious alternative. It is simple, black-box, and directly tests source dependence. Our argument against it is mechanistic. A memorized answer is keyed to the full question string, so editing the evidence also removes the recall trigger, and a contaminated model then fails just like a clean one. That pattern is consistent with the finding in The Emperor's New Clothes that edits strong enough to change the task are also the ones that break memorized associations. Our decisive experiment compares the two at matched false-positive rates across doses. If ablation does as well, the honest conclusion is that internals are unnecessary for this question.

Why not just use ConStat or post-cutoff splits? Both answer a different question: whether this model's score on this benchmark is inflated, not which items are memorized. ConStat additionally depends on clean reference models, which may not exist once a whole generation of models shares the same leaked data. Post-cutoff splits such as LiveBench or Test of Time require new items rather than auditing existing ones. We use ConStat as an external check on aggregate verdicts. We do not try to replace it.

Why not just use LargePiG's divergence gate by itself? The gate says whether the model is making a content decision, not whether that decision drew on the evidence. The gate-only ablation tests this directly. If the gate alone matches the full score, the contribution shrinks to "LargePiG's signal also detects contamination," which is still worth reporting but is a smaller claim.

Decisive Checks

The method works if, on controlled-contamination checkpoints, the routing statistic beats both Min-K%++ and evidence ablation in AUROC at repetition counts 1 and 4 on RepliQA, SQuAD and GSM8K, and loses its advantage under the random-span ablation.

Two predictions could falsify it. First, the method should detect label-level leakage but largely miss data-level leakage, since a question seen without its answer leaves nothing to recall. Min-K%++ applied to the question tokens should catch data-level leakage instead. If our score flags data-level items equally, it is measuring prompt familiarity, not answer recall. Second, MMLU serves as a negative control. Its answers legitimately come from parametric knowledge, so clean models should also show low evidence routing, and we expect the method to fail there. If it does not fail, the evidence-span definition is leaking signal from somewhere else.

The external check is whether item-level flags, aggregated, rank Mistral-7b-v0.1 on GSM8K and Llama-3-70b on ARC-Challenge as contaminated, consistent with ConStat, while using no reference model.

A secondary test uses the same instrument in the opposite direction, on search-time contamination. Search-Time Data Contamination reports that one search agent reached 37.5% on HLE items whose answer keys it retrieved, against 17.4% on items where it found no key. Where a retrieved answer key sits in the context, the leak is the copy target. We will test whether high routing mass onto a retrieved key span, rather than onto the question, separates those cases in open-weight retrieval setups.