17.4 Contamination Issues
Evaluation contamination occurs when training or tuning data contains test items, solutions, rubrics, close paraphrases, or information produced from them. It inflates measured performance without proving transferable capability. Exact matching is one layer of defense, not a verdict.
Contamination Lineage
Assign every protected case a stable evaluation ID, normalized hash, raw-source hash, semantic cluster ID, version, and access class. The protected record includes prompt, answer, rubric, grader/judge prompt, fixtures, unit tests, tool environment, and any public aliases.
Quarantine not only the item but also:
- answer explanations, benchmark repositories, leaderboards, and solution discussions;
- translations, format conversions, perturbations, and semantic neighbors;
- private release prompts and prior production badcases;
- synthetic outputs created with the item, answer, teacher prompt, or rubric in context.
Track parent-child lineage through teacher model revision, prompts, seeds, decoding, judge/verifier versions, and rejection reasons. A generated “new” question can still be a benchmark derivative.
Detect at Multiple Representations
Use a cascade on raw, rendered, and tokenized forms:
- exact hashes after conservative normalization;
- document and substring matching;
- n-gram, MinHash/LSH, or suffix/prefix overlap;
- code AST, identifier-normalized, or test-fixture similarity;
- embedding retrieval and cluster review for semantic neighbors.
Interactive N-Gram Overlap Analysis
Text A N-Grams
- "the quick brown"
- "quick brown fox"
- "brown fox jumps"
- "fox jumps over"
- "jumps over the"
- "over the lazy"
- "the lazy dog"
Text B N-Grams
- "a quick brown"
- "quick brown fox"
- "brown fox leaps"
- "fox leaps over"
- "leaps over a"
- "over a lazy"
- "a lazy dog"
An overlap score has no universal cutoff. Calibrate the threshold on known duplicate, paraphrase, and legitimate-domain-neighbor pairs for each language, tokenizer, document length, and data type. Report precision/recall and send the uncertain band to review. A fixed number such as 13 matching tokens or 0.8 similarity is not a general boundary.
Run the scan on raw documents and again on the final rendered and tokenized corpus after filtering, chat templating, packing, and synthetic augmentation. Post-processing can introduce or expose matches that raw-document scans miss.
Decontamination Pipeline
The protected registry is versioned before data collection. Every pretraining, continued-pretraining, SFT, preference, reward-model, and synthetic manifest records the registry version it checked.
For each candidate sample:
- retain source provenance and stable sample ID;
- query exact and approximate indices;
- attach matched evaluation IDs, distances, and evidence;
- remove, quarantine, or escalate according to a declared rule;
- record the decision and all descendants so deletion propagates;
- recompute mixture weights after removal.
Split semantic clusters before train/dev/test assignment. Never tune thresholds by looking at desired benchmark scores. Keep contamination reviewers and training curators from silently overriding protected cases without an audit trail.
Dynamic and Private Evaluation
Fresh private cases, timestamped tasks, perturbations, and dynamic user prompts reduce some direct leakage. They do not guarantee contamination-free evaluation. Prompts may later be logged or published; teachers can transfer solutions; semantic templates can be known; judges can have seen rubrics; repeated online evaluation can become training feedback.
Treat dynamic benchmarks and arenas as useful changing samples, not a complete safeguard. Record item creation and first-exposure dates, system/tool access, judge version, and whether public logs are reusable. Combine stable anchors for trend measurement with protected fresh cases and product-specific private suites.
Suspicious behavior includes exact continuation of hidden text, brittle answer-label dependence, abnormal performance on known/public versus fresh variants, and performance drops under meaning-preserving transformations. These are diagnostic signals, not proof by themselves.
Reporting and Release Gate
A benchmark report states the data cutoff claim, protected-registry version, scanned manifests, representation levels, thresholds and calibration set, exclusions, residual uncertainty, and whether training providers exposed sufficient lineage. “No match found” means no match under the tested detector.
Block release claims when protected evaluation IDs or semantic neighbors entered training, when teacher/judge lineage is unavailable for material synthetic data, or when the candidate gains only on exposed cases. Rebuild from a clean manifest where feasible and evaluate on untouched siblings.
Quizzes
Quiz 1: Why are benchmark answers and rubrics protected even if prompts are removed?
They can reveal the target mapping or grading rule and can be used by a teacher to generate close variants. Training on them still leaks evaluation information.
Quiz 2: Why scan the final tokenized corpus?
Filtering, templating, packing, or synthetic transformations can create, join, or reveal matching spans. The actual model input is the final corpus, not only the raw source.
Quiz 3: Why is one n-gram threshold not universal?
Chance overlap and duplicate evidence vary with language, tokenizer, sequence length, boilerplate, and data type. Thresholds require calibrated precision/recall and review bands.
Quiz 4: Why does a dynamic benchmark not eliminate historical leakage?
Its templates, rubrics, judges, or prior prompts may already be exposed, and logs can feed future training. Dynamic collection reduces one risk but does not prove clean lineage.
References
- Golchin, S., & Surdeanu, M. (2023). Data Contamination Quiz: A Tool to Detect and Estimate Contamination in Large Language Models. arXiv:2311.06233.
- Sainz, O., et al. (2023). NLP Evaluation in Trouble: On the Need to Measure LLM Data Contamination for Each Benchmark. arXiv:2310.18018.
- Lee, K., et al. (2021). Deduplicating Training Data Makes Language Models Better. arXiv:2107.06499.