Spot-adaptive Knowledge Distillation
Knowledge distillation (KD) has become a well established paradigm for
compressing deep neural networks. The typical way of conducting knowledge
distillation is to train the student network under the supervision of the
teacher network to harness the knowledge at one or multiple spots (i.e.,
layers) in the teacher network. The distillation spots, once specified, will
not change for all the training samples, throughout the whole distillation
process. In this work, we argue that distillation spots should be adaptive to
training samples and distillation epochs. We thus propose a new distillation
strategy, termed spot-adaptive KD (SAKD), to adaptively determine the
distillation spots in the teacher network per sample, at every training
iteration during the whole distillation period. As SAKD actually focuses on
"where to distill" instead of "what to distill" that is widely investigated by
most existing works, it can be seamlessly integrated into existing distillation
methods to further improve their performance. Extensive experiments with 10
state-of-the-art distillers are conducted to demonstrate the effectiveness of
SAKD for improving their distillation performance, under both homogeneous and
heterogeneous distillation settings. Code is available at
https://github.com/zju-vipa/spot-adaptive-pytorch