Comparing Architecture Families Fairly › Contamination and Leakage
Language AI HandbookAll chapters A comparison is only as good as its test set, and test sets leak.
Leakage is insidious because it does not announce itself. A contaminated test set produces a plausible number, often a flattering one, and the contamination is invisible unless you look for it. The defenses are therefore procedural: split at the right level, audit for overlap, vary the templates, and predeclare the selection.
Document-level splitting. Splitting at the sentence or paragraph level can leak information when fragments from one document land in different splits. Fragments from the same web page, book, or legal filing can share vocabulary, entities, and phrasing. Split so that every document lives entirely in one split. In this book's Part XX: Data Curation we cover the machinery for doing this at scale: exact and near-duplicate detection with Jaccard similarity and suffix arrays, MinHash for locality-sensitive hashing, and quality filtering thresholds.
Group the split at the level where related items could leak, such as source, conversation or document. Audit overlap when near-duplicates can cross groups.
An n-gram audit flags shared spans under a declared normalization and threshold. GPT-3's initial filtering attempted matches on 13 normalized words. Its retrospective audit used dataset-specific lengths capped at 13 and documented a filtering limitation. Report what your detector can miss.
When an audit flags similarities at or above a cutoff, lowering the cutoff keeps every already flagged item and can add others. This can catch more contamination and remove legitimate test examples too. Report the cutoff and how filtering changes test coverage.
Some synthetic retrieval evaluations reuse a small template collection. Hold out template families, vary needles and surrounding text, and disclose the generator.
Holding out templates tests transfer to new formats. Randomized targets and counterfactual needle replacements help test whether success depends on the relevant evidence.
Use validation data for configuration selection and reserve the test set for final evaluation. Report the number of tried configurations and contrasts and disclose any extra test use.
Multiplicity. Four alternatives versus one reference at four lengths on two metrics give 32 contrasts. Under all true nulls and 5% per-test error, expect 1.6 false positives. Independence would give about an 81% probability of at least one. A shared reference can induce dependence. Predeclare a primary contrast or report a multiplicity adjustment.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!