NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Reference-Based Distillation Detection in LLMs

Rajat Rawat, Sizhe Chen, Akshay Anand, Michael Duan, Bob Rotsted, Sewon MinarXiv 2026

TL;DR

This paper introduces a reference-based framework to detect whether a large language model (LLM) was trained on outputs distilled from a competitor's model. By comparing a suspected student model's behavior against an earlier checkpoint from its own lineage, the proposed method achieves near-perfect teacher attribution accuracy and uncovers potential real-world distillation links in prominent models like QwQ-32B and DeepSeek-R1.

What Problem Does This Paper Address?

Model distillation—fine-tuning a smaller "student" model on the outputs of a larger, more capable "teacher" model—has become a standard recipe for boosting LLM capabilities cheaply. However, this practice creates significant ecosystem-level risks. Competitors can query proprietary models at scale to clone their capabilities, violating corporate policies and infringing on intellectual property.

While providers currently use infrastructure-level defenses (like monitoring IP addresses or request metadata), detecting distillation purely from a model's behavior is notoriously difficult. Because modern LLM lineages are deeply entangled and trained on overlapping datasets, standard membership inference attacks (MIAs) struggle to isolate a teacher's true footprint. This paper tackles a more tractable version of the problem: given a model and an earlier checkpoint from the same family, can we determine if a specific teacher model was used to train the later checkpoint?

Methods

The authors introduce a contrastive, reference-based distillation detection method.

Figure 1: Reference-based distillation detection. (a) Rather than attributing distillation from the final student alone, we measure the shift relative to a reference model (e.g., an earlier model from the same family). (b) Scoring candidate teachers for QwQ-32B identifies DeepSeek R1 (red) as the best match.

Instead of measuring the absolute log-likelihood of a teacher's outputs under the student model, the method calculates a relative alignment score:

$$f(T_k(x_i), S) = -(\ell_S(x_i, y_i^{(k)}) - \ell_R(x_i, y_i^{(k)}))$$

Where $\ell_S$ is the negative log-likelihood under the student model $S$, and $\ell_R$ is the negative log-likelihood under the earlier reference checkpoint $R$. This score isolates how much better the student explains a candidate teacher's ($T_k$) outputs compared to its pre-distilled self.

The framework incorporates several clever workarounds for real-world constraints:

  • Proxy Prompt Inference: Since auditors rarely have access to the exact prompts used during distillation, the method infers proxy prompt templates from open-source datasets.
  • Few-Shot Style Alignment: To counter highly customized instruction formats that might mask the teacher's signal, the authors prepend a few student-generated examples to the teacher's prompts, aligning the output styles.
  • Glyph-Level o1/o3 Signature: The authors discovered that OpenAI's o1 and o3 models use non-ASCII Unicode characters unusually frequently. They exploit this by measuring the reference-normalized loss gap between raw Unicode and ASCII-escaped text to flag potential o1/o3 distillation.

Datasets

The authors evaluated their approach using a hybrid setup of controlled and real-world models:

  • Controlled Experiments: Built using four base student models (Llama-3.2-3B-Instruct, Gemma-3-4B-PT, Qwen2.5-1.5B, and Qwen2.5-3B) distilled against three teachers (Qwen-3-8B, Llama-3.3-70B-Instruct, and GPT-OSS-120B). Prompts were drawn from OpenMathInstruct-2 (OMI-2) and s1.
  • Cross-Domain Robustness: Probed using the MBPP dataset (code generation) to test performance under domain shift.
  • Real-World Models: Evaluated on six official DeepSeek-R1 distilled models, simplescaling's s1.1-32B, X-Coder-SFT-Qwen3-8B, Alibaba's QwQ-32B, and the GPT-OSS family.

Key Insights and Ideas

  • The Power of Relativity: Absolute likelihood metrics fail because some text sequences are universally easy or hard for all LLMs to model. The true signal lies entirely in the behavioral shift away from the reference model.
  • Rapid Contamination: The distillation signal embeds itself into the student model almost immediately. In controlled tests, the true teacher could be reliably identified after the student was exposed to just 32 training examples.
Figure 3: Reference-based MIA after only 32 training examples (checkpoint 2). A Qwen-2.5-1.5B student distilled from each teacher (GPT-OSS-120B, Llama-3.3-70B-Instruct, Qwen-3-8B) on OMI prompts, probed with s1 and referenced against the base Qwen-2.5-1.5B. In every panel the true teacher is the top-ranked candidate, showing that the teacher signal is already identifiable after only a few dozen examples.
  • Reasoning Traces are Critical: Access to the teacher's full reasoning chain (CoT) is vital for detection. When reasoning traces were hidden and only final answers were evaluated, teacher identification accuracy collapsed to zero.
  • Real-World Provenance Clues: Applying the method to open-world settings yielded fascinating breadcrumbs:
  • QwQ-32B strongly aligns with DeepSeek-R1 outputs, suggesting R1 data was integrated after the QwQ-32B-Preview release.
  • Both DeepSeek-R1 and GPT-OSS-120B display the distinct o1-style Unicode glyph signature, hinting at an underlying influence from OpenAI's reasoning models.

Key Results

  • Controlled Settings: The reference-based method achieved 100% aggregate accuracy in identifying the correct teacher among candidates, dramatically outperforming standard MIA baselines like ZLIB-normalization and Min-K%.
  • Real-World Robustness: The framework correctly identified DeepSeek-R1 as the true teacher for all seven real-world distilled models tested, maintaining high statistical significance ($p < 0.05$) across different prompt sets.
  • Open-World Generalization: In cross-validation tests, the margin-threshold detector generalized effectively to unseen student models, provided the teacher model was represented in the training/calibration data.

Limitations and Future Work

  • Dependency on a Reference Checkpoint: The method relies heavily on having a clean, earlier-generation model from the same lineage. For models without public ancestors (like GPT-OSS), the authors had to resort to distant baselines like GPT-2 XL, which introduces significant ambiguity.
  • Simplified Distillation Regimes: The current framework assumes a clean, single-teacher, last-stage SFT distillation process. It does not yet account for multi-teacher blending or multi-stage training pipelines.
  • Data Obfuscation: The authors note that if a distillation pipeline includes an intermediate rewriting step (e.g., teacher A generates text, teacher B paraphrases it), it remains unclear how cleanly the originating teacher's signal can be recovered.

Summary updated

BibTeX
@misc{rawat2026reference,
  author = {Rajat Rawat and Sizhe Chen and Akshay Anand and Michael Duan and Bob Rotsted and Sewon Min},
  title = {{Reference-Based Distillation Detection in LLMs}},
  year = {2026},
  eprint = {2607.09692},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.09692},
}
Figure