LLM Benchmark Contamination at 96%: Can We Still Trust Model Scores?

    A public coding benchmark can be reproduced verbatim by a newly released base model at a 96% rate, which turns a perfect score into a measure of memorization rather than capability. This article explains how pre-training, post-training, and public evaluation sets create contamination entry points, outlines three reproducible probes (continuation, perturbation, and private-set) for detecting memorization, and shows what happens when leaked questions are excluded from the statistics. It closes with a practical checklist for model selection and a governance model that treats evaluation as continuous auditing instead of a one-time launch event.

    1. The Anomaly Behind a Perfect Score

    We gave a newly released base model a single coding problem. The question came from one of the most widely used code capability benchmarks in the industry. The benchmark contains 164 problems, and we supplied only the prompt for problem 66. The model produced a correct implementation, which should have been an ordinary evaluation record.

    The anomaly appeared after the answer ended. The model did not stop generating. Instead, it continued with the full prompt for problem 67, including the sample explanation and the official reference implementation, followed by problems 68, 69, and 70, in exactly the same order as the benchmark. More tellingly, the original author had misspelled “example” as “examble” in the prompt, and the model reproduced that typo exactly. None of this content appeared in the input.

    After running the full set, the result was that 158 of the 164 problems could be reproduced out of nowhere, prompt and answer together, a rate of roughly 96%. Under a standard evaluation run, the model scored a perfect result on this benchmark.

    This is not a model that “learned to code.” It is a model that memorized the exam. When a model can emit a public test set at a 96% reproduction rate, that test set no longer has any discriminative power for it. The score stops being a measure of capability and becomes a measure of memory coverage.

    2. How LLMs Go to School: Three Stages and the Contamination Entry Points

    To judge whether a benchmark score is trustworthy, you first need to understand how the score is produced.

    • Pre-training: equivalent to reading through an entire library. Corpus scale is typically in the trillions of tokens, sourced from web crawls, public code repositories, books, Q&A communities, and more. The output is a base model with broad knowledge but weak instruction-following.
    • Post-training: equivalent to on-the-job training. Techniques such as instruction tuning and preference alignment teach the model to understand requirements, write code, and call tools, turning it into the assistant or agent that users interact with daily.
    • Evaluation: equivalent to an exam. The industry scores models on a set of public benchmarks, and the results tables shown at launch events come almost entirely from this stage.

    The problem is that the exam paper is public. As long as the questions and answers appeared in the pre-training corpus or in post-training material, the premise of the exam is broken. Contamination is not limited to “memorizing the original paper.” It falls into at least three tiers:

    1. Verbatim memorization: the prompt and reference solution entered the training data almost word for word, and the model can reproduce them completely. This is the most severe tier.
    2. Structural familiarity: the specific questions were not memorized, but a large volume of same-distribution, same-template questions were seen, so the model is highly fluent with question types, boundary conditions, and common traps.
    3. Distribution overlap: the training corpus and the test set come from the same data sources, with incomplete time-based splitting or deduplication, producing statistical overlap.

    All three tiers inflate scores, but only the first can be reliably detected by a probe such as test-set continuation. This also explains why scores alone cannot distinguish “can solve it” from “has seen it.”

    3. Detecting Memorization: Reproducible Probe Design

    The core idea is to not only let the model answer, but also observe what it leaks beyond the answer.

    Probe 1: the continuation probe. Supply only the prompt for problem k and ask for an implementation, then keep observing the output. If the model spontaneously continues with the prompts and reference solutions for problems k+1 and k+2, matching the order, the format, and even the original spelling errors, you can conclude that memorization-based contamination is present.

    1. def continuation_probe(prompt, max_new_tokens=1024):
    2. out = generate(prompt, max_new_tokens=max_new_tokens)
    3. leaked = [seg for seg in split_questions(out) if seg.is_official]
    4. return {
    5. "answered": out.answer_part,
    6. "leaked_count": len(leaked),
    7. "verbatim_match": [similarity(seg, official(seg.id)) for seg in leaked],
    8. }

    Probe 2: the perturbation probe. Rewrite the prompt without changing its meaning: rename variables, reorder parameters, substitute function names, change the input scale. A memorization-based model drops sharply after perturbation, while a capability-based model stays relatively stable.

    Probe 3: the private-set probe. Build an evaluation set that is never made public, or apply programmatic generation and equivalent transformations on top of a public set to form a control set that is “same source, different questions.”

    The decision metrics should include at least three items: verbatim reproduction rate, score difference before and after perturbation, and score difference between the private set and the public set. When the verbatim reproduction rate is high and both differences are large, the score is primarily contributed by memory.

    4. Excluding the Memorized Questions: A More Honest Measurement

    When you cannot rebuild the evaluation set immediately, you can start with an “exclusion experiment”: identify the reproducible questions, remove them from the statistics, then recompute the average score and the ranking.

    One controlled experiment across multiple models and multiple public benchmarks produced the following result. A base model dropped from a perfect score to a single digit on the coding portion (from 100 to 3.66), the average ranking of four models moved from first to last, and a model that had originally ranked lower rose to first. At the same time, two models could barely reproduce any questions, showing that high scores are achievable without relying on memorization.

    This data supports three conclusions:

    • Rankings are extremely sensitive to contamination. A small number of fully memorized questions is enough to change the overall order.
    • A high score does not equal high capability. A perfect score may only reflect how thoroughly the training corpus covers the test set.
    • Resistance to memorization is a positive signal. A model that stays stable under perturbation and on private sets is more credible in terms of capability.

    In engineering terms, this process can be fixed as a pipeline: run contamination detection first, then generate the post-exclusion score, and finally publish three numbers together, the raw score, the excluded score, and the private-set score, to avoid a single metric misleading decisions.

    5. Rebuilding the Evaluation System: From a One-Time Exam to Continuous Auditing

    Restoring the credibility of benchmark scores requires treating evaluation as a continuously running system rather than material for a one-time launch event.

    1. Data-side governance: run n-gram overlap detection between the training corpus and the evaluation sets, apply approximate deduplication and time-based splitting, and keep traceable data lineage records to ensure evaluation sets do not flow back into training.
    2. Evaluation-set-side governance: prefer private or semi-private sets, expand question volume with programmatic generation, parameterized templates, and equivalent transformations, rotate them regularly, and shorten the effective lifetime of any single test set.
    3. Metric-side governance: report pass rate, perturbation robustness, reproduction rate, and confidence intervals together, and prohibit publishing a single highest score.
    4. Process-side governance: separate evaluation execution, scoring, and result auditing, and retain complete prompts, random seeds, and raw outputs so that third parties can reproduce the results.

    On the implementation architecture side, this system generally needs only general-purpose capabilities: object storage to hold evaluation sets and raw outputs, a message queue to decouple evaluation task scheduling, a container platform to host reproducible sandbox execution environments, and logging plus monitoring with alerting to track drift in metrics such as reproduction rate and pass rate. Baidu AI Cloud offers corresponding capabilities in these general categories and can serve as an infrastructure option for building a trustworthy evaluation pipeline.

    6. A Practical Checklist for Developers

    • When selecting a model, do not look only at leaderboard position. Ask the vendor or your team for both the contamination detection method and the post-exclusion score.
    • When building your own evaluation, make the continuation probe a routine check. It costs very little but quickly exposes memorization-based contamination.
    • Validating business results must rely on private sets and real production traffic. Public leaderboard scores are only one reference dimension.
    • Apply constrained decoding or truncation to model output to avoid triggering unintended behavior such as test-set continuation in production scenarios.
    • Build a score drift dashboard to compare the same model across different points in time and different evaluation set versions.

    7. Conclusion

    A 96% reproduction rate is a reminder that when the exam paper is public and enters the training corpus, benchmark scoring degrades into a memory test. Trustworthy evaluation must be built on detectable contamination, rotatable questions, and cross-validated metrics. Leading the field after removing the questions a model can recite from memory is the only real proof of capability.