Manuscript Offprint

arXiv:2611.00908

ZOPGA-KD: Zeroth Order PGA Guided Data Free Knowledge Distillation

Tuhin Subhra Mukherjee, Tiya Rose Pulikunnel, Vaidhav Adit, Devanand Thanissery, S. H. Shabbeer Basha

Abstract

Knowledge distillation (KD) enables the transfer of learned representations from a large teacher network to a small student network. In the foundational KD, the student network uses the original training data of the teacher model to accomplish this task. However, due to privacy concerns, the original training data is often not available. To overcome this reliance on original training data, there have been several data-free knowledge distillation methods developed. Some of these methods operate in the "white-box" setting, and a few methods generate synthetic data by training a generator network. The methods that operate in white-box settings use the parameters of the teacher model to obtain a synthetic dataset. To avoid relying on teacher parameters, some methods use computationally expensive generative approaches to obtain such a dataset. There also exist certain black-box methods that generate the synthetic data without accessing teacher parameters. This method also is computationally intensive. We propose a data-free knowledge distillation method that utilizes just the teacher's output logits and does not require access to its architecture, parameters, or gradients. We generate synthetic data via Projected Gradient Ascent (PGA) starting from smooth random noise signals. Required gradients are obtained through zeroth-order gradient estimation rather than backpropagating through the teacher's parameters. The student is then trained on these synthetically generated samples. We evaluate the proposed method on several benchmark datasets and show that the distillation performance is comparable with approaches that have access to the teacher model parameters.

1 Introduction

Knowledge distillation (KD) is a framework in which the knowledge learned by a large complex network is transferred to a smaller network. The large network is referred to as the "Teacher", while the smaller network is referred to as the "Student". The teacher model delivers strong performance in its intended domain. However, its size and complexity result in a large number of parameters, making it memory-intensive and computationally slow. This makes its deployment challenging in a practical scenario. The student model, on the other hand, is much smaller and faster, making it easier to deploy.

The original work by Hinton, Vinyals, and Dean (2015) recommends using the original data (used to train the teacher) while distilling knowledge to the student. But due to privacy concerns and/or data regulations, in a few settings, the original data may not be available for public use. This gives rise to the paradigm of data-free knowledge distillation (DFKD), which does not use the original training data for KD. Instead, the KD is performed on a synthetic dataset. However, an arbitrary dataset cannot be used; the distribution of the synthetic dataset should closely approximate the distribution of the original data. One of the seminal works (Yin et al. 2020) in this direction makes use of teacher network batch-norm statistics to synthesize the dataset. Nayak et al. (2019) use the weights of the final layer, and Wang (2021a) utilize the weights of all the layers of the teacher to construct the synthetic dataset. Since these methods need access to the teacher's parameters, they are generally referred to as "white-box" methods. In certain scenarios, we neither have access to the teacher's parameters nor the architecture. In such cases, the only way to interact with the model is to query the teacher with some inputs and record the outputs. To facilitate DFKD in such a "black-box" setting, several works (Micaelli and Storkey 2019; Truong et al. 2021; Hong et al. 2025; Chen et al. 2019; Kariyappa, Prakash, and Qureshi 2021; Fang et al. 2022; Zhang, Chen, and Lyu 2022; Fang et al. 2019; Braun, Mundt, and Kersting 2024) employ generative frameworks to obtain the synthetic dataset. However, these approaches introduce an additional overhead since a generator network has to be trained explicitly.

Wang (2021b) proposed a black-box method that generates synthetic data by pushing random noise signals away from the teacher's decision boundaries. The required soft labels are constructed using the concept of robustness, which they obtain by calculating the distance of the samples from decision boundaries. This method, however, is also computationally expensive since it requires 4000 million queries (Yuan et al. 2024).

In this work, we explore an efficient black-box, generator-free method called ZOPGA-KD, which uses only the output logits of the teacher; no other information about the teacher, such as parameters or architecture, is used. To be concrete, we generate the synthetic dataset using Projected Gradient Ascent (PGA) in the input space, starting from the random noise signals. We avoid backpropagation through the teacher by zeroth-order gradient approximation (Nesterov and Spokoiny 2017). The generated samples, aided by data augmentation, are then used to train the student using the Mean Squared Er-

Stage 1: ZO-PGA synthesis

Figure

Figure 1: End-to-end data-free knowledge distillation pipeline. In Stage 1, the teacher TT is accessed only through forward queries (finite differences) to synthesize a soft-labeled transfer set D\mathcal{D} from noise; in Stage 2 the student SS is trained on this synthetic set using knowledge distillation with MSE loss function.

ror (MSE) instead of Kullback–Leibler (KL) divergence as suggested in Kim et al. (2021). We demonstrate the efficacy of our method by applying it to several teacher and student architectures across various benchmark datasets. We compare ZOPGA-KD results with state-of-the-art, generator free, white-box and black-box methods. Note that Zeroth order optimization is previously used in generator based methods of DFKD (Kariyappa, Prakash, and Qureshi (2021), Truong et al. (2021)) to update the parameters of the generator. We highlight our contributions as follows:

  • We propose a generator-free, black-box, DFKD method (“ZOPGA-KD”) which performs KD by generating synthetic datasets through PGA on the input space using zeroth-order gradient approximation. This method avoids both the need for the original data and access to the parameters/architecture of the teacher network. Wang (2021b) also uses zeroth order optimization on the input space, operating in the hard-label setting. They start from random noise signals and iteratively push them away from the estimated decision boundaries. The soft-label for each of the samples is approximated by measuring its distance from the relevant decision boundaries, which is an iterative procedure. This method incurs a high computational cost, requires a large number of queries, and is challenging to extend to more complex datasets such as CIFAR-100 and TinyImageNet (Yuan et al. 2024).

  • We show that the simple mean squared error (MSE) loss effectively performs the knowledge distillation.

  • By applying the proposed method on various standard architectures and datasets, we demonstrate the feasibility of our approach by comparing with most of the existing works in the literature.

References (25)