Gap Preserving Distillation by Building Bidirectional Mappings with A Dynamic Teacher

Yong Guo, Shulian Zhang, Haolin Pan, Jing Liu, Yulun Zhang, Jian Chen

Introduction

In traditional Knowledge Distillation (KD), a large, high-accuracy "teacher" model guides a smaller "student" model to improve its performance. However, there is a catch: if the teacher is too much better than the student, the student often fails to learn effectively.

Think of it like a toddler trying to learn physics from a Nobel laureate; the gap in foundational knowledge is simply too wide for the toddler to bridge. In deep learning, a massive capacity and accuracy gap—especially in the early stages of training—can lead to poor feature mimicry. While existing "assistant teacher" methods try to bridge this gap by adding intermediate models, they are often cumbersome to train and require multiple pre-trained stages.

To tackle this "capacity gap" problem, researchers have introduced Gap Preserving Distillation (GPD). By introducing a dynamic teacher trained from scratch alongside the student, GPD ensures the teacher and student start at the same performance level and share parameters, enabling highly effective knowledge transfer.

Methodology: The Dynamic Teacher Framework

GPD replaces or augments the traditional static teacher with a Dynamic Teacher (DT). The DT is essentially a larger, expanded version of the student that evolves dynamically during the training process.

Overview of the Gap Preserving Distillation (GPD) framework.

The framework relies on three key technical innovations to keep the student and teacher aligned:

  1. Inverse Reparameterization (IR): This is a "lossless" model expansion technique. It takes the student's architecture and expands it (by adding more channels or branches) to create the DT. Crucially, IR initializes the DT such that it has the exact same starting accuracy as the student. This prevents an immediate, overwhelming performance gap at the beginning of training.
  2. Channel-Branch Reparameterization (CBR): This acts as a "soft" bidirectional mapping. It allows the student to be directly extracted from the DT's parameters without needing any post-training.
  3. Hard Parameter Sharing: To ensure the models stay "in sync," the student and the DT share a significant portion of their weights. This forces the student to directly inherit well-learned features from its more capable dynamic counterpart.
Forward process mapping from the Dynamic Teacher to the Student via Channel-Branch Reparameterization.

During the training loop, the student learns from two sources: the traditional static teacher (if available) and the new dynamic teacher. The DT itself also learns from the static teacher, acting as a more "relatable" intermediary that the student can easily follow.

Key Insights

  • The "Goldilocks" Gap: The paper reinforces the idea that there is an optimal performance gap for learning. By training the teacher and student simultaneously, GPD maintains a "reasonable" lead that the student can actually follow, rather than an insurmountable one.
  • Mutual Information: Drawing on Information Bottleneck theory, the authors argue that "weaker" teachers (like the DT in its early stages) actually have higher mutual information regarding the input data. This makes their intermediate features easier for a small student to digest.
  • Initialization is Half the Battle: The IR method is a clever, general-purpose way to initialize large models from pre-trained small ones, allowing a larger model to start from the exact functional state of a smaller one.
  • Versatility: Unlike many KD methods that require a perfectly pre-trained teacher, GPD works remarkably well when training from scratch or fine-tuning, because the dynamic teacher adapts to the student's current state.

Experimental Results

The researchers evaluated GPD primarily on the ImageNet dataset across various architectures, including CNNs (ResNet18, ResNet34, ResNet50, MobileNetV1) and Transformers (RVT-S, RVT-Ti). GPD consistently outperformed established KD methods like DKD and ReviewKD:

  • ResNet34 → ResNet18: GPD improved the student's accuracy by 1.01% over the previous best method.
  • ResNet50 → MobileNet: GPD achieved a significant 1.58% accuracy boost.
  • Training from Scratch: Even without a pre-trained static teacher, GPD (using only the dynamic teacher) improved ResNet18 performance by 1.80%.
  • Efficiency: While training two models simultaneously sounds expensive, GPD only adds about 33% training time overhead due to its efficient parameter sharing and reparameterization techniques.

Limitations and Future Work

While highly effective, GPD does have a few limitations. First is hyperparameter sensitivity: while default values for the expansion ratio ($r=2$) and number of branches ($M=6$) work well for image classification, they might require tuning for vastly different tasks like object detection or segmentation. Second, the computational cost still represents a 33% overhead compared to standard training. Finally, the paper focuses heavily on image classification; future work could explore how to adapt GPD to domains like image restoration, where measuring "performance gaps" is less straightforward than simple accuracy metrics.

Summary updated

BibTeX
@inproceedings{guo2025gap,
  author = {Yong Guo and Shulian Zhang and Haolin Pan and Jing Liu and Yulun Zhang and Jian Chen},
  title = {{Gap Preserving Distillation by Building Bidirectional Mappings with A Dynamic Teacher}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=PnfghHD4Pi},
}
Figure