Methods & evaluation

Benchmark Data Contamination: When Test Sets Leak into Training Data

Methods & evaluation · · Published 2026-11-09

Students sitting alone at separate white desks in a classroom, writing answers on exam papers
Students taking a written test at the University of Vienna, 2005. Photo: KF, public domain, via Wikimedia Commons.

A benchmark score is meant to estimate how a system will do on inputs it has never seen. That assumption breaks if the test questions, or their answers, were part of the training data. For models trained on large scrapes of the web, this is not a hypothetical risk: popular benchmarks are published online, copied into repositories, discussed on forums and quoted in papers, and all of that text can be collected along with everything else. The problem has a name, data contamination, and it now shapes how NLP results should be read.

What counts as contamination

The clearest case is verbatim: the exact test items, with their gold labels, are in the training corpus. But contamination comes in degrees. A test question may appear without its answer, which still makes the input familiar. It may appear paraphrased, translated, or reformatted as a quiz on a study website. Sometimes only the answer key is online, in a table or a solutions file. Oscar Sainz and colleagues, in a 2023 position paper titled "NLP Evaluation in trouble", distinguish contamination during pretraining from contamination at later stages, such as instruction tuning on datasets that include benchmark training or test splits, and argue that it should be measured and reported benchmark by benchmark rather than assumed away.

There is also a quieter route. Closed models served through an API may receive benchmark items from the researchers who evaluate them, and depending on the provider's data policy those prompts can later be used for training. Simone Balloccu and colleagues ("Leak, Cheat, Repeat", EACL 2024) reviewed published evaluations of ChatGPT and documented how often test data had been sent to the model in this way.

Why it is so hard to rule out

Contamination is not new. The paper introducing GPT-3 (Brown and colleagues, 2020) already searched for 13-gram overlaps between its training data and the test sets it reported on, and acknowledged that a bug had left some overlapping material in the training data; it then reported results on "clean" subsets alongside the full ones. Documentation of the C4 corpus by Jesse Dodge and colleagues (EMNLP 2021) found examples from other NLP benchmark datasets inside that widely used web crawl.

Three things make the problem worse today. Training corpora have grown to trillions of tokens, so exhaustive checks are expensive even for those who hold the data. Many developers do not publish their training data at all, so outside researchers cannot check it, a recurring issue in the debate on what makes a model open. And benchmarks live for years: the longer a test set is public, the more copies of it circulate.

How contamination is detected

Searching the training data

When the corpus is available, the direct method is to look for overlaps: long n-grams shared between test items and training documents, or near-duplicates found with fuzzy matching. The choice of n matters. Short n-grams flag common phrases and produce false alarms; long ones miss paraphrases and translations. Overlap tells you that test text was present, not whether the model learned from it, so a good report also compares scores on the overlapping and non-overlapping parts of the test set. If the two are close, the contamination probably did little harm; if the overlapping part scores much higher, the headline figure is inflated.

Probing the model

Without the training data, researchers look for traces of memorisation in the model's behaviour, using techniques close to those described in our article on memorisation in language models.

Each method has blind spots. Completion probes miss models trained to refuse or paraphrase; probability-based scores need access to log-probabilities and have their own false positives; ordering tests need datasets whose examples are interchangeable. A negative result is therefore weaker evidence than a positive one: failing to detect contamination does not prove its absence.

What benchmark builders can do

Alon Jacovi and colleagues ("Stop Uploading Test Data in Plain Text", EMNLP 2023) set out practical rules for people who publish test sets:

How to read a result in the meantime

For anyone comparing models, a few questions go a long way. How old and how widely copied is the benchmark? Did the authors run a contamination check, and on which data? Are results on a clean subset or a newer test set reported next to the headline score? Is the gap between a model and its predecessors suspiciously large on one benchmark and ordinary elsewhere? These questions belong with the broader cautions in our guide to how NLP models are evaluated, and with the reporting habits that make results checkable, discussed in our article on reproducibility in NLP: state which benchmark version was used, when the evaluation was run, and what was done to rule out leakage.

Contamination does not make benchmarks useless. It changes what a score means: a measurement of performance on a particular, public set of questions, whose relationship to performance on new questions has to be argued for rather than assumed.

Sources