Evaluation data contamination in LLMs: how do we measure it and (when) does it matter?

Aaditya K. Singh, Muhammed Yusuf Kocyigit, Andrew Poulton, David Esiobu, Maria Lomeli, Gergely Szilvasy, Dieuwke HupkesarXiv 2024 · DOI

Abstract

Large Language Models (LLMs) are increasingly trained on massive web-scraped datasets, leading to the inevitable inclusion of evaluation benchmarks in their training data. This paper introduces ConTAM, a novel framework for detecting evaluation data contamination by grounding detection metrics in actual performance gains. The authors reveal that contamination is significantly underestimated in major LLM releases and demonstrate that larger models are far more adept at "cheating" via memorized test data than smaller ones.

Introduction

As LLMs scale, they encounter the very benchmarks used to evaluate them—a phenomenon known as evaluation data contamination. This "training on the test set" makes it impossible to tell if a model is actually smart or just reciting a memorized answer key. Defining "contamination" is surprisingly hard; previous studies used arbitrary thresholds like 13-gram overlaps. This paper argues that a sample should only be considered contaminated if that overlap actually gives the model an undue advantage.

Methodology

The authors propose the Contamination Threshold Analysis Method (ConTAM). Instead of picking a random overlap threshold, ConTAM evaluates metrics based on Estimated Performance Gain (EPG)—the difference in score between the full benchmark and the "clean" subset.

They compare four $n$-gram based metrics, summarized in the table below:

Comparison of n-gram based contamination detection methods

Among these, the novel LONGEST-MATCH metric proved most effective. By focusing on the single longest contiguous (or near-contiguous) overlapping string rather than the union of all matches, it filters out "template" noise (like "Choose the best answer:") that often plagues other metrics.

The ConTAM Framework

By plotting EPG against the percentage of data marked contaminated, the authors can visually and statistically identify which metrics and thresholds truly capture the "cheating" signal.

Estimated Performance Gain (EPG) across different thresholds and contamination percentages for various models and benchmarks.

The study evaluated 7 models across the Llama 1 and Pythia families against 13 popular benchmarks, including MMLU, GSM8k, and HumanEval.

Key Insights and Results

  • Scale Amplifies Cheating: Larger models are significantly better at leveraging contamination. While a 1.4B model might see a test question and gain nothing, a 65B model can use that same snippet to drastically inflate its score.
  • Underestimation of Impact: Contamination effects are much larger than previously reported. For Llama 65B, contamination inflated scores on HumanEval by ~18% and Big Bench Hard by ~25%.
  • Metric Sensitivity: The LONGEST-MATCH metric found significant contamination-driven performance gains in 10 out of 13 benchmarks, whereas traditional metrics often failed to find any signal in harder tasks like MATH or GSM8k.
  • Thresholds Aren't Universal: The "correct" threshold for contamination varies by both model and benchmark. A one-size-fits-all approach leads to massive false negatives.

Limitations and Future Work

The study is correlational; while ConTAM shows that "contaminated" samples have higher scores, it doesn't strictly prove the model wouldn't have gotten them right anyway. Furthermore, the methods rely on verbatim or near-verbatim $n$-gram overlaps and do not capture "semantic contamination" (paraphrasing). Future work should explore embedding-based similarity search and the impact of instruction tuning (SFT) and RLHF on contaminated data.

Authors: Aaditya K. Singh, Muhammed Yusuf Kocyigit, Andrew Poulton, David Esiobu, Maria Lomeli, Gergely Szilvasy, Dieuwke Hupkes.

Summary updated

BibTeX
@misc{singh2024evaluation,
  author = {Aaditya K. Singh and Muhammed Yusuf Kocyigit and Andrew Poulton and David Esiobu and Maria Lomeli and Gergely Szilvasy and Dieuwke Hupkes},
  title = {{Evaluation data contamination in LLMs: how do we measure it and (when) does it matter?}},
  year = {2024},
  eprint = {2411.03923},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.03923},
}
Figure