Time Travel in LLMs: Tracing Data Contamination in Large Language Models
Abstract
Data contamination, i.e., the presence of test data from downstream tasks in the training data of large language models (LLMs), is a potential major issue in measuring LLMs' real effectiveness on other tasks. We propose a straightforward yet effective method for identifying data contamination within LLMs. At its core, our approach starts by identifying potential contamination at the instance level; using this information, our approach then assesses wider contamination at the partition level. To estimate contamination of individual instances, we employ "guided instruction:" a prompt consisting of the dataset name, partition type, and the random-length initial segment of a reference instance, asking the LLM to complete it. An instance is flagged as contaminated if the LLM's output either exactly or nearly matches the latter segment of the reference. To understand if an entire partition is contaminated, we propose two ideas. The first idea marks a dataset partition as contaminated if the average overlap score with the reference instances (as measured by ROUGE-L or BLEURT) is statistically significantly better with the completions from guided instruction compared to a "general instruction" that does not include the dataset and partition name. The second idea marks a dataset partition as contaminated if a classifier based on GPT-4 with few-shot in-context learning prompt marks multiple generated completions as exact/near-exact matches of the corresponding reference instances. Our best method achieves an accuracy between 92% and 100% in detecting if an LLM is contaminated with seven datasets, containing train and test/validation partitions, when contrasted with manual evaluation by human experts. Further, our findings indicate that GPT-4 is contaminated with AG News, WNLI, and XSum datasets. 1 1 See the paper's repo at https://github.com/shahriargolchin/time-travel-in-llms . 2 While dataset licensing reduces indirect contamination to a certain extent, it does not eliminate it. For example, websites such as the Hugging Face page for datasets (Wolf et al. 2020 ) currently host copies of the OntoNotes (Weischedel et al. 2013 ) and CoNLL-2003 (Tjong Kim Sang & De Meulder 2003) datasets, despite the fact that their respective licenses prohibit it.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
81 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- DyVal: Dynamic Evaluation of Large Language Models for Reasoning Tasks cites Proving Test Set Contamination in Black-Box Language Models
- DyVal: Dynamic Evaluation of Large Language Models for Reasoning Tasks cites Language Models are Few-Shot Learners
- Multitask Prompted Training Enables Zero-Shot Task Generalization cites Language Models are Few-Shot Learners
- Multitask Prompted Training Enables Zero-Shot Task Generalization cites Finetuned Language Models are Zero-Shot Learners
- Finetuned Language Models are Zero-Shot Learners cites Multitask Prompted Training Enables Zero-Shot Task Generalization
- Proving Test Set Contamination in Black-Box Language Models cites Language Models are Few-Shot Learners
- Proving Test Set Contamination in Black-Box Language Models cites Finetuned Language Models are Zero-Shot Learners
- GLaM: Efficient Scaling of Language Models with Mixture-of-Experts cites Finetuned Language Models are Zero-Shot Learners
- Finetuned Language Models are Zero-Shot Learners cites GLaM: Efficient Scaling of Language Models with Mixture-of-Experts
- WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Models cites Finetuned Language Models are Zero-Shot Learners
- Finetuned Language Models are Zero-Shot Learners cites Language Models are Few-Shot Learners
- Finetuned Language Models are Zero-Shot Learners cites Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback cites Finetuned Language Models are Zero-Shot Learners
- Training language models to follow instructions with human feedback cites Multitask Prompted Training Enables Zero-Shot Task Generalization
- Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
- Detecting Pretraining Data from Large Language Models cites GLaM: Efficient Scaling of Language Models with Mixture-of-Experts
- Detecting Pretraining Data from Large Language Models cites Language Models are Few-Shot Learners
- Detecting Pretraining Data from Large Language Models cites Finetuned Language Models are Zero-Shot Learners
Cited by top-tier papers81
- Detecting Pretraining Data from Large Language ModelsWeijia Shi, Anirudh Ajith, Mengzhou Xia, Yangsibo Huang et al.ICLR 2024 · 365 citations
- WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language ModelsLiwei Jiang, Kavel Rao, Seungju Han, Allyson Ettinger et al.NeurIPS 2024 · 247 citations
- Proving Test Set Contamination in Black-Box Language ModelsYonatan Oren, Nicole Meister, Niladri S. Chatterji, Faisal Ladhak et al.ICLR 2024 · 220 citations
- Preference Leakage: A Contamination Problem in LLM-as-a-judgeDawei Li, Renliang Sun, Yue Huang, Ming Zhong et al.ICLR 2026 · 150 citations
- DyVal: Dynamic Evaluation of Large Language Models for Reasoning TasksKaijie Zhu, Jiaao Chen, Jindong Wang, Neil Zhenqiang Gong et al.ICLR 2024 · 92 citations
Builds on8
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
- Multitask Prompted Training Enables Zero-Shot Task GeneralizationVictor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach et al.ICLR 2022 · 1,976 citations
- GLaM: Efficient Scaling of Language Models with Mixture-of-ExpertsNan Du, Yanping Huang, Andrew M. Dai, Simon Tong et al.ICML 2022 · 1,173 citations
Related papers
- PaCoST: Paired Confidence Significance Testing for Benchmark Contamination Detection in Large Language ModelsHuixuan Zhang, Yun Lin, Xiaojun WanEMNLP Findings 2024
- To the Cutoff... and Beyond? A Longitudinal Perspective on LLM Data ContaminationManley Roberts, Himanshu Thakur, Christine Herlihy, Colin White et al.ICLR 2024 · 45 citations
- An Open-Source Data Contamination Report for Large Language ModelsYucheng Li, Yunhao Guo, Frank Guerin, Chenghua LinEMNLP Findings 2024 · 19 citations
- NLP Evaluation in trouble: On the Need to Measure LLM Data Contamination for each BenchmarkOscar Sainz, Jon Ander Campos, Iker García-Ferrero, Julen Etxaniz et al.EMNLP Findings 2023 · 85 citations
- Unveiling the Spectrum of Data Contamination in Language Model: A Survey from Detection to RemediationChunyuan Deng, Yilun Zhao, Yuzhao Heng, Yitong Li et al.ACL Findings 2024 · 8 citations
