Introduction
Knowledge distillation (KD) has become a cornerstone of modern machine learning, enabling the compression of massive "teacher" models into efficient "student" models. However, this capability introduces significant intellectual property (IP) risks. A competitor can use a proprietary model's API to train a student model, effectively cloning its logic without authorization. Detecting such "clones" is challenging because auditors typically lack access to the original training data or the teacher's internal weights. This paper introduces a model-agnostic framework for Knowledge Distillation Detection, identifying the source teacher of an open-weights student model using only the student's weights and API access to candidate teachers.
Methodology
The proposed framework operates through a three-stage, data-free pipeline designed to uncover functional fingerprints left during the distillation process.
- Input Construction: To probe the models without original training data, the framework synthesizes "synthetic queries." For image classification, a generator creates images that maximize student confidence, constrained by Batch Normalization Statistics (BNS) to maintain realism. For text-to-image (T2I) models, "empty prompts" are used to trigger unconditional generation, revealing the model's inherent prior knowledge.
- Score Computation: The outputs of the student and candidate teachers are compared using point-wise scores (e.g., KL Divergence) and set-level scores (e.g., Aligned Cosine Similarity).
- Prediction: The framework identifies the most likely teacher by selecting the candidate that yields the highest aggregate alignment score across the synthetic dataset $\mathcal{P}$.
Experimental Results
The method was evaluated on image classification (CIFAR-10, ImageNet) and T2I generation (Stable Diffusion variants). A key finding is that synthetic data can actually outperform an "Oracle" with access to real training data, as synthetic inputs can be optimized to highlight specific teacher-student alignments.
As shown in the results table, the proposed method (Ours KL/ACS) significantly outperforms existing membership inference (MIA) and out-of-distribution (OOD) filters. Notably, the detection accuracy reaches near-perfect levels with as few as 10 to 50 synthetic samples, demonstrating high efficiency. On CIFAR-10 and ImageNet, the framework improved detection accuracy by 59.6% and 71.2% over the strongest baselines, respectively.
Discussion and Conclusion
The framework's success across different architectures (e.g., ResNet students from DLA teachers) confirms that it captures functional rather than structural alignment. While highly effective for strong distillation, detection becomes more difficult when the distillation influence is weak. Future work includes extending this approach to Large Language Models (LLMs) by adapting input synthesis for discrete text tokens and exploring more complex prompts for generative models. This research provides a vital tool for IP protection in the era of open-weights models.
Paper Citation: Qin Shi, Amber Yijia Zheng, Qifan Song, Raymond A. Yeh. "Knowledge Distillation Detection for Open-weights Models." 39th Conference on Neural Information Processing Systems (NeurIPS 2025).
Summary updated