advanced28 min studyLesson 607 in Engineering

An overlap test measures a threat model, not the absence of contamination

Search for evaluation leakage with explicit representations and thresholds, preserve protected holdouts, and distinguish observed overlap from its causal effect on scores.

On this page

What you’ll understand

  • Define leakage targets spanning prompts, answers, paraphrases, and related source families.
  • Calculate containment and report performance on disclosed overlapping and remaining subsets.
  • Explain why a negative search or a score difference does not prove absence or causal impact.

A benchmark is meant to measure behavior on evaluation cases that have not simply become training examples. Large web corpora can contain the questions, answers, discussion pages, translations, or source documents behind those cases. Exact string search catches only part of that threat. Define what counts as contamination for the evaluation claim, document the detector's scope, and keep protected test information out of routine filter tuning so the act of improving the corpus does not quietly become another route for learning the evaluation set.

Start from the claim the benchmark is supposed to support

Inventory the evaluated unit and plausible leakage paths: full prompt-answer pairs, answer keys, long passages, code solutions, near-duplicate questions, and documents from which examples were generated. General background knowledge is not automatically equivalent to exposure to a specific test answer. State the distinction in the evaluation protocol rather than assuming one universal rule. The C4 documentation study found examples from evaluation datasets in a web corpus, while Lee and colleagues examined train-test overlap and deduplication. Those observations establish realistic leakage mechanisms, not that every shared phrase necessarily explains a model's score.

Keep raw and normalized query forms under a versioned matching process. Normalization can improve recall for punctuation or formatting changes but also erase meaningful distinctions and increase false positives. Split source families or duplicate clusters before assigning ordinary development and test partitions when those relationships would leak the target. Temporal cutoffs help only if source dates and later copies are understood; an old-looking document can have a newer edit containing benchmark material. Reserve an independent final evaluation and avoid repeatedly selecting filters or mixtures to maximize its score.

c(Q,D)=∣S(Q)∩S(D)∣∣S(Q)∣,∣S(Q)∣>0c(Q,D)=\frac{|S(Q)\cap S(D)|}{|S(Q)|},\qquad |S(Q)|>0
S is one fixed set-of-shingles representation, Q an evaluation item, and D a candidate training document. This directional containment is dimensionless. It is not symmetric Jaccard resemblance, semantic equivalence, or a calibrated probability of leakage; short queries and boilerplate require special care.↔ Scroll wide equations horizontally.

Candidate retrieval, verification, and exclusions need separate records

Use complementary mechanisms appropriate to the threat: exact substring indexes for verbatim spans, approximate candidate retrieval for edited text, and carefully evaluated methods for paraphrases or translations. Verify candidate matches against the intended overlap rule and inspect false positives. A standard instruction such as choose the best answer can occur across unrelated tasks, whereas a rare solution and its reasoning may be informative evidence. Record detector versions, thresholds, preprocessing, benchmark versions, and which training records were excluded. Near-duplicate corpus removal alone does not guarantee the evaluation boundary was examined.

A negative search is conditional on corpus coverage, representation, retrieval recall, and the chosen threat model. It cannot establish that no paraphrased or unindexed answer was seen. Evaluate the detector on known inserted overlaps where feasible, while recognizing that synthetic insertions may be easier than natural leakage. Keep benchmark content and audit artifacts under appropriate access controls so the test itself is not distributed into another training pipeline. Report limitations plainly, including undetected forms, rather than replacing a bounded engineering test with the unqualified label contamination-free.

afull=noao+ncacno+nca_{\rm full}=\frac{n_o a_o+n_c a_c}{n_o+n_c}
The fixed evaluation set is partitioned into detected-overlap o and remaining c subsets, with positive total size. n are item counts and a are accuracies under the same scoring rule. The weighted-average identity does not prove that the remaining subset is perfectly clean or that overlap caused the accuracy difference.↔ Scroll wide equations horizontally.

Report uncertainty without erasing the original benchmark

Disclose full-set results alongside a clearly defined overlap-excluded analysis when appropriate, including counts, thresholds, and uncertainty. Removing detected examples changes the test distribution; the resulting number should not silently replace the original benchmark's published metric. Overlapping items can differ in difficulty or subject matter, so higher accuracy on them is observational evidence rather than a causal estimate of memorization. Stronger causal claims need controlled training comparisons or other justified designs. Maintain a reproducible exclusion manifest so reviewers can distinguish changed data from changed scoring.

The probability lab illustrates an ideal detector's chance of missing every known overlap. Reset, explicitly set BOTH detection probability p=0.8 and n=5, predict P(K=0)=0.00032, then Play or Step. Reset and re-set BOTH p=0.5 and n=5; predict 0.03125. Edits retain t and playback highlights exact binomial counts. These are independent detection trials with a stipulated p, not searches through text or estimates from an empty report. Shared paraphrase blind spots can make all misses correlated and invalidate this reassuring independent calculation.

Separate a disclosed overlap subset from a causal conclusion

A fictional 200-item benchmark has twenty items flagged and verified under a stated overlap rule. A model answers eighteen of those twenty correctly and 122 of the remaining 180 correctly.

  1. The detected-overlap subset accuracy is 18/20=0.9. The remaining subset accuracy is 122/180≈0.6778 under the same scoring rule.

  2. Full accuracy is (18+122)/200=140/200=0.7. The weighted average 0.1×0.9+0.9×(122/180) gives the same result.

  3. Report all counts and both subset definitions. The difference does not establish the causal score gain from overlap, because the subsets may differ in difficulty and the detector may miss other leakage forms.

The result

A transparent overlap analysis preserves the original score and clarifies a narrower sensitivity analysis without certifying the remainder as uncontaminated.

Explore the model

Interactive lab

Interactive lab · probability

A negative detector report depends on its assumed recall

For EACH run Reset, set BOTH p and n, predict, then Play or Step. For n=5 known overlaps, p=0.8 gives P(K=0)=0.00032; p=0.5 gives 0.03125. Edits retain t. This iid model does not search text, measure actual retrieval recall, discover unknown overlaps, or represent shared blind spots.

A negative detector report depends on its assumed recallThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forNo detected match is evidence only within the coverage and failure model of the search that was performed.

Check your understanding

Why does higher accuracy on detected-overlap items not by itself measure the causal benefit of training contamination?

Try it yourself

A test item's fixed shingle set has twelve elements; a training document shares nine of them and has thirty shingles in total. Calculate test-item containment and Jaccard resemblance. Does either number establish answer leakage?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Containment divides by twelve; the union has 12+30−9 elements.

Compare with the solution

Containment is 9/12=0.75. Jaccard is 9/33≈0.2727. They measure different overlap relationships. Neither alone establishes answer leakage: inspect the shared content, representation, threshold, task, and whether the answer-bearing material is present under the stated threat model.

Take it with you

  • Contamination testing starts with an explicit evaluation claim and leakage threat model.
  • Negative searches are limited by representation, coverage, and detector recall.
  • Subset score differences and exclusion analyses require disclosure and do not automatically establish causality.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.