Towards Undistillable Models by Minimizing Conditional Mutual Information

Linfeng Ye, Shayan Mohajer Hamidi, En-hui Yang

Abstract

A deep neural network (DNN) is said to be undistillable if, when used as a black-box input-output teacher, it cannot be distilled through knowledge distillation (KD). In this case, the distilled student (referred to as the knockoff student) does not outperform a student trained independently with label smoothing (LS student) in terms of prediction accuracy. To protect intellectual property of DNNs, it is desirable to build undistillable DNNs. To this end, it is first observed that an undistillable DNN may have the trait that each cluster of its output probability distributions in response to all sample instances with the same label should be highly concentrated to the extent that each cluster corresponding to each label should ideally collapse into one probability distribution. Based on this observation and by measuring the concentration of each cluster in terms of conditional mutual information (CMI), a new training method called CMI minimized (CMIM) method is proposed, which trains a DNN by jointly minimizing the conventional cross entropy (CE) loss and the CMI values of all temperature scaled clusters across the entire temperature spectrum. The resulting CMIM model is shown, by extensive experiments, to be undistillable by all tested KD methods existing in the literature. That is, the knockoff students distilled by these KD methods from the CMIM model underperform the respective LS students. In addition, the CMIM model is also shown to performs better than the model trained with the CE loss alone in terms of their own prediction accuracy.

Introduction

Training a high-quality deep neural network (DNN) is an expensive investment in terms of data annotation, expertise, and compute. However, once a model is released as a "black box" (e.g., via an API), it is vulnerable to Knowledge Distillation (KD) attacks. In these scenarios, a competitor can use the model's soft output probabilities to train their own "knockoff" student model, effectively stealing the "dark knowledge" and logic of the original teacher.

Existing defenses, such as "Nasty Teacher" or basic label smoothing, often fail because an attacker can simply apply temperature scaling (adjusting the smoothness of the probability outputs) to bypass the defense. This research aims to create a model that is truly undistillable: a model where the distilled student never performs better than a student trained independently using standard label smoothing.

Methodology: The CMIM Framework

The core idea behind the CMI Minimized (CMIM) method is to eliminate the "diversity" in the teacher's predictions. If every image of a "Golden Retriever" produces an identical output probability vector, there is no nuanced information for a student to pick up on—the "dark knowledge" effectively vanishes.

Conditional Mutual Information (CMI)

The authors use CMI to measure the concentration of output clusters for each class. Low CMI means the outputs for a specific class are nearly identical. An undistillable model should ideally have its output clusters collapse into a single point for each label, rendering the teacher's guidance redundant compared to one-hot labels.

Power Transform Spectrum and Optimization

Since attackers use temperature scaling to "reveal" hidden information, CMIM jointly minimizes CMI across the entire temperature spectrum, modeled as power transforms. The training objective is a min-max problem: minimize the standard Cross-Entropy loss while also minimizing the maximum possible CMI value an attacker might find by searching through different temperatures.

CMI values across the power transform spectrum (α) for different classes.

To make this computationally feasible, the authors use a log-sum-exp approximation to transform the complex max-optimization into a differentiable objective that can be solved with standard backpropagation.

Experimental Setup

The approach was validated using three standard image classification benchmarks:

  1. CIFAR-100: 50,000 training images across 100 classes.
  2. TinyImageNet: A subset of ImageNet with 200 classes at 64x64 resolution.
  3. ImageNet: The gold standard large-scale dataset with 1.2 million images.

Various model architectures were tested, including ResNet (18, 34, 50, 101, 152), VGG (11, 16), MobileNetV2, and ShuffleNetV2, to ensure the defense works across different teacher-student pairings.

Key Results

Superior Defense and Robustness

In extensive experiments against seven different KD attack methods (like DKD, DIST, and MKD), the knockoff students distilled from CMIM teachers consistently underperformed compared to students trained with simple label smoothing. While prior defenses (MAD, APGP, NT, SNT) could be "broken" by tuning the distillation temperature, CMIM remained robust because it explicitly optimizes for undistillability across a wide range of temperature scales.

The Accuracy "Free Lunch"

Interestingly, minimizing CMI doesn't just protect the model; it actually tends to improve the teacher's own classification accuracy. By forcing classes into tighter clusters, the model learns more robust features. On CIFAR-100, a ResNet-50 trained with CMIM achieved 78.72% accuracy, compared to 77.81% for standard Cross-Entropy training. Similar gains were observed on TinyImageNet and ImageNet.

Calibration and Concentration

CMIM models achieved Expected Calibration Error (ECE) scores on par with standard models, meaning they aren't just more accurate, but their probability estimates remain reliable. Furthermore, a model can have highly concentrated outputs (all "Cats" look the same to the model) without being "overconfident"; CMIM models often show higher entropy than standard models while remaining more concentrated.

Conclusion and Future Work

CMIM provides a robust empirical defense against intellectual property theft via knowledge distillation. While the results are strong, the paper provides an empirical demonstration rather than a formal mathematical proof that no possible distillation method could ever succeed. Training with CMIM is slightly slower than standard training (roughly 10-20% longer) due to the additional inference steps required to estimate CMI.

Future research may extend this framework beyond standard classification to multi-label classification, regression, and large-scale generative models like Large Language Models (LLMs) or Diffusion models.

Summary updated

BibTeX
@article{ye2025towards,
  author = {Linfeng Ye and Shayan Mohajer Hamidi and EN-HUI YANG},
  title = {{Towards Undistillable Models by Minimizing Conditional Mutual Information}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=jVABSsD4Vf},
}
Figure