BM
Bashar ModallalSOFTWARE · AI · SYSTEMS
← All field notes

AI

Data Leakage and Benchmark Contamination: Why Strong AI Scores Can Mislead

A high benchmark score can hide repeated questions, future information, or test data reused during development. Learn how to design splits and audits that measure the behavior you actually need.

A glowing bridge connects two otherwise separate pools of dataset tiles.

Data Leakage and Benchmark Contamination: Why Strong AI Scores Can Mislead

Estimated reading time: 8 minutes

Read the Arabic edition.

An AI assistant scores 92% on a release test. On a new batch of real requests, it misses an exception that should have been straightforward. Before changing the model, check what the release test actually measured. A question and its translation may have landed on opposite sides of a random split. An answer key may have been indexed into the retrieval store. A historical evaluation may have used a policy revision that did not exist when the first request arrived. Every one of those paths can make a score look stronger than the system you plan to ship.

Leakage is a property of the evaluation setup: the system, or the team selecting it, receives information the test was supposed to withhold. Benchmark contamination is a specific concern when benchmark items, solutions, or close variants enter training or another learning stage. Exposure does not prove that the system memorized an answer, and a correct answer does not prove it generalized. The practical task is to remove preventable shortcuts, then gather enough independent evidence to make the decision you care about.

State what should be new

An example can be new in one sense and familiar in another. A new customer can ask a common question about a policy the assistant is expressly supposed to retrieve. That is a valid test of grounding. The same benchmark question with its answer hidden in an indexed evaluation file is not. Decide what the system is allowed to know and what must be new: the wording, customer, document, policy version, business workflow, or time period.

Start with a sentence a reviewer can challenge: “We want to know whether the assistant applies the policy in force at the request time to cases from organizations it has not seen during tuning.” That statement fixes the unit of independence and the knowledge boundary. If the intended use is different, such as applying a new policy document to an existing account, design another slice and report its result separately. One test split rarely answers both questions.

Leakage path What sneaks across the boundary Practical check
Exact or near duplicates Copies, paraphrases, translations, or derivatives of one case Group the source family before splitting; scan cross-split matches
Temporal leakage Later policies, backfilled attributes, or labels visible too early Rebuild features and retrieval from an as-of snapshot
Public benchmark exposure Questions, solutions, discussions, or synthetic rewrites Audit available inputs and add fresh independent cases
Development feedback Release examples seen during prompt, threshold, or model selection Use a development set and keep an independent release set

The table includes several forms of evaluation leakage. Only some mean a foundation model saw a benchmark during pretraining. Treating every high score as a pretraining problem can hide an issue entirely under your control, such as a prompt example or retrieval document.

Split by the source of dependence

Randomize only after deciding what must stay together. Records from the same support ticket, document family, conversation, code repository, or customer can share wording and labels. For multilingual work, Arabic and English versions of one source belong to the same group when testing independence. The same applies to a synthetic example and the seed it rewrites. Preserve parent IDs where possible. If you have only text, use exact hashes after conservative normalization, shortlist near matches, and review whether they share the actual case. Similar wording alone is not always enough: a standard greeting appears in many independent conversations.

Keep a split manifest containing an immutable case ID, origin, group ID, language, relevant timestamps, and split assignment. The manifest is useful when someone imports an additional export or adds generated training data. A release suite that was clean last month can overlap a new training run next month without any test file changing. Review merge chains carefully: if A resembles B and B resembles C, a shared template can create a giant cluster even when A and C describe unrelated incidents. Use source ownership and business semantics to resolve candidates; avoid letting a single similarity threshold silently define independence.

flowchart TD
  A["Source records and availability timestamps"] --> B["Trace origin and group related cases"]
  B --> C["Assign groups to training, development or release test"]
  C --> D["Audit cross-split overlap"]
  C --> E["Rebuild evaluation inputs as of the cutoff"]
  D --> F["Run the frozen candidate on untouched cases"]
  E --> F
  F --> G["Report results by split, slice and exposure status"]

The two branches check different things. The overlap audit looks for shared cases and derivatives between splits. The point-in-time check asks whether the features and documents for each case were available at the time the system would have had to answer. Either branch can fail while the other passes.

Worked example: bilingual case families

Imagine 120 fictional help-desk examples created from 40 underlying cases: one English original, one Arabic translation and one paraphrase for each. An 80/20 split at the row level puts 24 rows in the test set, but a test translation can sit beside its source case in training. In the idealized case of independent 80% train assignments, a held-out row has a 96% chance that at least one of its two siblings is assigned to training. That calculation describes the split design, not an observed score, and the exact probability changes when the total split size is fixed.

Instead, assign 32 case IDs to training and eight to a holdout, keeping all three variants of each case together. Reserve a separate grouped development set if the team will tune against scores. Log both case-family and row counts. If Arabic results matter, use the Arabic variants as a reported slice and include new Arabic-authored cases to check whether translation-derived phrasing represents real usage. Compare wording variants within a held-out family for consistency; do not count them as three independent cases when summarizing uncertainty.

Suppose the random-row test scores 23/24 and the grouped test scores 18/24 in this fictional example. The gap is a prompt to inspect case mix and failure types, not proof that five answers were memorized. Matched task categories and more held-out families strengthen a comparison. The paper by Lee and colleagues provides a real example of why exact and near-duplicate overlap deserves inspection. Yang and colleagues show why rephrasing and translation can evade string matching; a translation used for a sensitivity check should therefore not be treated as an independent fresh item.

Worked example: a future policy in a historical test

A service assistant must answer a fictional request submitted on April 20. The policy available that day permits changes up to 48 hours before pickup. A revision published and effective on May 1 reduces the window to 24 hours. An April customer asks to change a pickup 36 hours away. The correct historical response is that the change is outside the permitted window. If the replay uses the current search index, it may retrieve the May revision and say yes.

Reconstruct the request timestamp, which version was effective, and when each source became available to the system. Keep separate fields for effective time and observation time. For instance, if a policy is effective April 15 but only arrives in the assistant’s index on April 23, a replay of the actual April 20 system should not silently assume it could retrieve that policy. If the business wants a second test of compliance with the newly discovered policy, label that as a different evaluation. Later corrections may be used to establish a label if that is the declared measurement design; they cannot be supplied as features or retrieved context when the production system would not have had them.

Replay with an as-of index or a manifest that constrains available versions, then inspect the retrieved document IDs and the final answer. Check an April refusal and a May acceptance using otherwise identical fictional requests. Audit both outcomes, because a hard-coded answer can do well on either date and still fail the transition. A chronological split alone does not fix a latest-state join that imports future data into every historical example.

What to do when training data are opaque

For a hosted model, you may never be able to inspect pretraining data. You can still audit what your team controls: fine-tuning files, prompt examples, cached outputs, generated datasets, and what retrieval, browsing, or tools could access during a run. Keep a test file out of each of those paths. Make a separate test if the actual product offers open-web search; a closed-book benchmark and a product with authorized search have different rules. Record the model identifier and evaluation date, and avoid interpreting a vendor’s broad cutoff as a guarantee for every data source or later model update.

If you have the training inputs, begin with exact normalized hashes and n-gram overlap, then use embeddings or semantic retrieval to surface likely paraphrases for human review. Review multilingual candidates with bilingual judgment where needed. A flagged match is evidence to inspect, not a verdict. A low overlap scan only describes the data and detector you had access to. With a black-box model, Oren and colleagues compare the likelihood of an exchangeable benchmark in its canonical order with shuffled orders under stated assumptions. That is a specialized test with access and design requirements, not something a normal chat score can substitute for.

Use fresh cases created or collected after the evaluation setup is locked, preferably from independent authors or an unexposed time window. LiveBench illustrates the value of more recent source material for limiting contamination risk; recency alone cannot rule out exposure or guarantee a fair comparison. Fresh cases can also be harder or measure slightly different skills, so compare like with like and record differences in mix. A paraphrased public item is useful as a diagnostic, but a performance drop can come from changed wording or difficulty as well as memorization.

Publish the score with its boundaries

A useful release report says what the system was allowed to see, when it was frozen, what was grouped, and how many cases remained independently held out. Report public or previously exposed scores apart from fresh holdout results. Record which rows were exact matches, possible near matches, or unresolved from limited data. If a substantial subset is removed, disclose why and how the remaining cases differ rather than silently presenting a revised headline.

Keep test labels out of the retrieval index, keep development feedback out of the release decision until the candidate is frozen, and set a rotation rule for cases that your team sees repeatedly. If reviewers exposed release failures to guide a fix, those cases become excellent regression checks, but they no longer serve as an untouched estimate of the fixed system. Budget for replacement cases and keep the old set for tracking regressions. Use confidence intervals or at least raw counts: four failures from eight independent case families deserve a different interpretation than four failures from hundreds.

A strong score is useful when you can explain what was actually new, show that the system made its decision with information it could legitimately access, and repeat the result on independently held-out cases. If any of those checks are still missing, qualify the claim before using the score to choose a model, compare vendors, or approve a release.

Primary references

YOUR TAKE

What did you think?

Choose one reaction for this article.

Was this useful?

A cookie helps limit repeat responses. Your feedback is private.

Share this noteLinkedIn ↗X ↗Email ↗

Keep exploring.