Decoupled Kullback-Leibler Divergence Loss

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. 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.

Paper

References (79)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer RheX5/10 · confidence 4/52024-07-08

Summary

The paper proposed the Decoupled Kullback-Leibler Divergence Loss (DKL), mathematically equivalent to the KL divergence. To solve the asymmetries issue of KL/DKL, the authors introduce the Improved KL divergence, which consists of class-wise global information and cross-entropy loss for soft labels. The proposed approach achieves new state-of-the-art adversarial robustness on the public leaderboard.

Strengths

1. The motivation of this paper is clear. 2. The results on adversarial robustness show the effectiveness of the proposed method.

Weaknesses

The empirical study is not enough to show the effectiveness of the IKL compared with KL divergence. 1. In the context of adversarial robustness, the author's approach of replacing KL in the DM-AT and comparing it with a few other baseline methods is insightful. However, to further validate the effectiveness of IKL compared with KL, it would be beneficial to see this approach applied to other methods such as TRADES or MART [1]. 2. The current adversarial attack experiments, which focus solely on the AA attack is not enough. It would be valuable to see more results with different attacks, such as PGD and CW, to better understand the robustness of the IKL. 3. Regarding knowledge distillation, I wonder about its performance in the semi-supervised setting. Could you please add the experiments for comparing with Mean-Teacher [2] and provide a toy example to show the effectiveness of the IKL compared with KL? [1] Improving Adversarial Robustness Requires Revisiting Misclassified Examples. [2] Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results

Questions

1. The first terms in Eq5, 6, and 7 are slightly different, but the names are the same; could you please clarify this? 2. In Table 1, the GI seems more important than BA; could you please explain it and add the results for only the use of GI? 3. The asymmetric issue can be simply solved by using symmetric KL divergence by 1/2(KL(p,q)+KL(q,p)) or Jensen–Shannon divergence. Could you explain the advantages of enabling the gradients proposed in IKL?

Rating

5

Confidence

4

Soundness

2

Presentation

3

Contribution

2

Limitations

Yes.

Reviewer wpCy5/10 · confidence 5/52024-07-09

Summary

The paper investigates the Kullback-Leibler (KL) Divergence loss and demonstrates its equivalence to the Decoupled Kullback-Leibler (DKL) Divergence loss in a limited setting, which consists of a weighted Mean Square Error (wMSE) and a Cross-Entropy loss with soft labels. By addressing the asymmetric optimization property of KL/DKL loss and incorporating class-wise global information, the authors propose the Improved Kullback-Leibler (IKL) Divergence loss. Experimental evaluations on CIFAR-10/100 and ImageNet datasets highlight the effectiveness of IKL loss in enhancing adversarial robustness and knowledge distillation tasks.

Strengths

1. The writing is clear and easy to understand.

Weaknesses

1. It should be explicitly clarified that Theorem 1 and the subsequent analysis are solely based on the assumption that the probability distribution is a categorical distribution. 2. Since the author claims that the proposed method mainly applies to adversarial training and knowledge distillation, a formal connection between these two methods and the KL divergence should be provided. 3. The KL divergence can be applied to a much wider research area since it is a convenient measure between distributions. The author provides no relevant works regarding the KL divergence and other statistical distances, raising questions about whether the author has a comprehensive understanding of the KL divergence. 4. Additionally, the related works section is perplexing. The author spends most of the paper describing the KL divergence without defining adversarial training and knowledge distillation, yet the related works section focuses entirely on these two areas. 5. Lines 150-152 state, 'The asymmetric optimization can cause the wMSE component to be neglected or overlooked when $o_m$ is detached from gradient backpropagation, which is the case for knowledge distillation, potentially leading to performance degradation.' This should be a central investigation target of the paper. The author should provide either empirical or theoretical evidence to support this claim.

Questions

1. Regarding the asymmetric problem, what is the relation between the proposed DKL and the Jensen-Shannon (JS) divergence?

Rating

5

Confidence

5

Soundness

2

Presentation

3

Contribution

2

Limitations

Yes

Reviewer hZqZ6/10 · confidence 3/52024-07-10

Summary

In this paper, the authors analyzed the optimization gradient of the commonly used KL Divergence loss metric in adversarial training and distillation. KL loss can be reformulated as a Decoupled KL (DKL) Divergence loss term through antiderivative operations. The gradients of both terms are equivalent in the case where the parameters of the DKL are set to $\alpha$ = 1 and $\beta$ = 1. The DKL loss term consists of 1) a weighted MSE (wMSE) loss term, which encourages similarity between output logits, and 2) a CE loss term, which encourages accurate predictions. The authors highlighted two potential drawbacks of the KL/DKL formulations : 1) asymmetric optimization of both loss terms, 2) sample-wise conditioning term $w_m$ which induces strong variance into the optimization process. The authors proposed two modifications to the DKL loss term, namely, 1) Enabling the gradients of $\Delta n$ instead of $\Delta m$ in the formulation, thereby overcoming asymmetric optimization, 2) using global class-wise conditioning term $\bar{w_y}$, conditioned on global ground truth, instead of $w_m$. The novel Improved KL Divergence Loss (IKL) is shown to be quantitatively and qualitatively superior to the classic and decoupled KL divergence terms. The authors also performed thorough adversarial robustness and distillation experiments, achieving improved performance compared to accuracy and robustness performance in various natural image datasets ( CIFAR-10, CIFAR-100, ImageNet ), augmentation strategies , and network backbones, outperforming multiple benchmarks.

Strengths

1. Experiments : Thorough experiments were performed, incorporating various datasets, network backbones, and augmentation strategies. 2. Clarity : The intuition behind the main concept is clear and straightforward. Readers can easily follow the thought process and justifications of the authors. 3. Originality : The paper shows the promising potential of IKL in two different application domains, thus highlighting the IKL metric's relative flexibility. Furthermore, the hyperparameter ablations suggest that one can tune the predictive accuracy and adversarial robustness tradeoff. The competitive Robustbench results further substantiate the authors' claims.

Weaknesses

1. Theoretical evaluation is not convincing enough. There are no further justifications for why the specific anti-derivative formulation expressed in Theorem 1 is chosen as the main decoupled KL (DKL) formulation, as there could be multiple anti-derivative formulations for the same function that also lead to equivalent derivative formulations. The mathematical proof provided in the appendix has merely shown that performing chain rules on KL/DKL loss terms justifies the equivalence of the derivatives. 2. While the authors have intuitively highlighted the issues of the unbalanced and potentially unstable optimization issues with DKL, the authors did not delve deep into the aforementioned issues. Further theoretical proofs or gradient analysis of KL/DKL/IKL optimization would provide a stronger justification, especially where exactly the stop-gradient operations are crucial. The following papers have performed gradient analysis and a thorough study into stop-gradient mechanisms. - Zhang, C., Zhang, K., Zhang, C., Pham, T. X., Yoo, C. D., and Kweon, I. S. How does simsiam avoid collapse without negative samples? a unified understanding with selfsupervised contrastive learning. International conference on learning representations, 2022. https://arxiv.org/abs/2203.16262 - Zhuo, Z., Wang, Y., Ma, J., and Wang, Y. Towards a unified theoretical understanding of non-contrastive learning via rank differential mechanism. International conference on learning representations, 2023. https://arxiv.org/abs/2303.02387 3. The accuracy and robustness results are generally only marginally better than the benchmarks. t-SNE visualization of the purported benefits of the IKL formulation does not additionally convey a strong qualitative advantage. The authors highlighted the lower computational costs of the approach in some of their experiments. I suggest that the authors pivot more on this to demonstrate that the IKL is a competitive, relatively computationally lighter method. Minor : While the structure of the paper is clear, there are multiple grammatical and expression errors. I would recommend stronger proofreading and reformulation for improvement.

Questions

1. Does the assumption of DKL/KL equivalence in Theorem 1 still hold when the parameters $\alpha$ and $\beta$ are not set to 1? The authors have experimented with the values of these parameters while assuming that the DKL/IKL formulation still results in equivalent gradient formulations. 2. While various recent works have highlighted the importance of solving the gradient conflict issue for accuracy/robustness tradeoff in various settings. Some works even proposed that anti-symmetric gradients are essential to solving the gradient conflicts. How can the authors justify their approach compared to these opposing approaches/perspectives? - Zhang, C., Zhang, K., Zhang, C., Pham, T. X., Yoo, C. D., and Kweon, I. S. How does simsiam avoid collapse without negative samples? a unified understanding with selfsupervised contrastive learning. International conference on learning representations, 2022. https://arxiv.org/abs/2203.16262 - Zhuo, Z., Wang, Y., Ma, J., and Wang, Y. Towards a unified theoretical understanding of non-contrastive learning via rank differential mechanism. International conference on learning representations, 2023. https://arxiv.org/abs/2303.02387 - Yu, T., Kumar, S., Gupta, A., Levine, S., Hausman, K., and Finn, C. Gradient surgery for multi-task learning. Advances in Neural Information Processing Systems, 33: 5824–5836, 2020. https://arxiv.org/abs/2001.06782 - Wen, Z. and Li, Y. The mechanism of prediction head in noncontrastive self-supervised learning. Advances in Neural Information Processing Systems, 35:24794–24809, 2022. https://arxiv.org/abs/2205.06226 - Waseda, F. et al. Rethinking Invariance Regularization in Adversarial Training to Improve Robustness-Accuracy Trade-off. https://arxiv.org/abs/2402.14648, 2024.

Rating

6

Confidence

3

Soundness

3

Presentation

2

Contribution

3

Limitations

The authors have not addressed the limitations of their work. Please provide some potential limitations that can be improved on for future works.

Reviewer nZvw4/10 · confidence 3/52024-07-13

Summary

This paper demonstrates that KL divergence can be decoupled into a weighted mean square error (wMSE) loss term and a cross-entropy term with soft labels. Based on this decoupling, the authors propose an improved version of the KL loss. In the context of knowledge distillation, the proposed method addresses issues with the student's wMSE loss. It also adjusts the weight term to avoid being determined by incorrect labels, instead using supervision. The proposed method is tested in two scenarios where KL divergence is used: knowledge distillation and adversarial training, achieving higher performance than existing methods in both cases.

Strengths

- The paper provides a theoretical proof that KL divergence can be decoupled into two terms and improve original loss, which is a significant contribution. - The proposed method achieves higher performance than most of the existing methods in both knowledge distillation and adversarial training scenarios.

Weaknesses

- The paper lacks comparisons with the latest state-of-the-art methods, particularly in the knowledge distillation benchmark and RobustBench. The performance is also inferior compared to methods like [1]. - References are not provided for the methods mentioned, making it difficult to identify the specific works being referred to, which significantly hampers readability. - The overall readability of the paper is low, with figures and text that are not self-explanatory. For example, Figure 1 is unclear without reading the full explanation, and terms like $o_m$ and $o_n$ are not adequately explained until later in the text. Additionally, the term "Inserting Class-wise Global Information" used for the weight term replacement in Eq.5 is misleading and lacks a clear explanation. - The proof approach for decoupling KL divergence is not straightforward. Instead of deriving DKL from KL divergence, the authors present DKL first and then show its equivalence through gradients, which obscures the understanding of the derivation process. - The benefits and reasons for why the $\Delta n$ term in Eq.7 should receive gradients are not well explained. The phrase "potentially hurt performance" is vague and misleading. [1] Multi-level Logit Distillation, Jin et al., CVPR 2023

Questions

- The overall readability of the paper needs improvement. Figures should clearly illustrate the proposed method and its benefits. The proof method in Eq. 5 should be more understandable. - The paper should include comprehensive comparisons with all current state-of-the-art methods, especially showing higher performance than existing logit-based KD methods. - The authors should clearly explain the problems arising from the $\Delta n$ term not receiving gradients in Eq. 7 and the benefits of it receiving gradients.

Rating

4

Confidence

3

Soundness

2

Presentation

1

Contribution

3

Limitations

The authors have adequately addressed some limitations of their work. There are no negative societal impacts.

Reviewer JUtg6/10 · confidence 4/52024-07-15

Summary

The paper presents an in-depth analysis of the Kullback-Leibler (KL) Divergence loss, a critical component in training deep learning models. The authors mathematically demonstrate that the KL loss is equivalent to a Decoupled Kullback-Leibler (DKL) loss, which is composed of a weighted Mean Square Error (wMSE) loss and a Cross-Entropy loss with soft labels. They identify limitations of the KL/DKL loss, particularly in scenarios like knowledge distillation, and propose improvements by introducing an Improved Kullback-Leibler (IKL) Divergence loss. This IKL loss breaks the asymmetric optimization property of the original KL loss and incorporates class-wise global information to mitigate biases from individual samples. The paper evaluates the IKL loss on CIFAR-10/100 and ImageNet datasets, focusing on adversarial training and knowledge distillation tasks. The results show that the proposed IKL loss achieves state-of-the-art adversarial robustness and competitive performance in knowledge distillation.

Strengths

1. The paper provides a novel theoretical perspective on the KL loss by proving its equivalence to the DKL loss, offering a new understanding of gradient optimization in deep learning. 2. The IKL loss addresses specific limitations of the KL loss and demonstrates improved performance in adversarial training and knowledge distillation, which are significant for real-world applications. 3. Comprehensive experiments on standard datasets like CIFAR-10/100 and ImageNet validate the effectiveness of the proposed IKL loss, enhancing the paper's credibility.

Weaknesses

1. While the IKL loss shows promising results on the mentioned datasets, it is unclear how well these improvements would generalize to other types of data or tasks outside the scope of the paper. 2. The introduction of the IKL loss adds complexity to the model training process, which might be a concern for practitioners looking for simpler solutions. 3. The paper does not provide a detailed analysis of the computational cost associated with the IKL loss, which is important for resource-constrained environments.

Questions

1. How does the IKL loss perform in comparison to other contemporary loss functions that are designed for specific tasks, such as object detection or semantic segmentation? 2. What are the implications of the IKL loss for models that are trained with limited data, and how does it handle class imbalances? 3. Can the authors provide more insight into the selection of the hyperparameters α and β in the IKL loss, and how sensitive are the results to these values? 4. The paper mentions the use of class-wise global information; how does this interact with models that are trained in a semi-supervised or unsupervised setting? 5. How does the IKL loss handle adversarial examples that are crafted to be more sophisticated than those generated by the Auto-Attack method used in the paper?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

see the sections of weaknesses and questions

Reviewer wpCy2024-08-09

Reply to author rebuttal

Thank you for the detailed response. However, I believe some issues remain unresolved. ### Q1 & Q2 & Q3 According to the author’s current reply, the paper specifically focuses on adversarial training and knowledge distillation, particularly in the context of gradient optimization. However, in the first sentence of the Abstract, the author wrote: > 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. In line 33, the author states: > We reveal that the KL loss is mathematically equivalent to a composite of a weighted MSE (wMSE) loss and a Cross-Entropy loss employing soft labels. These conclusions could be considered overclaims since KL divergence is not limited to classification tasks or (adversarial training and knowledge distillation). This raises concerns about the clarity of the paper’s true objectives. ### Q4 What do you mean by **absolutely** and **relatively**?

Authorsrebuttal2024-08-09

Responses to the questions

Thanks for your questions. We provide the following responses to address your concerns. *Q1: From the perspective of gradient optimization, KL loss is mathematically equivalent to a composite of a weighted MSE ($w$MSE) loss and a Cross-Entropy loss employing soft labels.* Thanks for the question. KL divergence loss requires that the inputs $\mathbf{s}\_{m}$ and $\mathbf{s}\_{n}$ should be two probability vectors, constraining that $\sum_{j=1}^{C} \mathbf{s}\_{m}^{j}=1$ and $\sum\_{j=1}^{C} \mathbf{s}\_{n}^{j}=1$ and $C$ is the input dimension. Thus we assume that the $\mathbf{s}\_{n}$ and $\mathbf{s}\_{m}$ are derived with _Softmax_ activation as stated in line 120 of the main paper. Besides this requirement, our analysis in Theorem 1 does not have other assumptions. Thus, it should be established for any scenario where the scores are from _Softmax_ activation. For clarification, we will stress our assumption that the scores are from the _Softmax_ activation in the new revision. *Q2: What do you mean by absolutely and relatively?* In the scenario of knowledge distillation, we expect the student model to mimic the teacher model's behavior. Given the same input, if the logit feature from the student is the same as the logit feature from the teacher, then we call that the student mimics the teacher **absolutely**. Given the same input, if the probability output from the student is the same as the probability output from the teacher, then we call that the student mimics the teacher **relatively**. This is because **the same logit feature definitely leads to the same probability output while the same probability output cannot guarantee the same logit feature.** If there are other concerns, we are glad to talk more about it.

Reviewer wpCy2024-08-09

Reply to further response

Thank you for the further response. Nevertheless, I intend to keep my score in the current manuscript given the current structure of the entire paper. I'll wait for other reviewers and see if their concerns are addressed.

Authorsrebuttal2024-08-10

Thanks for your suggestions and valuable comments

Big thanks for your suggestions and valuable comments. It helps us greatly improve the quality of our paper. If there are other concerns, please let us know.

Authorsrebuttal2024-08-14

Dear Reviewer wpCy, We sincerely appreciate the time and effort you have dedicated to reviewing our paper. Your expert suggestions have been invaluable in helping us refine our work. We have also addressed the concerns raised by Reviewer RheX and promise to thoroughly incorporate all reviewers' feedback to improve the manuscript further. Would you kindly consider revising your score? We look forward to your response. Best regards, The Authors

Reviewer wpCy2024-08-14

Response

Dear Authors, Although in my opinion, this paper can still be improved. Given the effort in the discussion session, I'm willing to increase my score to borderline accept. Sincerely, Reviewer

Authorsrebuttal2024-08-14

Thanks for your positive feedback

Thank you for your positive feedback and recommendation. We appreciate your decision to raise the score to borderline acceptance. We are committed to incorporating all the reviewers' suggestions to further enhance the quality of the paper.

Reviewer RheX2024-08-10

Thank you so much for addressing my concerns and answering my questions. Nevertheless, the paper's presentation should be improved. I will keep my score.

Authorsrebuttal2024-08-11

We promise to improve the paper's presentation regarding all suggestions from reviewers

Thanks for your suggestions and valuable comments on our paper. We promise to carefully consider all the reviewers' suggestions and revise the manuscript accordingly to enhance the overall quality of the paper.

Authorsrebuttal2024-08-12

Official Comment by Authors

Dear Reviewer JUtg, We sincerely thank you for your precious time and efforts in reviewing our paper. We greatly appreciate your insightful and detailed feedback, and we have carefully addressed the concerns in the rebuttal. Please let us know if any aspects remain unclear, and we are happy to provide further clarification. We are looking forward to your reply. Best regards, The Authors

Authorsrebuttal2024-08-12

Official Comment by Authors

Dear Reviewer nZvw, We sincerely thank you for your precious time and efforts in reviewing our paper. We greatly appreciate your insightful and detailed feedback, and we have carefully addressed the concerns in the rebuttal. Please let us know if any aspects remain unclear, and we are happy to provide further clarification. We are looking forward to your reply. Best regards, The Authors

Authorsrebuttal2024-08-12

Official Comment by Authors

Dear Reviewer hZqZ, We sincerely thank you for your precious time and efforts in reviewing our paper. We greatly appreciate your insightful and detailed feedback, and we have carefully addressed the concerns in the rebuttal. Please let us know if any aspects remain unclear, and we are happy to provide further clarification. We are looking forward to your reply. Best regards, The Authors

Authorsrebuttal2024-08-14

Dear Reviewer hZqZ, We sincerely thank you for your precious time and efforts in reviewing our paper. We believe our responses have addressed your concerns. If you have any additional questions or require further clarification, we would be happy to provide it. We are looking forward to your reply. Best, The Authors

Authorsrebuttal2024-08-14

Dear Reviewer nZvw, We sincerely thank you for your precious time and efforts in reviewing our paper. We believe our responses have addressed your concerns. If you have any additional questions or require further clarification, we would be happy to provide it. We are looking forward to your reply. Best, The Authors

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC