Abstract
Multi-Teacher Knowledge Distillation (MTKD) aims to transfer knowledge from multiple teacher models to a single student network. However, balancing contributions from diverse teachers remains a challenge. We present MTKD-RL, a framework that utilizes a Reinforcement Learning (RL) agent to dynamically assign sample-wise weights to teachers based on their performance and the capacity gap relative to the student. Evaluated across image classification, object detection, and semantic segmentation, MTKD-RL consistently outperforms state-of-the-art methods, demonstrating the efficacy of adaptive, sample-specific teacher weighting.
Introduction
Knowledge Distillation (KD) is a standard technique for compressing large models into efficient student networks. While using multiple teachers can provide richer supervision, existing methods often rely on static weights or simple heuristics that fail to account for two critical factors: individual teacher performance on specific samples and the "capacity gap" between a complex teacher and a simpler student. MTKD-RL addresses these limitations by framing multi-teacher KD as an RL optimization problem, allowing for adaptive, sample-wise weight assignment.
Methods
The MTKD-RL framework consists of three primary components: the State, the Agent, and the Reward.
- State ($s$): Captures evidence from teachers and the student for each input image, including performance metrics (logits, losses) and gap metrics (feature similarity, KL-divergence).
- Agent ($\pi$): A multi-layer perceptron (MLP) acts as the decision-maker, processing the state to output an Action ($a$), representing the relative weights for each teacher.
- Reward ($R$): Based on the student's performance improvement (loss reduction and distributional alignment) after training with the assigned weights.
The agent is optimized using the Policy Gradient (PG) algorithm in an iterative loop, refining its weighting strategy as the student evolves. This sample-wise dynamic allows the student to switch focus between teachers depending on the specific input image.
Results and Analysis
MTKD-RL was evaluated on benchmarks including CIFAR-100, ImageNet-1K, MS-COCO, and Cityscapes. On CIFAR-100, it achieved a 2.46% gain over the baseline, surpassing existing multi-teacher methods like MMKD. On ImageNet, ResNet-18 performance improved by 2.47%, outperforming the nearest competitor by 0.49%.
Ablation studies highlight that combining feature-level and logit-level information in the RL state yields the most significant performance gains. Furthermore, the system demonstrates robustness to the number of teachers ($M$), with performance generally scaling as more teachers are added. The sensitivity analysis for logit weight $\alpha$ and feature weight $\beta$ shows that the method is stable across a range of hyperparameter settings.
Discussion and Conclusion
A key insight from this work is the "Goldilocks" teacher principle: the most accurate teacher is not always the most effective for a specific student. By incorporating teacher-student gaps into the RL state, the agent learns to prioritize teachers whose complexity is manageable for the student's current capacity.
While MTKD-RL introduces a ~15% increase in training time and ~14% increase in memory usage, its superior performance across diverse tasks and architectures establishes it as a robust framework for multi-teacher distillation. Future work may explore automated teacher pool selection to further optimize the distillation process and reduce computational overhead.
Summary updated