CVPR2024

Small Scale Data-Free Knowledge Distillation

He Liu, Yikai Wang, Huaping Liu, Fuchun Sun, Anbang Yao

Abstract

Data-free knowledge distillation is able to utilize the knowledge learned by a large teacher network to augment the training of a smaller student network without accessing the original training data, avoiding privacy, security, and proprietary risks in real applications. In this line of research, existing methods typically follow an inversion-anddistillation paradigm in which a generative adversarial network on-the-fly trained with the guidance of the pre-trained teacher network is used to synthesize a large-scale sample set for knowledge distillation. In this paper, we reexamine this common data-free knowledge distillation paradigm, showing that there is considerable room to improve the overall training efficiency through a lens of "small-scale inverted data for knowledge distillation". In light of three empirical observations indicating the importance of how to balance class distributions in terms of synthetic sample diversity and difficulty during both data inversion and distillation processes, we propose Small Scale Data-free Knowledge Distillation (SSD-KD). In formulation, SSD-KD introduces a modulating function to balance synthetic samples and a priority sampling function to select proper samples, facilitated by a dynamic replay buffer and a reinforcement learning strategy. As a result, SSD-KD can perform distillation training conditioned on an extremely small scale of synthetic samples (e.g., 10× less than the original training data scale), making the overall training efficiency one or two orders of magnitude faster than many mainstream methods while retaining superior or competitive model performance, as demonstrated on popular image classification and semantic segmentation benchmarks. The code is available at https://github.com/OSVAI/SSD-KD . * Equal contribution. † Corresponding author. This work was done when He Liu was an intern at Intel Labs China, supervised by Anbang Yao who conceived the project. planemobile bird cat deer dog frog horse ship truck Category 50 55 60 65 70 75 80 85 90 95 Accuracy (%) CIFAR-10 (T:ResNet34, S:ResNet18) Vanilla KD DeepInv SSD-KD planemobile bird cat deer dog frog horse ship truck Category 50 55 60 65 70 75 80 85 90 95 Accuracy (%) CIFAR-10 (T:VGG11, S:ResNet18) Vanilla KD DeepInv SSD-KD planemobile bird cat deer dog frog horse ship truck Category 50 55 60 65 70 75 80 85 90 95 Accuracy (%)