Relational Representation Distillation

Nikolaos Giakoumoglou, Tania Stathaki
7/16/2024
6 citations
cs.CVcs.AI
contrastive-ssldistillation

No official code found. Best implementation: giakoumoglou/rrd (14 stars, Python, MIT, PyTorch, last commit 2025-12-02).

Abstract

Knowledge distillation involves transferring knowledge from large, cumbersome teacher models to more compact student models. The standard approach minimizes the Kullback-Leibler (KL) divergence between the probabilistic outputs of a teacher and student network.

Show full abstract

However, this approach fails to capture important structural relationships in the teacher's internal representations. Recent advances have turned to contrastive learning objectives, but these methods impose overly strict constraints through instance-discrimination, forcing apart semantically similar samples even when they should maintain similarity. This motivates an alternative objective by which we preserve relative relationships between instances. Our method employs separate temperature parameters for teacher and student distributions, with sharper student outputs, enabling precise learning of primary relationships while preserving secondary similarities. We show theoretical connections between our objective and both InfoNCE loss and KL divergence. Experiments demonstrate that our method significantly outperforms existing knowledge distillation methods across diverse knowledge transfer tasks, achieving better alignment with teacher models, and sometimes even outperforms the teacher network.

View on arXivView PDF

Code Implementations(1)

giakoumoglou/rrdCommunity100%
PyTorchMIT

PyTorch implementation of RRD: https://arxiv.org/abs/2407.12073

141Python, ShellJun 30, 202412 months agoMIT
knowledge-distillationknowledge-transferpytorchrepresentation-learning

Similar Papers

Cite this paper

@article{giakoumoglou2024relational,
  title  = {Relational Representation Distillation},
  author = {Nikolaos Giakoumoglou and Tania Stathaki},
  year   = {2024},
  eprint = {2407.12073},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.12073v5}
}

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/2407.12073.svg)](https://codeofpaper.com/paper/2407.12073)

Discussion