TL;DR
Test set contamination artificially inflates LLM benchmark scores, but simply detecting leaks doesn't tell us a model's true capabilities. This paper introduces "spiking"—intentionally contaminating training data with test examples at known rates—to calibrate statistical estimators that can accurately correct inflated scores and recover true model performance.
What Problem Does This Paper Address?
Large Language Models (LLMs) are trained on massive web-scale datasets that frequently and accidentally include the very evaluation benchmarks used to test them. This "test set contamination" makes it incredibly difficult to discern whether a model is genuinely capable or just parroting memorized answers.
While existing literature focuses heavily on detecting contamination, this paper tackles correcting the contaminated scores. Crucially, the authors address a major flaw in standard mitigation strategies: if a model primarily leaks harder questions (correlated contamination), simply throwing out suspected leaked items introduces selection bias, making the remaining test set unrepresentative and skewing the final score.
Methods
The core proposal is spiking: model developers intentionally insert a small fraction of test examples into their training data at known duplication rates. This provides a ground-truth control group used to calibrate two types of probabilistic predictors:
- Memorization Predictors: Estimate the probability that a test item was seen during training ($\hat{P}(\text{contam}|i)$). These are built on Membership Inference Attacks (MIAs) like Min-K%++ and calibrated using Platt scaling.
- Correctness Predictors: Estimate the counterfactual probability ($\hat{P}(\text{correct}|i)$)—how likely the model would be to answer correctly without contamination—by using a secondary LLM to evaluate question difficulty.
Borrowing frameworks from causal inference, the authors evaluate multiple estimators to reconstruct the clean score:
- Naive: No correction (overestimates performance).
- Inverse Propensity Weighting (IPW): Downweights or drops memorized items (fails when contamination is correlated with difficulty).
- Imputation: Replaces all outcomes with the correctness predictor's estimates.
- Combined: Dynamically routes between observed and imputed outcomes based on the memorization probability.
To validate these estimators against an absolute ground truth, the authors utilize the Hubble model suite, which features "minimal pairs" of LLMs trained identically, except one was deliberately contaminated with test sets.
Datasets
The framework was benchmarked across five prominent NLP datasets:
- WinoGrande (Coreference resolution)
- MMLU (Multi-task language understanding)
- HellaSwag (Commonsense reasoning)
- PIQA (Physical interaction QA)
- PopQA (Factoid QA)
Additionally, general Wikipedia passages were used to evaluate cross-dataset calibration transfer.
Key Insights and Ideas
- Randomization is Essential for Calibration: You cannot reliably calibrate a contamination detector without a known control population. Spiking introduces the exact randomization required for true statistical inference.
- The Selection Bias Trap: When contamination is correlated with item difficulty (e.g., a model only memorizes the hardest questions), simply dropping contaminated items makes the test look artificially easy. Imputation or combined estimation is required to fill in what the model would have scored.
- Extreme Sample Efficiency: Calibrating a memorization predictor via Platt scaling requires surprisingly little data. As few as 10 spiked examples are sufficient to achieve stable calibration.
- Cross-Dataset Generalization: A memorization predictor calibrated on one dataset (or even general Wikipedia text) transfers effectively to entirely different benchmarks. Developers don't need to spike every single benchmark individually.
Key Results
- Substantial Error Reduction: On the MMLU dataset under high random contamination, the Naive baseline overestimates accuracy by 13.1 points. The Combined estimator slashes this Root Mean Squared Error (RMSE) down to just 1.8 points.
- Handling Correlated Contamination: When difficult items are selectively contaminated, standard item-dropping (IPW) fails severely (RMSE of 22.3). However, the Imputation and Combined estimators successfully mitigate the selection bias, yielding much lower errors (RMSE of 10.5 and 15.4, respectively).
Limitations and Future Work
- Exact Duplicates Only: The simulation framework currently evaluates contamination based on exact text duplication. In the wild, contamination often takes the form of paraphrases or near-duplicates, which will require more sophisticated membership inference techniques.
- Requires Training-Side Cooperation: Spiking is a training-side intervention. It requires model developers to actively participate by inserting canaries into their data pipelines, making it less applicable for purely external, black-box auditing unless mandated by technical governance standards.
Summary updated