Sinkhorn Distance Minimization for Knowledge Distillation

Xiao Cui, Yulei Qin, Yuting Gao, Enwei Zhang, Zihan Xu +5 more
2/27/2024
cs.LGcs.CL

No official code found. Best implementation: 2018cx/SinKD (130 stars, last commit 2025-04-27). 1 more below.

Abstract

Knowledge distillation (KD) has been widely adopted to compress large language models (LLMs). Existing KD methods investigate various divergence measures including the Kullback-Leibler (KL), reverse Kullback-Leibler (RKL), and Jensen-Shannon (JS) divergences. However, due to limitations inherent in their assumptions and definitions, these measures fail to deliver effective supervision when few distribution overlap exists between the teacher and the student. In this paper, we show that the aforementioned KL, RKL, and JS divergences respectively suffer from issues of mode-averaging, mode-collapsing, and mode-underestimation, which deteriorates logits-based KD for diverse NLP tasks. We propose the Sinkhorn Knowledge Distillation (SinKD) that exploits the Sinkhorn distance to ensure a nuanced and precise assessment of the disparity between teacher and student distributions. Besides, profit by properties of the Sinkhorn metric, we can get rid of sample-wise KD that restricts the perception of divergence in each teacher-student sample pair. Instead, we propose a batch-wise reformulation to capture geometric intricacies of distributions across samples in the high-dimensional space. Comprehensive evaluation on GLUE and SuperGLUE, in terms of comparability, validity, and generalizability, highlights our superiority over state-of-the-art methods on all kinds of LLMs with encoder-only, encoder-decoder, and decoder-only architectures.

View on arXivView PDF

Code Implementations(2)

2018cx/SinKDCommunity100%

Pytorch Implementation of "Sinkhorn Distance Minimization for Knowledge Distillation", COLING 2024 and TNNLS 2024

1302Shell, PythonOct 18, 20231 years ago

Replicating the paper: SinKD: Sinkhorn Distance Minimization for Knowledge Distillation

00Jupyter NotebookSep 23, 20251 years ago

Similar Papers

Cite this paper

@article{cui2024sinkhorn,
  title  = {Sinkhorn Distance Minimization for Knowledge Distillation},
  author = {Xiao Cui and Yulei Qin and Yuting Gao and Enwei Zhang and Zihan Xu and Tong Wu and Ke Li and Xing Sun and Wengang Zhou and Houqiang Li},
  year   = {2024},
  eprint = {2402.17110},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.17110v1}
}

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

Discussion