Abstract
Reasoning distillation has emerged as an efficient and powerful paradigm for enhancing the reasoning capabilities of large language models. However, reasoning distillation may inadvertently cause benchmark contamination, where evaluation data included in distillation datasets can inflate performance metrics of distilled models. In this work, we formally define the task of distillation data detection, which is uniquely challenging due to the partial availability of distillation data. Then, we propose a novel and effective method Token Probability Deviation (TBD), which leverages the probability patterns of the generated output tokens. Our method is motivated by the analysis that distilled models tend to generate near-deterministic tokens for seen questions, while producing more low-probability tokens for unseen questions. Our key idea behind TBD is to quantify how far the generated tokens' probabilities deviate from a high reference probability. In effect, our method achieves competitive detection performance by producing lower scores for seen questions than for unseen questions. Extensive experiments demonstrate the effectiveness of our method, achieving an AUC of 0.918 and a TPR@1% FPR of 0.470 on the S1 dataset.
Introduction
As small language models (SLMs) are increasingly trained to mimic the reasoning of giants like DeepSeek-R1 or o1, "benchmark contamination" has become a major concern. This paper introduces Token Probability Deviation (TBD), a novel method that detects whether a question was part of a model's distillation training set by analyzing the "hyper-confidence" the model displays when generating its reasoning trace.
The Challenge of Partial Availability
Reasoning distillation is the process of transferring complex Chain-of-Thought (CoT) capabilities from Large Reasoning Models (LRMs) to more efficient SLMs. While effective, this paradigm suffers from a lack of transparency. If a benchmark's evaluation questions are accidentally included in the distillation dataset, the distilled model’s performance metrics become artificially inflated—a phenomenon known as benchmark contamination.
Detecting this is uniquely difficult due to partial availability. In standard training data detection, you usually have the full (input, output) pair. In distillation, an auditor only has the question. The specific reasoning path and final answer used during training are often proprietary or lost due to the non-deterministic nature of the teacher model. Existing detection methods that look only at the input question (like Min-K%) fail because the question itself doesn't look "special"—it's the model's response that leaks the secret.
Methodology: Token Probability Deviation (TBD)
The authors propose Token Probability Deviation (TBD), which shifts the focus from the input tokens to the generated output tokens. The core observation is that distilled models become "near-deterministic" when encountering seen questions. They don't just answer correctly; they reproduce the teacher's reasoning trace with extreme confidence.
TBD quantifies this behavior through the following steps:
- Greedy Generation: Forcing the model to generate a reasoning trace for a given question.
- Measuring Deviation: Calculating how far each generated token's probability deviates from a high reference probability (usually set to 1.0).
- Truncation: Focusing only on the first $M$ tokens (e.g., the first 300), as the early stages of a reasoning path are more representative of the model's learned behavior.
- Scoring: Using a tunable parameter to weight the contribution of "outlier" tokens (those with lower probabilities).
Essentially, if a model generates a long string of tokens with probabilities very close to 1.0, TBD flags it as likely distillation data.
Experimental Setup and Results
The researchers evaluated their method using several high-quality reasoning distillation datasets, including S1, S1.1, and LIMO. They tested across the Qwen2.5-Instruct family (7B, 14B, and 32B parameters) to ensure the method scales.
TBD significantly outperformed all existing input-based baselines:
- Detection Accuracy: On the S1 dataset using Qwen2.5-32B, TBD achieved an AUC of 0.918. For comparison, most input-based methods like Min-K% hovered around 0.45–0.55 (essentially random guessing).
- Low False Positive Rate: At a 1% False Positive Rate (FPR), TBD achieved a True Positive Rate (TPR) of 0.470. This means it can catch nearly half of the contaminated data while almost never falsely accusing clean data.
- Robustness: The method proved effective across different datasets and model sizes without requiring extensive hyperparameter tuning.
Discussion and Limitations
- The Confidence Leak: The "aha moment" is that distillation forces a model to memorize a very specific "style" of reasoning. While a model might be able to solve an unseen problem, it won't do so with the same eerie, near-perfect token-by-token confidence it shows for a problem it was explicitly trained to mimic.
- White-Box Requirement: TBD requires access to the model's log probabilities. It cannot currently be used on "black-box" API models that only return text.
- Computational Cost: Because the method requires generating a reasoning trace for every question being audited, it is more computationally expensive than methods that only look at the input.
Future work may explore black-box detection methods and investigate whether TBD can be bypassed by "unlearning" techniques or different training objectives.
Summary updated