Skip to main content
QUICK REVIEW

[Paper Review] Zero-Shot Knowledge Distillation from a Decision-Based Black-Box Model

Zi Wang|arXiv (Cornell University)|Jun 7, 2021
Advanced Neural Network ApplicationsComputer Science36 references14 citations
TL;DR

This paper proposes Zero-Shot Decision-Based Black-Box Knowledge Distillation (ZSDB3KD), a method to train compact student networks by distilling knowledge from a black-box teacher model that only returns hard-label predictions. By iteratively optimizing noisy inputs to maximize their distance from decision boundaries, the approach generates robust pseudo-samples whose soft labels enable effective distillation even without access to training data or teacher parameters, achieving 59.46% accuracy on CIFAR-10 with AlexNet-Half.

ABSTRACT

Knowledge distillation (KD) is a successful approach for deep neural network acceleration, with which a compact network (student) is trained by mimicking the softmax output of a pre-trained high-capacity network (teacher). In tradition, KD usually relies on access to the training samples and the parameters of the white-box teacher to acquire the transferred knowledge. However, these prerequisites are not always realistic due to storage costs or privacy issues in real-world applications. Here we propose the concept of decision-based black-box (DB3) knowledge distillation, with which the student is trained by distilling the knowledge from a black-box teacher (parameters are not accessible) that only returns classes rather than softmax outputs. We start with the scenario when the training set is accessible. We represent a sample's robustness against other classes by computing its distances to the teacher's decision boundaries and use it to construct the soft label for each training sample. After that, the student can be trained via standard KD. We then extend this approach to a more challenging scenario in which even accessing the training data is not feasible. We propose to generate pseudo samples distinguished by the teacher's decision boundaries to the largest extent and construct soft labels for them, which are used as the transfer set. We evaluate our approaches on various benchmark networks and datasets and experiment results demonstrate their effectiveness. Codes are available at: https://github.com/zwang84/zsdb3kd.

Motivation & Objective

  • To address the challenge of knowledge distillation when the teacher model is a decision-based black box that only returns hard labels, not class probabilities.
  • To enable knowledge transfer in real-world scenarios where training data and model parameters are inaccessible due to privacy or storage constraints.
  • To develop a zero-shot approach that generates high-quality pseudo-samples from a black-box teacher to construct soft labels for distillation.
  • To demonstrate the effectiveness of the method on benchmark datasets under both data-accessible and data-inaccessible settings.

Proposed method

  • The method constructs soft labels by measuring each training sample’s robustness as its distance to the teacher’s decision boundaries, using iterative queries to estimate gradient directions.
  • For the data-inaccessible scenario, it generates pseudo-samples by optimizing random noise to maximize distance from decision boundaries, simulating real training data distribution.
  • The optimization process pushes samples away from decision boundaries using gradient estimates obtained through multiple queries to the black-box teacher.
  • Soft labels are derived from the relative robustness of samples to different classes, enabling standard knowledge distillation training of the student network.
  • The approach leverages the fact that real training samples are inherently more robust (farther from decision boundaries) than adversarial or random samples.
  • It extends zero-shot KD to the black-box setting by replacing white-box parameter access with query-based boundary estimation.

Experimental results

Research questions

  • RQ1Can knowledge distillation be effectively performed when the teacher model only returns hard labels and no model parameters or training data are accessible?
  • RQ2How can soft labels be constructed from a decision-based black-box teacher without access to class probabilities?
  • RQ3Can pseudo-samples generated by maximizing distance from decision boundaries effectively represent the true data distribution for distillation?
  • RQ4How does the performance of the student model compare to standard KD when training data and teacher parameters are unavailable?

Key findings

  • On CIFAR-10 with AlexNet-Half, ZSDB3KD achieved 59.46% test accuracy without accessing any training data or teacher softmax outputs, outperforming random noise inputs (13.53% and 14.79%)
  • With accessible training data, DB3KD achieved competitive performance on FLOWERS102, demonstrating effectiveness in less constrained settings.
  • The method produced visually coherent and recognizable pseudo-samples after 1000 iterations, with averaged images closely resembling real data distribution.
  • Using only 1,000 pseudo-samples per class, the student achieved 94% test accuracy on MNIST, approaching the performance of standard KD with full access.
  • Performance improved with more iterations and more samples, with saturation observed at 8,000 samples per class, indicating scalability.
  • The ablation study confirmed that the quality of generated samples and student performance strongly depend on the number of optimization steps and the number of pseudo-samples used.

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.