Faculty Distillation with Optimal Transport

Su Lu, Han-Jia Ye, De-Chuan ZhanarXiv 2022 · OpenReview

Abstract

The outpouring of various pre-trained models empowers knowledge distillation (KD) by providing abundant teacher resources. Meanwhile, exploring the massive model repository to select a suitable teacher and further extracting its knowledge become daunting challenges. Standard KD fails to surmount two obstacles when training a student with the availability of plentiful pre-trained teachers, i.e., the "faculty". First, we need to seek out the most contributive teacher in the faculty efficiently rather than enumerating all of them for a student. Second, since the teacher may be pre-trained on different tasks w.r.t. the student, we must distill the knowledge from a more general label space. This paper studies this "faculty distillation" where a student performs teacher assessment and generalized knowledge reuse. We take advantage of optimal transport to construct a unifying objective for both problems, which bridges the semantic gap and measures the relatedness between a pair of models. This objective can select the most relevant teacher, and we minimize the same objective over student parameters to transfer the knowledge from the selected teacher subsequently. Experiments in various settings demonstrate the succinctness and versatility of our proposed method.

The Challenge of Faculty Distillation

Standard Knowledge Distillation (KD) typically assumes that the teacher and student share the exact same label space. However, in practical large-scale applications, we often face a "faculty" of teachers—a vast repository of models trained on diverse, potentially unrelated tasks. This scenario introduces two major hurdles:

  1. The Teacher Selection Problem: Efficiently identifying the most relevant teacher from a repository (e.g., 1,000+ models) without the prohibitive cost of training a student against every candidate.
  2. The Semantic Gap (Support Mismatch): Standard KD relies on matching probability distributions (e.g., via KL-divergence), which requires identical output dimensions. When a teacher is trained on one set of classes (e.g., "cats vs. dogs") and the student on another (e.g., "tigers vs. wolves"), traditional methods fail because the label spaces do not align.
Comparison between standard KD and the proposed Selective Cross-Task Distillation framework.

Bridging the Semantic Gap with Optimal Transport

To address the support mismatch, the authors propose using Optimal Transport (OT), specifically the Sinkhorn Distance, to bridge different label spaces. Instead of forcing a direct class-to-class match, the framework treats the teacher's and student's predictions as distributions and finds an optimal transportation plan to move confidence from the teacher's classes to the student's.

Distribution matching across different label sets using Optimal Transport and class similarity.

A critical component is the Cost Matrix, which defines the "distance" between classes. The authors leverage the teacher's embedding network to compute Euclidean distances between class centers in a shared feature space. If the teacher's "cat" feature is semantically close to the student's "tiger" feature, the transportation cost is low, allowing the distillation process to become semantically aware.

Efficient Teacher Assessment

To solve the selection problem without full training, the paper introduces the concept of a "fictitious student." By training a simple linear classifier on top of a teacher's frozen features, the performance of this linear probe serves as a low-cost proxy for the potential benefit of that teacher. This assessment metric is highly effective, achieving a Pearson correlation of 0.72 with actual ground-truth student accuracy, significantly outperforming existing metrics like NCE (0.23) and LEEP (0.31).

Experimental Results

The method was evaluated across various datasets, including CIFAR-100, CUB (Birds), and cross-domain tasks like Stanford Dogs and MIT Indoor Scenes. Key findings include:

  • Superior Performance: In cross-task scenarios with 0% class overlap, the proposed method consistently outperformed state-of-the-art techniques like ReFilled and MGD, often by 1-2% in top-1 accuracy.
  • Robustness: The OT-based approach is robust to irrelevant teachers; if the task gap is too large, the distillation term provides less guidance rather than harming performance.
  • Efficiency: The fictitious student approximation allows for high-quality teacher ranking in a fraction of the time required for full training, making it feasible for large-scale repositories.

Conclusion

Selective Cross-Task Distillation moves beyond the "same task assumption" to a more flexible "relevant task assumption." By utilizing Optimal Transport to bridge semantic gaps and a fictitious student for efficient assessment, this framework enables effective knowledge reuse from diverse model repositories. Future work may explore distilling from ensembles of diverse teachers and optimizing search for massive repositories.

Summary updated

Abstract

The outpouring of various pre-trained models empowers knowledge distillation~(KD) by providing abundant teacher resources. Meanwhile, exploring the massive model repository to select a suitable teacher and further extracting its knowledge become daunting challenges. Standard KD fails to surmount two obstacles when training a student with the availability of plentiful pre-trained teachers, i.e., the "faculty". First, we need to seek out the most contributive teacher in the faculty efficiently rather than enumerating all of them for a student. Second, since the teacher may be pre-trained on different tasks w.r.t. the student, we must distill the knowledge from a more general label space. This paper studies this ``faculty distillation'' where a student performs teacher assessment and generalized knowledge reuse. We take advantage of optimal transport to construct a unifying objective for both problems, which bridges the semantic gap and measures the relatedness between a pair of models. This objective can select the most relevant teacher, and we minimize the same objective over student parameters to transfer the knowledge from the selected teacher subsequently. Experiments in various settings demonstrate the succinctness and versatility of our proposed method.
BibTeX
@misc{lu2022faculty,
  author = {Su Lu and Han-Jia Ye and De-Chuan Zhan},
  title = {{Faculty Distillation with Optimal Transport}},
  year = {2022},
  eprint = {2204.11526},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.11526},
}
Figure