SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.08139 · NeurIPS · 2024

Wasserstein Distance Rivals Kullback-Leibler Divergence for Knowledge Distillation

Peihua Li, Jiaming Lv, Haoyuan Yang

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
JiamingLv/WKD — 6 of 7
FunctionStatusWhere it lives
Distiller Ran JiamingLv/WKD/mdistiller/distillers/WKD.py
pointer only (licence: NONE) · get_code("a7d92810cbf3fd01")
adaptive_avg_std_pool2d Ran JiamingLv/WKD/mdistiller/distillers/WKD.py
pointer only (licence: NONE) · get_code("0a86b2e40fe52f88")
sinkhorn Ran JiamingLv/WKD/mdistiller/distillers/WKD.py
pointer only (licence: NONE) · get_code("e6f1ae7024ada5d7")
wkd_feature_loss Ran JiamingLv/WKD/mdistiller/distillers/WKD.py
pointer only (licence: NONE) · get_code("3be6ccd2a66c49ba")
wkd_logit_loss Ran JiamingLv/WKD/mdistiller/distillers/WKD.py
pointer only (licence: NONE) · get_code("00973e6ddd35bda9")
wkd_logit_loss_with_speration Ran JiamingLv/WKD/mdistiller/distillers/WKD.py
pointer only (licence: NONE) · get_code("9c4310cf03bd30be")
WKD Not yet run JiamingLv/WKD/mdistiller/distillers/WKD.py
pointer only (licence: NONE) · get_code("ae8a2a2f13729bbb")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Since pioneering work of Hinton et al., knowledge distillation based on Kullback-Leibler Divergence (KL-Div) has been predominant, and recently its variants have achieved compelling performance. However, KL-Div only compares probabilities of the corresponding category between the teacher and student while lacking a mechanism for cross-category comparison. Besides, KL-Div is problematic when applied to intermediate layers, as it cannot handle non-overlapping distributions and is unaware of geometry of the underlying manifold. To address these downsides, we propose a methodology of Wasserstein Distance (WD) based knowledge distillation. Specifically, we propose a logit distillation method called WKD-L based on discrete WD, which performs cross-category comparison of probabilities and thus can explicitly leverage rich interrelations among categories. Moreover, we introduce a feature distillation method called WKD-F, which uses a parametric method for modeling feature distributions and adopts continuous WD for transferring knowledge from intermediate layers. Comprehensive evaluations on image classification and object detection have shown (1) for logit distillation WKD-L outperforms very strong KL-Div variants; (2) for feature distillation WKD-F is superior to the KL-Div counterparts and state-of-the-art competitors. The source code is available at https://peihuali.org/WKD.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2412.08139")
get_code_for_paper("2412.08139")
have("2412.08139")

Connect an agent — have() is free.