Review helps learn better: Temporal Supervised Knowledge Distillation

Dongwei Wang, Zhiyu Han, Yanmei Wang, Xi’ai Chen, Baichen Liu, Yandong Tang · DOI

TL;DR

This paper introduces Temporal Supervised Knowledge Distillation (TSKD), a novel method that leverages the temporal evolution of a student network's features during training. By treating learning as a "memorize-review" process and using a Conv-LSTM to capture temporal dependencies, TSKD allows students to refine old knowledge and use it to learn new information more effectively, leading to improved performance across various tasks.

What Problem Does This Paper Address?

Knowledge distillation (KD) is a popular technique to train smaller, more efficient "student" models by learning from larger, pre-trained "teacher" models. Existing KD methods primarily focus on distilling spatial knowledge, either from the teacher's output logits or intermediate feature maps. However, these approaches often overlook a crucial aspect of learning: the temporal dimension. The authors observe that a student network's feature evolution during training exhibits a temporal sequence property. They hypothesize that this temporal aspect, akin to human learning where reviewing past knowledge aids new learning, can be leveraged to improve distillation. The core problem addressed is how to effectively supervise the temporal learning process of a student network, enabling it to utilize its own evolving knowledge to learn more efficiently, rather than just mimicking static teacher outputs.

Methods

The proposed Temporal Supervised Knowledge Distillation (TSKD) framework introduces a "memorize-review" training paradigm. This involves:

  • Temporal Feature Extraction: Instead of directly distilling spatial features, TSKD uses a Convolutional Long Short-Term Memory (Conv-LSTM) network to extract spatiotemporal features from the increments of the student network's feature maps across different training epochs. These increments represent the "knowledge gained" at each step.
  • Dynamic Learning Target: The Conv-LSTM is trained using a dynamic target derived from the teacher network. This target is the absolute increment between the student's and teacher's feature maps at a review stage, representing "what needs to be learned." This dynamic target adapts as the student learns, making it more suitable than static targets.
  • Memorize-Review Cycle: The training process is divided into three types of nodes:
  • Memory Nodes: The student model's state is saved at specific intervals.
  • General Nodes: Standard training with only the task loss.
  • Review Nodes: The saved memory states are used to construct a "knowledge sequence." The Conv-LSTM predicts the next knowledge increment based on this sequence, and this prediction is used to supervise the student's learning via a temporal loss.
  • Loss Function: The overall student loss at review nodes is a combination of the standard task loss and the temporal loss: $L_{student} = L_{task} + \lambda L_{temporal}$.

Datasets

The paper evaluates TSKD on the following datasets:

  • CIFAR-100: For image classification.
  • ImageNet: For image classification.
  • MS-COCO: For object detection.

No new benchmarks were introduced; standard datasets were used to compare against existing methods.

Key Insights and Ideas

  • Learning is Temporal: The most significant insight is that the evolution of a neural network's internal representations during training follows a predictable temporal sequence. This is analogous to how humans learn by building upon and reviewing past knowledge.
  • Reviewing Old Knowledge Aids New Learning: TSKD demonstrates that by explicitly supervising the temporal learning process, students can effectively refine and utilize their own previously acquired knowledge to accelerate and improve current learning.
  • Dynamic Targets are Crucial: Using a dynamic target derived from the difference between student and teacher features at review stages is more effective than static targets, as it adapts to the student's progress.
  • Feature Increments Capture Essential Changes: Focusing on the increments of feature maps, rather than the raw feature maps themselves, helps filter out irrelevant information and highlights the new knowledge being acquired, leading to better temporal feature extraction.

Key Results

  • Improved Accuracy: TSKD consistently outperforms various state-of-the-art knowledge distillation methods (logits-based and spatial feature-based) on CIFAR-100, ImageNet, and MS-COCO datasets. For example, on CIFAR-100, TSKD achieves 3-5% improvement over existing methods.
  • Competitive Performance on ImageNet: On ImageNet, TSKD reduced the performance gap between student and teacher networks, achieving a 12% relative performance improvement in one setting.
  • Object Detection Gains: TSKD also shows benefits in object detection tasks, improving AP metrics when combined with methods like ReviewKD.
  • Efficiency: TSKD's computational cost is reduced because distillation only occurs during "review nodes," offering a better trade-off between training time and accuracy compared to methods that distill throughout the entire training process.
  • Generalizability: TSKD demonstrates strong knowledge transferability, outperforming other KD methods when transferring representations from CIFAR-100 to TinyImageNet.
  • Feature Discriminability: Visualizations (t-SNE) show that features learned by TSKD are more separable, indicating improved discriminative power.

Limitations and Future Work

  • Hyperparameter Sensitivity: The paper notes that hyperparameters like the loss weight ($\lambda$), number of memory nodes ($k$), and memory interval ($\delta$) are important and require careful tuning. Ablation studies explore their impact, but optimal settings might vary across tasks and architectures.
  • Memorize-Review Pipeline Complexity: The authors acknowledge that deploying the memorize-review pipeline can be challenging, suggesting that combining TSKD with other methods (like ReviewKD) can yield better results.
  • Future Work: The paper implicitly suggests future work could explore more sophisticated temporal feature extractors beyond Conv-LSTM, investigate optimal strategies for defining memory and review nodes, and apply TSKD to a wider range of tasks and architectures. The authors also hope their work contributes to interpretable deep learning.

Summary updated

Abstract

Reviewing plays an important role when learning knowledge. The knowledge acquisition at a certain time point may be strongly inspired with the help of previous experience. Thus the knowledge growing procedure should show strong relationship along the temporal dimension. In our research, we find that during the network training, the evolution of feature map follows temporal sequence property. A proper temporal supervision may further improve the network training performance. Inspired by this observation, we propose Temporal Supervised Knowledge Distillation (TSKD). Specifically, we extract the spatiotemporal features in the different training phases of student by convolutional Long Short-term memory network (Conv-LSTM). Then, we train the student net through a dynamic target, rather than static teacher network features. This process realizes the refinement of old knowledge in student network, and utilizes it to assist current learning. Extensive experiments verify the effectiveness and advantages of our method over existing knowledge distillation methods, including various network architectures and different tasks (image classification and object detection) .
BibTeX
@misc{wang2023review,
  author = {Dongwei Wang and Zhiyu Han and Yanmei Wang and Xi’ai Chen and Baichen Liu and Yandong Tang},
  title = {{Review helps learn better: Temporal Supervised Knowledge Distillation}},
  year = {2023},
  eprint = {2307.00811},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.00811},
}
Figure