Differentiable Feature Aggregation Search for Knowledge Distillation

Yushuo Guan, Pengyu Zhao, Bingxuan Wang, Yuanxing Zhang, Cong Yao, Kaigui Bian, Jian Tang

Abstract

Knowledge distillation has become increasingly important in model compression. It boosts the performance of a miniaturized student network with the supervision of the output distribution and feature maps from a sophisticated teacher network. Some recent works introduce multi-teacher distillation to provide more supervision to the student network. However, the effectiveness of multi-teacher distillation methods are accompanied by costly computation resources. To tackle with both the efficiency and the effectiveness of knowledge distillation, we introduce the feature aggregation to imitate the multi-teacher distillation in the single-teacher distillation framework by extracting informative supervision from multiple teacher feature maps. Specifically, we introduce DFA, a two-stage Differentiable Feature Aggregation search method that motivated by DARTS in neural architecture search, to efficiently find the aggregations. In the first stage, DFA formulates the searching problem as a bi-level optimization and leverages a novel bridge loss, which consists of a student-to-teacher path and a teacher-to-student path, to find appropriate feature aggregations. The two paths act as two players against each other, trying to optimize the unified architecture parameters to the opposite directions while guaranteeing both expressivity and learnability of the feature aggregation simultaneously. In the second stage, DFA performs knowledge distillation with the derived feature aggregation. Experimental results show that DFA outperforms existing distillation methods on CIFAR-100 and CINIC-10 datasets under various teacher-student settings, verifying the effectiveness and robustness of the design.

Introduction: The Efficiency-Effectiveness Trade-off

Knowledge Distillation (KD) is a cornerstone of model compression, where a small "student" network learns to mimic a large, high-performing "teacher." Traditional KD focuses on the teacher's final output (Output Distillation) or specific intermediate feature maps (Feature Distillation). Recent research indicates that "multi-teacher" distillation—aggregating knowledge from several models—yields superior results.

However, running multiple large teacher models is computationally expensive. Furthermore, manually choosing which layers of a single teacher to aggregate is a complex task requiring extensive trial and error. A fundamental tension exists: deep layers contain rich semantic information but are hard for shallow students to learn, while shallow layers are easy to learn but lack complexity.

Comparison of different knowledge distillation paradigms: (a) Output Distillation, (b) Feature Distillation, (c) Multi-teacher Distillation, and (d) The Proposed Method.

Methodology: Differentiable Feature Aggregation (DFA)

The authors propose DFA, which treats the selection of teacher features as an architecture search problem. Instead of supervising the student with just the last layer of a teacher's block, DFA uses a weighted sum of all feature maps within that block.

Borrowing from DARTS (Differentiable Architecture Search), the weights for these layers are treated as continuous parameters ($\beta$). These are optimized using a bi-level optimization strategy: model weights are updated on the training set, while aggregation weights are updated on a validation set.

The Bridge Loss

Standard distillation losses often fail during search because the system "cheats" by picking the easiest (shallowest) layers to mimic. To fix this, the authors introduce a "Bridge Loss" consisting of two paths:

  • Teacher-to-Student (TS) Path: Aggregated teacher features are fed into the student’s subsequent layers to evaluate if they minimize classification error, ensuring expressivity.
  • Student-to-Teacher (ST) Path: The student tries to mimic the aggregated teacher features directly, ensuring learnability.
Detailed view of the proposed DFA method showing feature aggregation within groups and the application of Bridge Loss.

Experimental Setup

The researchers evaluated DFA on two primary computer vision benchmarks:

  • CIFAR-100: A standard dataset with 100 classes. A 7:3 split was used for training and validation during the search phase.
  • CINIC-10: A larger dataset containing 270,000 images derived from CIFAR-10 and ImageNet, used to test the generalization of distillation methods.

Key Insights

  • Single Teacher, Multiple "Personalities": By aggregating different layers, a single teacher provides the diverse supervision typically found only in multi-teacher ensembles.
  • The Learnability Trap: Optimizing solely for mimicry causes the search to gravitate toward the simplest features. The "Bridge Loss" forces the search to find features that are both complex and digestible.
  • Transferable Wisdom: Weights searched on CIFAR-100 could be successfully applied to CINIC-10, suggesting that optimal feature aggregation is somewhat universal for a given architecture.

Results and Performance

  • Surpassing the Teacher: On CIFAR-100, using a Wide Residual Network (WRN-28-4) as a teacher and a WRN-16-4 as a student, DFA achieved an accuracy of 79.74%, surpassing the teacher's own accuracy of 79.17%.
  • State-of-the-Art: DFA consistently outperformed eight other popular distillation methods (including FitNets, AT, and SP) across various teacher-student pairs.
  • Efficiency: Time complexity remains competitive with standard feature distillation because it only requires a single teacher network.

Conclusion and Future Work

While DFA is efficient, it requires an initial search stage. Future work could explore expanding the search space to allow cross-resolution aggregation or applying this method to complex tasks like object detection and semantic segmentation.

Summary updated

BibTeX
@inproceedings{guan2020differentiable,
  author = {Yushuo Guan and Pengyu Zhao and Bingxuan Wang and Yuanxing Zhang and Cong Yao and Kaigui Bian and Jian Tang},
  title = {{Differentiable Feature Aggregation Search for Knowledge Distillation}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=QZBFEvcBbF},
}
Figure