DyePack: Provably Flagging Test Set Contamination in LLMs Using Backdoors
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
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.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 20 of its 35 references that are in the map. First posted on arXiv 29 May 2025.
Builds on
20 of 35 references.
Closest ancestors · 2
Same direction, newest first
- 2024BadEdit: Backdooring large language models by model editing20 Mar
- 2023Backdoor Attacks for In-Context Learning with Language Models27 Jul
Other references · 18
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
- 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
- 2024LiveBench: A Challenging, Contamination-Limited LLM Benchmarkcited by 262
- 2023Proving Test Set Contamination in Black Box Language Modelscited by 230
- 2019A backdoor attack against LSTM-based text classification systemscited by 227
- 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 211
6 more
- 2023Rethinking Benchmark and Contamination for Language Models with Rephrased Samplescited by 195
- 2023Don't Make Your LLM an Evaluation Benchmark Cheatercited by 194
- 2023Platypus: Quick, Cheap, and Powerful Refinement of LLMscited by 150
- 2023Domain Watermark: Effective and Harmless Dataset Copyright Protection is Closed at Handcited by 57
- 2024AntiLeakBench: Preventing Data Contamination by Automatically Constructing Benchmarks with Updated Real-World Knowledgecited by 44
- 2024VarBench: Robust Language Model Benchmarking Through Dynamic Variable Perturbationcited by 29
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Detecting Stealthy Backdoor Samples based on Intra-class Distance for Large Language Models
- 2025Revisiting Backdoor Attacks on LLMs: A Stealthy and Practical Poisoning Framework via Harmless Inputs
- 2026An Empirical Study of Output-to-Input Loops for Black-Box Backdoor Detection in Fine-Tuned Open-Weight LLMs
- 2023Test-time Backdoor Mitigation for Black-Box Large Language Models with Defensive Demonstrations
- 2025Auditing Black-Box LLM APIs with a Rank-Based Uniformity Test
- 2024Does Data Contamination Detection Work (Well) for LLMs? A Survey and Evaluation on Detection Assumptions
- 2026GradSentry: Gradient Spectral Entropy for Backdoor Sample Filtering in Large Language Model Fine-Tuning
- 2026SpecGuard: Inference-Time Backdoor Detection For Free