[Paper Review] Investigating Data Contamination for Pre-training Language Models
This paper investigates data contamination in pre-training language models by training GPT-2 models from scratch with intentionally contaminated corpora, revealing that both input text and ground-truth contamination significantly boost downstream performance. It demonstrates that n-gram-based contamination definitions in current LLM reports are inadequate, and repeated contamination amplifies performance gains, challenging claims of model robustness to contamination.
Language models pre-trained on web-scale corpora demonstrate impressive capabilities on diverse downstream tasks. However, there is increasing concern whether such capabilities might arise from evaluation datasets being included in the pre-training corpus -- a phenomenon known as extit{data contamination} -- in a manner that artificially increases performance. There has been little understanding of how this potential contamination might influence LMs' performance on downstream tasks. In this paper, we explore the impact of data contamination at the pre-training stage by pre-training a series of GPT-2 models extit{from scratch}. We highlight the effect of both text contamination ( extit{i.e.}\ input text of the evaluation samples) and ground-truth contamination ( extit{i.e.}\ the prompts asked on the input and the desired outputs) from evaluation data. We also investigate the effects of repeating contamination for various downstream tasks. Additionally, we examine the prevailing n-gram-based definitions of contamination within current LLM reports, pinpointing their limitations and inadequacy. Our findings offer new insights into data contamination's effects on language model capabilities and underscore the need for independent, comprehensive contamination assessments in LLM studies.
Motivation & Objective
- To investigate the impact of data contamination on pre-training language models at the pre-training level, rather than post-hoc at evaluation time.
- To examine how both input text and ground-truth contamination (prompts and answers) affect model performance on downstream tasks.
- To evaluate the effects of repeated contamination on model performance across different model sizes.
- To critically assess the validity of n-gram-based contamination definitions used in recent LLM reports.
- To challenge the robustness claims of LLMs based on evaluation-level contamination analysis, which may mask true pre-training-level contamination effects.
Proposed method
- Pre-train multiple GPT-2-small and GPT-2-large models from scratch using corpora intentionally contaminated with evaluation dataset inputs and ground-truth pairs.
- Systematically inject evaluation data into the pre-training corpus in varying forms: input-only, input+prompt, input+answer, and full input+prompt+answer contamination.
- Repeat contamination by injecting the same evaluation samples multiple times to study repetition effects on downstream performance.
- Apply n-gram-based contamination definitions from recent LLM reports to filter training data and re-train models to assess their effectiveness.
- Evaluate models on standard NLP benchmarks to compare performance across contamination conditions and filtered corpora.
- Use a combination of zero-shot and few-shot evaluation protocols to assess model behavior across diverse downstream tasks.
Experimental results
Research questions
- RQ1RQ1: How do different forms of contamination—input text and ground-truth—impact the performance of language models during pre-training?
- RQ2RQ2: How does the repetition of contaminated data in the pre-training corpus affect downstream model performance?
- RQ3RQ3: How effective are n-gram-based contamination definitions used in recent LLM reports for detecting true contamination in pre-training corpora?
- RQ4RQ4: To what extent do existing evaluation-level contamination analyses accurately reflect model robustness to contamination?
Key findings
- Ground-truth contamination (including prompts and answers) leads to significantly higher downstream performance than input text contamination alone, indicating that model behavior is more strongly influenced by memorized supervision signals.
- Repeated contamination of the same evaluation samples in the pre-training corpus results in a monotonic increase in downstream performance, with performance gains persisting even after multiple injections.
- n-gram-based contamination definitions used in recent LLM reports fail to detect many real contamination cases, especially when evaluation data is paraphrased or structurally altered, undermining the validity of robustness claims.
- Models trained on corpora filtered using n-gram-based definitions still exhibit high performance on contaminated benchmarks, indicating that such filters do not reliably remove contamination, leading to overestimation of model robustness.
- Evaluation-level contamination analysis—where models are tested separately on contaminated and non-contaminated chunks—does not accurately reflect contamination effects at the pre-training level, as performance differences are masked by model inductive biases.
- The study reveals that current contamination detection and robustness assessment methods are insufficient, highlighting the urgent need for more precise, semantics-aware definitions and detection mechanisms.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.