arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.14329cs.LGeess.IV
收藏

面向锐度感知最小化的自适应对抗交叉熵损失

Adaptive Adversarial Cross-Entropy Loss for Sharpness-Aware Minimization

Institute of Science Tokyo(东京科学研究院)

Tanapat Ratchatorn, Masayuki Tanaka

AI总结:

针对SAM中模型趋近驻点时梯度变小振荡、方向不一致且易消失的问题,提出自适应对抗交叉熵损失及无归一化扰动生成函数,提升了图像分类任务的模型泛化性能。

摘要:

学习算法的最新研究进展表明,损失曲面的锐度是缩小泛化差距的有效衡量指标。基于这一概念,锐度感知最小化(Sharpness-Aware Minimization,SAM)被提出以提升模型泛化能力,并取得了当前最优性能。SAM包含两个核心步骤:权重扰动步骤和权重更新步骤。然而,SAM中的扰动仅由训练损失(即交叉熵损失)的梯度决定。当模型趋近于驻点时,该梯度会变小并产生振荡,导致扰动方向不一致,还存在梯度消失的可能。本研究提出了一种进一步提升模型泛化能力的创新方法。我们提出自适应对抗交叉熵(Adaptive Adversarial Cross-Entropy,AACE)损失函数,用于替代SAM扰动步骤中使用的标准交叉熵损失。AACE损失及其梯度会在模型接近收敛时独特地增大,从而保证扰动方向的一致性,解决梯度消失问题。此外,我们还提出了一种无需归一化、基于AACE损失的新型扰动生成函数,增强了模型在接近最优阶段的探索能力。实验测试证实了AACE的有效性:在多个数据集上使用Wide ResNet和PyramidNet进行的图像分类任务中,该方法均展现出更优的性能。复现代码已公开在线发布。

英文摘要:

Recent advancements in learning algorithms have demonstrated that the sharpness of the loss surface is an effective measure for improving the generalization gap. Building upon this concept, Sharpness-Aware Minimization (SAM) was proposed to enhance model generalization and achieved state-of-the-art performance. SAM consists of two main steps, the weight perturbation step and the weight updating step. However, the perturbation in SAM is determined by only the gradient of the training loss, or cross-entropy loss. As the model approaches a stationary point, this gradient becomes small and oscillates, leading to inconsistent perturbation directions and also has a chance of diminishing the gradient. Our research introduces an innovative approach to further enhancing model generalization. We propose the Adaptive Adversarial Cross-Entropy (AACE) loss function to replace standard cross-entropy loss for SAM's perturbation. AACE loss and its gradient uniquely increase as the model nears convergence, ensuring consistent perturbation direction and addressing the gradient diminishing issue. Additionally, a novel perturbation-generating function utilizing AACE loss without normalization is proposed, enhancing the model's exploratory capabilities in near-optimum stages. Empirical testing confirms the effectiveness of AACE, with experiments demonstrating improved performance in image classification tasks using Wide ResNet and PyramidNet across various datasets. The reproduction code is available online

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑