Skip to main content
QUICK REVIEW

[Paper Review] Undistillable: Making A Nasty Teacher That CANNOT teach students

Haoyu Ma, Tianlong Chen|arXiv (Cornell University)|May 16, 2021
Adversarial Robustness in Machine LearningComputer Science29 references18 citations
TL;DR

This paper introduces the 'Nasty Teacher'—a defensively trained teacher model that maintains near-identical performance to a standard teacher but severely degrades student models trained via knowledge distillation. Using a novel self-undermining knowledge distillation method, the approach maximizes output divergence from a normal teacher while preserving accuracy, effectively blocking both standard and data-free knowledge distillation attacks with up to 10%+ accuracy drop in students.

ABSTRACT

Knowledge Distillation (KD) is a widely used technique to transfer knowledge from pre-trained teacher models to (usually more lightweight) student models. However, in certain situations, this technique is more of a curse than a blessing. For instance, KD poses a potential risk of exposing intellectual properties (IPs): even if a trained machine learning model is released in 'black boxes' (e.g., as executable software or APIs without open-sourcing code), it can still be replicated by KD through imitating input-output behaviors. To prevent this unwanted effect of KD, this paper introduces and investigates a concept called Nasty Teacher: a specially trained teacher network that yields nearly the same performance as a normal one, but would significantly degrade the performance of student models learned by imitating it. We propose a simple yet effective algorithm to build the nasty teacher, called self-undermining knowledge distillation. Specifically, we aim to maximize the difference between the output of the nasty teacher and a normal pre-trained network. Extensive experiments on several datasets demonstrate that our method is effective on both standard KD and data-free KD, providing the desirable KD-immunity to model owners for the first time. We hope our preliminary study can draw more awareness and interest in this new practical problem of both social and legal importance.

Motivation & Objective

  • To address the growing risk of machine learning model intellectual property (IP) leakage through knowledge distillation (KD), especially when models are released as black-box APIs or software.
  • To develop a practical defense mechanism that prevents unauthorized cloning of pre-trained models via KD, even without access to original training data.
  • To create a teacher model that performs nearly as well as a normal one but actively undermines student performance during distillation, thus deterring model stealing.
  • To demonstrate the effectiveness of this defense in both standard KD and data-free KD settings, where training data are not available to the attacker.
  • To provide a general-purpose, lightweight solution for model owners to protect their models from reverse-engineering and unauthorized replication.

Proposed method

  • Proposes a self-undermining knowledge distillation algorithm that trains the teacher model to maximize the difference between its output and that of a normally trained teacher network.
  • Uses a loss function that encourages the nasty teacher's logits and feature maps to diverge from those of a standard teacher, while maintaining high accuracy on the original dataset.
  • Employs a single-stage training process that does not require additional datasets, auxiliary networks, or backdoor triggers.
  • Applies the method to standard KD by optimizing distillation loss against a normal teacher, and to data-free KD by ensuring generated synthetic data from the nasty teacher is of low quality.
  • Tunes hyperparameters such as temperature scaling (τ) and weighting factor (ω) to control the degree of divergence without sacrificing teacher performance.
  • Validates the method across multiple architectures (ResNet-18, ResNet-34) and datasets (CIFAR-10, CIFAR-100), showing consistent degradation of student performance.

Experimental results

Research questions

  • RQ1Can a teacher model be trained to maintain high accuracy while actively degrading student performance during knowledge distillation?
  • RQ2To what extent can a defensive teacher model resist data-free knowledge distillation attacks where no training data are available?
  • RQ3Does the proposed self-undermining training method effectively prevent model cloning without requiring external datasets or auxiliary models?
  • RQ4How does the performance gap between normal and nasty teachers affect student model accuracy in both standard and data-free KD settings?
  • RQ5Can the nasty teacher concept be generalized across different model architectures and datasets to serve as a practical IP protection mechanism?

Key findings

  • The nasty teacher achieves a performance gap of less than 1% in accuracy compared to the normal teacher on CIFAR-10 and CIFAR-100, demonstrating minimal impact on its own utility.
  • Under standard knowledge distillation, student models trained on the nasty teacher suffer a performance drop of over 10% compared to those trained on a normal teacher.
  • In data-free KD settings, the accuracy of student models trained from the nasty teacher dropped by more than 5% on CIFAR-100 (from 71.06% to 65.67%) and 6.34% on CIFAR-10 (from 92.49% to 86.15%).
  • Visualizations from DeepInversion show that synthetic data generated from the nasty teacher contain distorted, noisy, and incorrect category-specific features, unlike the high-fidelity outputs from normal teachers.
  • The method remains effective even when students are trained on only 10% of the training data, indicating robustness to data scarcity in model stealing scenarios.
  • The approach is resilient to hyperparameter tuning: reducing the distillation temperature (α) does not restore student performance, confirming that the degradation is not due to hyperparameter sensitivity.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.