arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.20604cs.LGcs.AI
收藏

探索Softmax中温度缩放对分类和对抗鲁棒性的影响

Exploring the Impact of Temperature Scaling in Softmax for Classification and Adversarial Robustness

University of Alberta(阿尔伯塔大学)

Hao Xuan, Bokai Yang, Xingyu Li

AI总结:

本研究探索Softmax温度缩放对图像分类的影响,发现适度温度提升性能,高温增强对损坏和对抗攻击的鲁棒性,并有助于对抗训练。

摘要:

Softmax函数是深度学习中的一个基本组成部分。本研究深入探讨了Softmax函数中一个常被忽视的参数,即“温度”,为图像分类中温度缩放的实际和理论方面提供了新颖的见解。我们采用卷积神经网络和Transformer在多个基准数据集上进行的实证研究表明,适度的温度通常能带来更好的整体性能。通过广泛的实验和严格的理论分析,我们探索了温度缩放在模型训练中的作用,并揭示了温度不仅影响学习步长,还塑造了模型的优化方向。此外,我们首次发现了高温的一个令人惊讶的好处:增强模型对常见损坏、自然扰动以及像投影梯度下降这样的非目标对抗攻击的鲁棒性。我们将这些发现扩展到对抗训练,证明与使用默认温度值的标准Softmax函数相比,更高的温度有潜力增强对抗训练。这项工作的见解为改进深度学习应用中的模型性能和安全性开辟了新途径。

英文摘要:

The softmax function is a fundamental component in deep learning. This study delves into the often-overlooked parameter within the softmax function, known as "temperature," providing novel insights into the practical and theoretical aspects of temperature scaling for image classification. Our empirical studies, adopting convolutional neural networks and transformers on multiple benchmark datasets, reveal that moderate temperatures generally introduce better overall performance. Through extensive experiments and rigorous theoretical analysis, we explore the role of temperature scaling in model training and unveil that temperature not only influences learning step size but also shapes the model's optimization direction. Moreover, for the first time, we discover a surprising benefit of elevated temperatures: enhanced model robustness against common corruption, natural perturbation, and non-targeted adversarial attacks like Projected Gradient Descent. We extend our discoveries to adversarial training, demonstrating that, compared to the standard softmax function with the default temperature value, higher temperatures have the potential to enhance adversarial training. The insights of this work open new avenues for improving model performance and security in deep learning applications.

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

↑