Self-Supervised Quantization-Aware Knowledge Distillation

Kaiqi Zhao, Ming ZhaoAISTATS 2024

Introduction

As deep learning models are increasingly deployed to edge devices like mobile phones and IoT sensors, the demand for efficient, low-bit neural networks has grown. Quantization—the process of converting 32-bit floating-point weights into low-bit integers—is a primary solution, but it often results in significant accuracy degradation, especially at ultra-low precisions (1-3 bits).

Traditional approaches combine Quantization-Aware Training (QAT) with Knowledge Distillation (KD), where a high-precision "teacher" model guides a low-precision "student." However, these methods typically require labeled datasets and complex hyperparameter tuning to balance label-based cross-entropy (CE) loss with teacher-based distillation loss. This paper introduces SQAKD (Self-Supervised Quantization-Aware Knowledge Distillation), a framework that eliminates the need for labels and manual tuning by adopting a purely self-supervised approach.

Methodology

SQAKD simplifies the training process into a single-phase optimization problem. The core innovation lies in removing the Cross-Entropy loss entirely, relying solely on the KL-divergence (KL-Loss) between the teacher and student output distributions.

The SQAKD framework: A full-precision teacher guides a low-precision student using only KL-Loss, removing the need for ground-truth labels.

Technical highlights include:

  • Unified Quantization Dynamics: A generalized framework compatible with various quantizers (e.g., PACT, LSQ) that unifies forward and backward propagation.
  • Self-Supervised Objective: By matching only the teacher's distribution, the student avoids the "conflict" between ground-truth labels and teacher knowledge, which often occurs in low-bit regimes.
  • Discretization Error Integration: A novel gradient formula explicitly accounts for the gap between continuous and quantized weights during backpropagation, smoothing the optimization landscape.

Experimental Results

The framework was evaluated on CIFAR-10, CIFAR-100, and Tiny-ImageNet across various architectures, including ResNet, VGG, and MobileNet-V2.

SQAKD consistently outperformed state-of-the-art methods. For instance, on 1-bit VGG-13 (CIFAR-100), SQAKD improved accuracy by 17.09% compared to existing KD methods. In several tests, the quantized student even surpassed the accuracy of the original full-precision model.

Top-1 Test Accuracy on CIFAR-10 (W2A2 precision). SQAKD (blue) significantly outperforms standard EWGS (green) and approaches or exceeds full-precision (FP) performance.

Key findings include:

  • KL-Loss Sufficiency: Minimizing KL-Loss naturally reduces CE-Loss, proving that the teacher's "dark knowledge" is a superior signal for low-bit students than raw labels.
  • Optimization Stability: 3D visualizations of the loss surface revealed that SQAKD produces a flatter, smoother landscape, which correlates with better model generalization.
  • Edge Performance: On an NVIDIA Jetson Nano, SQAKD-optimized 8-bit models achieved a 3x inference speedup with negligible accuracy loss.

Conclusion and Future Work

SQAKD represents a significant advancement in label-free model compression, offering a hyperparameter-free solution that excels at ultra-low precision. While highly effective for image classification, future research will explore its application to more complex tasks like object detection and natural language processing, as well as optimizing the distillation process for architectures with complex skip connections.

Summary updated

BibTeX
@inproceedings{zhao2024self,
  author = {Kaiqi Zhao and Ming Zhao},
  title = {{Self-Supervised Quantization-Aware Knowledge Distillation}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
}
Figure