Knowledge Distillation via the Target-aware Transformer
Sihao Lin, Hongwei Xie, Bing Wang, Kaicheng Yu, Xiaojun Chang, Xiaodan Liang, Gang Wang
TL;DR
The paper tackles semantic mismatch in knowledge distillation when transferring from large teachers to smaller students by proposing a target-aware transformer (TaT) that enables one-to-all spatial distillation, reconfiguring the student features conditioned on teacher components. It introduces a hierarchical distillation framework with patch-group and anchor-point distillation to manage computational complexity and capture local as well as global dependencies. Empirical results on ImageNet, Pascal VOC, and COCOStuff10k show significant gains over state-of-the-art KD methods, including substantial improvements for compact architectures and segmentation tasks. The approach offers a practical path to stronger, more transferable representations in resource-constrained models, with potential extensions to multi-layer distillation and other vision tasks in future work.
Abstract
Knowledge distillation becomes a de facto standard to improve the performance of small neural networks. Most of the previous works propose to regress the representational features from the teacher to the student in a one-to-one spatial matching fashion. However, people tend to overlook the fact that, due to the architecture differences, the semantic information on the same spatial location usually vary. This greatly undermines the underlying assumption of the one-to-one distillation approach. To this end, we propose a novel one-to-all spatial matching knowledge distillation approach. Specifically, we allow each pixel of the teacher feature to be distilled to all spatial locations of the student features given its similarity, which is generated from a target-aware transformer. Our approach surpasses the state-of-the-art methods by a significant margin on various computer vision benchmarks, such as ImageNet, Pascal VOC and COCOStuff10k. Code is available at https://github.com/sihaoevery/TaT.
