Discriminative and Consistent Representation Distillation
Nikolaos Giakoumoglou, Tania Stathaki
TL;DR
Knowledge Distillation (KD) transfers knowledge from a large teacher to a smaller student, yet prior contrastive KD methods emphasize discrimination while neglecting the teacher–student structural relationships. Discriminative and Consistent Distillation (DCD) jointly optimizes a discriminative instance-level contrastive objective and a consistency regularization to align the teacher and student distributions, enhanced by memory-free in-batch negatives and learnable temperature and bias. The final objective combines supervised loss, KD, and the discriminative-consistent term, with $ ext{L}_{ ext{kd}} = ext{L}_{ ext{contrast}} + ext{alpha} ext{L}_{ ext{consist}}$ and $ ext{L} = ext{L}_{ ext{sup}} + ext{lambda} ext{L}_{ ext{distill}} + ext{beta L}_{ ext{kd}}$, enabling dynamic balancing during training. Empirically, DCD achieves state-of-the-art results on CIFAR-100 and ImageNet, improves transferability to Tiny ImageNet and STL-10, and reduces memory overhead compared to memory-bank-based methods, demonstrating strong generalization across architectures and datasets.
Abstract
Knowledge Distillation (KD) aims to transfer knowledge from a large teacher model to a smaller student model. While contrastive learning has shown promise in self-supervised learning by creating discriminative representations, its application in knowledge distillation remains limited and focuses primarily on discrimination, neglecting the structural relationships captured by the teacher model. To address this limitation, we propose Discriminative and Consistent Distillation (DCD), which employs a contrastive loss along with a consistency regularization to minimize the discrepancy between the distributions of teacher and student representations. Our method introduces learnable temperature and bias parameters that adapt during training to balance these complementary objectives, replacing the fixed hyperparameters commonly used in contrastive learning approaches. Through extensive experiments on CIFAR-100 and ImageNet ILSVRC-2012, we demonstrate that DCD achieves state-of-the-art performance, with the student model sometimes surpassing the teacher's accuracy. Furthermore, we show that DCD's learned representations exhibit superior cross-dataset generalization when transferred to Tiny ImageNet and STL-10.
