Table of Contents
Fetching ...

BicKD: Bilateral Contrastive Knowledge Distillation

Jiangnan Zhu, Yukai Xu, Li Xiong, Yixuan Liu, Junxu Liu, Hong kyu Lee, Yujie Gu

TL;DR

BicKD addresses limitations of traditional logit-based knowledge distillation by introducing a bilateral contrastive framework that enforces orthogonality among class directions in the teacher’s probability space and enables explicit cross-class comparisons between teacher and student. The method combines sample-wise and class-wise contrastive losses with standard supervision to guide the student toward the teacher’s geometric probability structure. Empirical results on CIFAR-100 and Tiny-ImageNet show BicKD consistently outperforms state-of-the-art KD baselines across diverse architectures, with ablations confirming the value of both contrast components and orthogonality regularization. The approach is simple, memory-efficient (operating on logits), and robust to data-scarce and long-tailed settings, suggesting strong practical impact for efficient model deployment.

Abstract

Knowledge distillation (KD) is a machine learning framework that transfers knowledge from a teacher model to a student model. The vanilla KD proposed by Hinton et al. has been the dominant approach in logit-based distillation and demonstrates compelling performance. However, it only performs sample-wise probability alignment between teacher and student's predictions, lacking an mechanism for class-wise comparison. Besides, vanilla KD imposes no structural constraint on the probability space. In this work, we propose a simple yet effective methodology, bilateral contrastive knowledge distillation (BicKD). This approach introduces a novel bilateral contrastive loss, which intensifies the orthogonality among different class generalization spaces while preserving consistency within the same class. The bilateral formulation enables explicit comparison of both sample-wise and class-wise prediction patterns between teacher and student. By emphasizing probabilistic orthogonality, BicKD further regularizes the geometric structure of the predictive distribution. Extensive experiments show that our BicKD method enhances knowledge transfer, and consistently outperforms state-of-the-art knowledge distillation techniques across various model architectures and benchmarks.

BicKD: Bilateral Contrastive Knowledge Distillation

TL;DR

BicKD addresses limitations of traditional logit-based knowledge distillation by introducing a bilateral contrastive framework that enforces orthogonality among class directions in the teacher’s probability space and enables explicit cross-class comparisons between teacher and student. The method combines sample-wise and class-wise contrastive losses with standard supervision to guide the student toward the teacher’s geometric probability structure. Empirical results on CIFAR-100 and Tiny-ImageNet show BicKD consistently outperforms state-of-the-art KD baselines across diverse architectures, with ablations confirming the value of both contrast components and orthogonality regularization. The approach is simple, memory-efficient (operating on logits), and robust to data-scarce and long-tailed settings, suggesting strong practical impact for efficient model deployment.

Abstract

Knowledge distillation (KD) is a machine learning framework that transfers knowledge from a teacher model to a student model. The vanilla KD proposed by Hinton et al. has been the dominant approach in logit-based distillation and demonstrates compelling performance. However, it only performs sample-wise probability alignment between teacher and student's predictions, lacking an mechanism for class-wise comparison. Besides, vanilla KD imposes no structural constraint on the probability space. In this work, we propose a simple yet effective methodology, bilateral contrastive knowledge distillation (BicKD). This approach introduces a novel bilateral contrastive loss, which intensifies the orthogonality among different class generalization spaces while preserving consistency within the same class. The bilateral formulation enables explicit comparison of both sample-wise and class-wise prediction patterns between teacher and student. By emphasizing probabilistic orthogonality, BicKD further regularizes the geometric structure of the predictive distribution. Extensive experiments show that our BicKD method enhances knowledge transfer, and consistently outperforms state-of-the-art knowledge distillation techniques across various model architectures and benchmarks.
Paper Structure (27 sections, 11 equations, 3 figures, 7 tables, 1 algorithm)

This paper contains 27 sections, 11 equations, 3 figures, 7 tables, 1 algorithm.

Figures (3)

  • Figure 1: Class-wise orthogonality in probability space. Ideally, the mean vectors of different classes are orthogonal, and sample-wise predictions are distributed close to the mean vector of each class.
  • Figure 2: Bilateral contrast used in BicKD. The sample-wise contrast loss is defined to align the same sample/row of teacher and student, and amplify the orthogonality between samples/rows in distinct classes. The class-wise contrast loss is defined to align the same class/column and amplify the orthogonality between different classes/columns of teacher and student models.
  • Figure 3: Accuracy (%) of BicKD and Vanilla KD on CIFAR-100-FS with varying data volumes.