Unpacking the Gap Box Against Data-Free Knowledge Distillation
Yang Wang, Biao Qian, Haipeng Liu, Yong Rui, Meng Wang · IEEE Transactions on Pattern Analysis and Machine Intelligence · 2024
Data-free knowledge distillation (DFKD) improves the student model (S) by mimicking the class probability from a pre-trained teacher model (T) without training data. Under such setting, an ideal scenario is that T can help generate ”good” samples from a generator (G) to maximally benefit S. However, existing arts suffer from the non-ideal generated samples under the disturbance of the gap (i.e., either too large or small) between the class probabilities of T and S; for example, the generated samples with too large gap may exhibitexcessiveinformation for S, while too small gap leads to thelimitedknowledge in the samples, resulting into the poor generalization. Meanwhile, they fail to judge the ”goodness” of the generated samples for S since thefixedT is not necessarily ideal. In this paper, we aim to answerwhat is inside the gap box; together withhow to yield ”good” generated samples for DFKD?To this end, we propose aGap-SensitiveSampleGeneration (GapSSG) approach, by revisiting the empirical distilled risk from a data-free perspective, which confirms the existence of an ideal teacher (T$^*$), while theoretically implying: (1) the gap disturbance originates from themismatchbetween T and T$^*$, hence the class probabilities of T enable the approximation to those of T$^*$; and (2) ”good” samples should maximally benefit S via T's class probabilities, owing to unknown T$^*$. To this end, we unpack the gap box between T and S as two findings:inherentgap to perceive T and T$^*$;derivedgap to monitor S and T$^*$. Benefiting from thederivedgap that focuses on the adaptability of generated sample to S, we attempt to track student's training route (a series of training epochs) to capture the category distribution of S; upon which, a regulatory factor is further devised to approximate T$^*$overinherentgap, so as to generate ”good” samples to S. Furthermore, during the distillation process, a sample-balanced strategy comes up to tackle the overfitting and missing knowledge issues between the generated partial and critical samples by training G. The theoretical and empirical studies verify the advantages of GapSSG over the state-of-the-arts.Our code is available athttps://github.com/hfutqian/GapSSG.