Can You Still Trust LLM Benchmark Scores Under Data Contamination?

    This article examines how data contamination inflates LLM benchmark scores, explaining how pretraining and post-training cause models to memorize test sets rather than solve problems. It introduces a reproducible "verbatim recall rate" metric, outlines practical detection methods for train-test overlap, and proposes engineering practices for trustworthy evaluation, including private holdout sets, procedurally generated tasks, execution-based grading, and standardized reporting. Readers will learn how to interpret benchmark results more critically and build evaluation pipelines that measure real capability.

    1. The Symptom: The Model Is Reciting the Exam, Not Solving It

    Give a newly released foundation model a coding problem and it answers correctly. Then it keeps going. Following the order of the original exam paper, it writes out the next question, its examples, and even the official reference answer word for word, including an obvious typo copied exactly from the source. None of these questions ever appeared in the input.

    Try the entire paper in different combinations and the result is the same: out of more than a hundred questions, the vast majority can be “recalled from nothing,” with both the question text and the answers reproduced. Yet in standard evaluations, these models typically score perfectly.

    This is not an isolated fluke. Recently, whether the goal is to assess pretraining data or post-training alignment, the same trend keeps appearing: more and more high scores come from “having seen the exam” rather than “having the ability.” To gauge how serious the problem is, it helps to first understand how large models “go to school.”

    2. The Mechanism: How Scores Get Memorized

    2.1 Pretraining: Overlap Between Corpus and Evaluation Sets

    Pretraining a large model is essentially next-token prediction over massive amounts of text. Public evaluation sets, along with their question text, examples, and reference answers, have long been scattered across the internet in the form of web pages, code repositories, tutorials, blogs, and dataset mirrors. As long as the crawl is broad enough and deduplication and filtering are not strict enough, evaluation samples enter the training corpus in nearly their original form. The model’s loss on these fragments drops sharply, which shows up as “having memorized it.”

    It is worth stressing that memorization does not imply intent to cheat. The model does not “know” it is memorizing an exam; it simply compresses high-frequency, structured, reproducible text patterns into its parameters. The problem is that evaluation rests on an implicit premise: that the questions have not been seen before. Once that premise is broken, the explanatory power of the score drops to zero.

    2.2 Post-Training: Alignment Amplifies Instruction-Answer Pairs

    Post-training usually involves two stages: supervised fine-tuning and preference alignment, with data in the form of “instruction-answer” pairs. Once evaluation questions and their standard solutions are mixed into this data, the model learns not just how to solve problems but a mapping: “when I see this kind of question, output this answer.” Compared with the diffuse memorization from pretraining, this alignment-based memorization has a higher and more stable reproduction rate and is more easily triggered during evaluation.

    2.3 Why Recitation Earns a Perfect Score

    Most coding and reasoning evaluations rely on exact match, test-case pass rates, or answer consistency. Memory-based reproduction naturally satisfies these criteria: same question text, same answer, same edge cases. As a result, evaluation scores are pushed to saturation, while the model’s generalization ability on real distributions stays unchanged.

    3. Quantification: Subtracting the Questions It Memorized

    A reproducible way to measure this is the “per-question verbatim recall rate”: for each question, provide only part of the prompt or no hint at all, and observe whether the model can continue outputting the subsequent questions and their reference answers, then compute the proportion that can be fully reproduced. Remove the reproducible questions from the evaluation set and recompute the metric on the remaining questions; the result is a lower bound close to true ability.

    In publicly documented reproduction efforts, a newly released foundation model had a recall rate above 90% on a coding paper, about 85% on general science knowledge, and about 80% on elementary school math reasoning. After subtraction, its coding score fell from a perfect score to single digits, and the average ranking of four tested foundation models dropped from first to last, while the model with a recall rate near zero rose in the rankings. This comparison shows two things: first, leaderboard positions are extremely sensitive to contamination; second, high scores can be achieved without relying on memorization, so a capability-based path does exist.

    The lesson for engineering practice is direct: no single leaderboard score should be used as a selection criterion. At a minimum, report three quantities together: the raw score, the decontaminated score, and the recall rate.

    4. Detection: Identifying Overlap Between Training and Evaluation Sets

    The goal of decontamination detection is not to prove a model has “absolutely never seen” the data, but to estimate the scale of overlap and locate the affected samples. Common techniques can be combined:

    • Exact and approximate matching: normalize the question text (remove whitespace, unify case, strip formatting markers), compute hashes, then use n-gram overlap and nearest-neighbor retrieval such as MinHash/SimHash to locate near-duplicates.
    • Membership inference and perplexity comparison: the difference in loss for the same text in a “likely seen” form versus a “constructed paraphrase” form can serve as a weak signal of memorization strength.
    • Continuation probes: give only the question prefix and let the model continue freely, then measure the reproduction rate of subsequent questions and standard answers. This is the detection method closest to the phenomenon itself.
    • Perturbation consistency: rewrite the question without changing its meaning (rename variables, reorder the narrative, change values). If the score drops off a cliff, the model is relying on surface patterns rather than the problem-solving process.

    A schematic detection pipeline can be written as:

    1. def contamination_report(model, benchmark, probe_ratio=0.2):
    2. # 1) Normalize + near-duplicate dedup to locate samples likely overlapping with the training corpus
    3. dup = near_duplicate_index(benchmark, threshold=0.9)
    4. # 2) Continuation probe: give no answer, check whether subsequent questions can be reproduced
    5. recall = continuation_recall(model, benchmark, sample=probe_ratio)
    6. # 3) Meaning-preserving perturbation to observe score stability
    7. delta = paraphrase_score_gap(model, benchmark)
    8. return {"dup_ratio": dup, "recall": recall, "perturb_gap": delta}

    A practical rule of thumb: a significantly non-zero continuation reproduction rate, a large score drop after perturbation, and a high near-duplicate ratio appearing together are enough to conclude that the evaluation result cannot be used to judge capability.

    5. Engineering Solutions for Trustworthy Evaluation

    5.1 Build a Private Holdout Set

    The evaluation set is never made public and never enters any training corpus. It consists of private questions that are small in sample size, delivered in multiple batches, and rotated regularly, combined with automated grading. The value of a holdout set lies in controllable distribution and version control; the cost is limited coverage, so it needs to be used alongside public sets.

    5.2 Dynamic and Procedurally Generated Questions

    Use templates and random seeds to generate questions in bulk: randomize variable names, values, boundary conditions, and narrative order, and compute answers with a program rather than providing them manually. Such questions offer very low memorization payoff, because the surface form differs with every sample.

    1. Template: Given an array A (random length n, random element range), count the subintervals satisfying P
    2. Generation: seed -> (n, A, constraint parameters) -> question text + reference solution + test cases
    3. Evaluation: expose only the question text, judge with test cases, do not rely on text matching

    5.3 De-Surface the Grading Method

    Prefer execution-based grading (test cases, unit test pass rates), structured output validation, and manual spot checks; reduce reliance on exact text matching. For open-ended answers, introduce multi-point scoring and consistency checks to lower the payoff from “reciting answers.”

    5.4 Make the Evaluation Pipeline Routine

    Turn decontamination detection, holdout evaluation, and perturbation robustness testing into a pipeline that triggers automatically on every model version update, store results in a database, and keep historical curves. At the same time, record corpus versions, filtering rules, and deduplication strategies so that scores can be traced back to the data state.

    5.5 Reporting Standards

    When reporting externally or internally, provide all of the following: the source of the evaluation set and whether it is public, the decontamination method and thresholds, the raw score and the score after subtraction, the recall rate, the perturbation score gap, the sample size, and confidence intervals. Scores missing these fields should be treated as incomparable.

    6. Practical Advice for Selection and Deployment

    • Build a “three-score” dashboard: raw score, decontaminated score, and private holdout score. Any anomaly should trigger a review of the corpus and evaluation configuration.
    • On the business side, build a small set of real tasks from desensitized real requests and manual annotations, update it regularly, and use it as the final arbiter.
    • Focus on stability rather than peaks: the score variance of the same model across multiple samples and multiple rewrites predicts production behavior better than a single high score.
    • Treat evaluation as data engineering: corpus cleaning, deduplication, filtering rules, and evaluation set governance are equally important. General-purpose cloud capabilities such as object storage, data processing pipelines, log services, and monitoring and alerting can link corpus versions, evaluation tasks, and metric dashboards into a closed loop.
    • Be cautious about vendor-provided scores: require disclosure of the evaluation method and decontamination strategy, and cross-validate with your own holdout set.

    7. Conclusion

    Benchmark scores themselves are not the problem; the problem is treating “having seen the question” as “being able to solve it.” When memorization can easily buy a perfect score, the only reliable response is to re-establish the premises of evaluation: questions are not public, grading looks at execution, results are reproducible, and metrics are decomposable. Achieve these four points, and scores once again become an approximation of capability rather than a reading of corpus overlap.