Decoupled Kullback-Leibler Divergence Loss

Jiequan Cui, Zhuotao Tian, Zhisheng Zhong, Xiaojuan Qi, Bei Yu +1 more
5/1/2023
126 citations
distillation

Official code: jiequancui/DKL (50 stars, Python, last commit 2025-07-21).

Abstract

In this paper, we delve deeper into the Kullback-Leibler (KL) Divergence loss and mathematically prove that it is equivalent to the Decoupled Kullback-Leibler (DKL) Divergence loss that consists of 1) a weighted Mean Square Error (wMSE) loss and 2) a Cross-Entropy loss incorporating soft labels. Thanks to the decomposed formulation of DKL loss, we have identified two areas for improvement.

Show full abstract

Firstly, we address the limitation of KL/DKL in scenarios like knowledge distillation by breaking its asymmetric optimization property. This modification ensures that the $\mathbf{w}$MSE component is always effective during training, providing extra constructive cues. Secondly, we introduce class-wise global information into KL/DKL to mitigate bias from individual samples. With these two enhancements, we derive the Improved Kullback-Leibler (IKL) Divergence loss and evaluate its effectiveness by conducting experiments on CIFAR-10/100 and ImageNet datasets, focusing on adversarial training, and knowledge distillation tasks. The proposed approach achieves new state-of-the-art adversarial robustness on the public leaderboard -- RobustBench and competitive performance on knowledge distillation, demonstrating the substantial practical merits. Our code is available at https://github.com/jiequancui/DKL.

View on arXivView PDF

Code Implementations(1)

jiequancui/DKLOfficial100%

Decoupled Kullback-Leibler Divergence Loss (DKL), NeurIPS 2024 / Generalized Kullback-Leibler Divergence Loss (GKL)

504Python, Jupyter NotebookMay 18, 20231 years ago
adversarial-robustnessclipimage-classificationimagenetknowledge-distillation+5 more

Similar Papers

Cite this paper

@article{cui2023decoupled,
  title  = {Decoupled Kullback-Leibler Divergence Loss},
  author = {Jiequan Cui and Zhuotao Tian and Zhisheng Zhong and Xiaojuan Qi and Bei Yu and Hanwang Zhang},
  year   = {2023},
  eprint = {2305.13948},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2305.13948},
  journal = {NEURIPS 2024 2024}
}

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

Discussion