Introduction
Deep learning models are increasingly deployed on edge devices with limited computational resources. To facilitate this, researchers employ two primary techniques: Quantization, which reduces numerical precision (e.g., from 32-bit floats to 2-4 bit integers), and Knowledge Distillation (KD), where a high-capacity "teacher" model guides a smaller "student" model. While both are effective independently, combining them often leads to sub-optimal performance. Quantized models, due to their restricted representation power, can be overwhelmed by the strong regularization signals of a full-precision teacher, leading to poor convergence.
The QKD Framework
To address the incompatibility between quantization and distillation, the authors propose Quantization-aware Knowledge Distillation (QKD). This approach utilizes a coordinated three-phase training strategy designed to bridge the gap between high-precision teachers and low-precision students.
Phase 1: Self-studying (SS)
In the initial phase, the quantized student network is trained independently using standard cross-entropy loss. This phase serves as a critical initialization step, providing the student with a stable foundation before it is exposed to the more complex guidance of the teacher.
Phase 2: Co-studying (CS)
The second phase involves joint training of the full-precision teacher and the quantized student. Unlike traditional KD, the teacher is not static; it adapts to become "quantization-friendly" by learning to mimic the student's distribution while maintaining its own accuracy. This mutual adaptation reduces the representational gap, making the teacher's knowledge more accessible to the low-bit student.
Phase 3: Tutoring (TU)
In the final phase, the teacher's weights are frozen, and the student undergoes a final round of distillation. This phase leverages the now-optimized teacher to refine the student's weights, ensuring maximum performance recovery without the additional overhead of updating the teacher.
Experimental Results
The QKD framework was evaluated on the ImageNet dataset using various architectures, including ResNet-18 and MobileNetV2. The results demonstrate that QKD consistently outperforms existing state-of-the-art quantization methods across multiple bit-widths.
Performance Highlights
- ResNet-18: At 4-bit (W4A4) precision, QKD achieved a Top-1 accuracy of 71.4%, surpassing previous benchmarks by 1.3%. Notably, QKD recovered full-precision accuracy at just 3-bit (W3A3) quantization.
- MobileNetV2: This architecture is notoriously difficult to quantize due to its depthwise-separable convolutions. QKD achieved 67.4% accuracy at 4-bit precision, a significant 2.6% improvement over the baseline. Full-precision recovery was achieved at 6-bit (W6A6) precision.
Conclusion
QKD demonstrates that the historical failure to combine quantization and knowledge distillation was a matter of coordination rather than fundamental incompatibility. By employing a phased training schedule that includes teacher adaptation and careful initialization, QKD enables ultra-low-bit models to achieve high accuracy, making them viable for sophisticated edge computing applications. Future work may extend this framework to other domains like Natural Language Processing and explore automated bit-width selection.
Summary updated