Contrastive Representation Distillation

Yonglong Tian, Dilip Krishnan, Phillip Isola
10/23/2019
cs.LGcs.CVstat.ML

Official code: HobbitLong/RepDistiller (2,444 stars, BSD-2-Clause, last commit 2023-10-16).

Abstract

Often we wish to transfer representational knowledge from one neural network to another. Examples include distilling a large network into a smaller one, transferring knowledge from one sensory modality to a second, or ensembling a collection of models into a single estimator. Knowledge distillation, the standard approach to these problems, minimizes the KL divergence between the probabilistic outputs of a teacher and student network. We demonstrate that this objective ignores important structural knowledge of the teacher network. This motivates an alternative objective by which we train a student to capture significantly more information in the teacher's representation of the data. We formulate this objective as contrastive learning. Experiments demonstrate that our resulting new objective outperforms knowledge distillation and other cutting-edge distillers on a variety of knowledge transfer tasks, including single model compression, ensemble distillation, and cross-modal transfer. Our method sets a new state-of-the-art in many transfer tasks, and sometimes even outperforms the teacher network when combined with knowledge distillation. Code: http://github.com/HobbitLong/RepDistiller.

View on arXivView PDF

Code Implementations(1)

BSD-2-Clause

[ICLR 2020] Contrastive Representation Distillation (CRD), and benchmark of recent knowledge distillation methods

2,444398Shell, PythonOct 21, 20193 years agoBSD-2-Clause

Similar Papers

Cite this paper

@article{tian2019contrastive,
  title  = {Contrastive Representation Distillation},
  author = {Yonglong Tian and Dilip Krishnan and Phillip Isola},
  year   = {2019},
  eprint = {1910.10699},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1910.10699}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1910.10699.svg)](https://codeofpaper.com/paper/1910.10699)

Discussion