DyePack: Provably Flagging Test Set Contamination in LLMs Using Backdoors

Yize Cheng, Wenxiao Wang, Mazda Moayeri, Soheil Feizi


Abstract
Open benchmarks are essential for evaluating and advancing large language models, offering reproducibility and transparency. However, their accessibility makes them likely targets of test set contamination. In this work, we introduce **DyePack**, a framework that leverages backdoor attacks to identify models that used benchmark test sets during training, **without requiring access to the loss, logits, or any internal details of the model.** Like how banks mix dye packs with their money to mark robbers, DyePack mixes backdoor samples with the test data to flag models that trained on it. We propose a principled design incorporating multiple backdoors with stochastic targets, **enabling exact false positive rate (FPR) computation when flagging every model.** This provably prevents false accusations while providing strong evidence for every detected case of contamination. We evaluate DyePack on five models across three datasets, covering both multiple-choice and open-ended generation tasks. For multiple-choice questions, it successfully detects all contaminated models with guaranteed FPRs as low as 0.000073% on MMLU-Pro and 0.000017% on Big-Bench-Hard using eight backdoors. For open-ended generation tasks, it generalizes well and identifies all contaminated models on Alpaca with a guaranteed false positive rate of just 0.127% using six backdoors.
Anthology ID:
2025.emnlp-main.776
Volume:
Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing
Month:
November
Year:
2025
Address:
Suzhou, China
Editors:
Christos Christodoulopoulos, Tanmoy Chakraborty, Carolyn Rose, Violet Peng
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
15367–15384
Language:
URL:
https://preview.aclanthology.org/ingest-emnlp/2025.emnlp-main.776/
DOI:
Bibkey:
Cite (ACL):
Yize Cheng, Wenxiao Wang, Mazda Moayeri, and Soheil Feizi. 2025. DyePack: Provably Flagging Test Set Contamination in LLMs Using Backdoors. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 15367–15384, Suzhou, China. Association for Computational Linguistics.
Cite (Informal):
DyePack: Provably Flagging Test Set Contamination in LLMs Using Backdoors (Cheng et al., EMNLP 2025)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-emnlp/2025.emnlp-main.776.pdf
Checklist:
 2025.emnlp-main.776.checklist.pdf