CKD: Contrastive Knowledge Distillation from A Sample-wise Perspective

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zhu, Wencheng, Zhou, Xin, Zhu, Pengfei, Wang, Yu, Hu, Qinghua
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866917967423340544
author Zhu, Wencheng
Zhou, Xin
Zhu, Pengfei
Wang, Yu
Hu, Qinghua
author_facet Zhu, Wencheng
Zhou, Xin
Zhu, Pengfei
Wang, Yu
Hu, Qinghua
contents In this paper, we propose a simple yet effective contrastive knowledge distillation framework that achieves sample-wise logit alignment while preserving semantic consistency. Conventional knowledge distillation approaches exhibit over-reliance on feature similarity per sample, which risks overfitting, and contrastive approaches focus on inter-class discrimination at the expense of intra-sample semantic relationships. Our approach transfers "dark knowledge" through teacher-student contrastive alignment at the sample level. Specifically, our method first enforces intra-sample alignment by directly minimizing teacher-student logit discrepancies within individual samples. Then, we utilize inter-sample contrasts to preserve semantic dissimilarities across samples. By redefining positive pairs as aligned teacher-student logits from identical samples and negative pairs as cross-sample logit combinations, we reformulate these dual constraints into an InfoNCE loss framework, reducing computational complexity lower than sample squares while eliminating dependencies on temperature parameters and large batch sizes. We conduct comprehensive experiments across three benchmark datasets, including the CIFAR-100, ImageNet-1K, and MS COCO datasets, and experimental results clearly confirm the effectiveness of the proposed method on image classification, object detection, and instance segmentation tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2404_14109
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CKD: Contrastive Knowledge Distillation from A Sample-wise Perspective
Zhu, Wencheng
Zhou, Xin
Zhu, Pengfei
Wang, Yu
Hu, Qinghua
Computer Vision and Pattern Recognition
In this paper, we propose a simple yet effective contrastive knowledge distillation framework that achieves sample-wise logit alignment while preserving semantic consistency. Conventional knowledge distillation approaches exhibit over-reliance on feature similarity per sample, which risks overfitting, and contrastive approaches focus on inter-class discrimination at the expense of intra-sample semantic relationships. Our approach transfers "dark knowledge" through teacher-student contrastive alignment at the sample level. Specifically, our method first enforces intra-sample alignment by directly minimizing teacher-student logit discrepancies within individual samples. Then, we utilize inter-sample contrasts to preserve semantic dissimilarities across samples. By redefining positive pairs as aligned teacher-student logits from identical samples and negative pairs as cross-sample logit combinations, we reformulate these dual constraints into an InfoNCE loss framework, reducing computational complexity lower than sample squares while eliminating dependencies on temperature parameters and large batch sizes. We conduct comprehensive experiments across three benchmark datasets, including the CIFAR-100, ImageNet-1K, and MS COCO datasets, and experimental results clearly confirm the effectiveness of the proposed method on image classification, object detection, and instance segmentation tasks.
title CKD: Contrastive Knowledge Distillation from A Sample-wise Perspective
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2404.14109