Exploring the Impact of Temperature Scaling in Softmax for Classification and Adversarial Robustness
Hao Xuan, Bokai Yang, Xingyu Li

TL;DR
This paper investigates the effects of temperature scaling in softmax functions on deep learning models, revealing that higher temperatures can improve accuracy and robustness against adversarial attacks and corruptions.
Contribution
It provides the first comprehensive analysis of temperature's role in softmax, showing how elevated temperatures enhance model robustness and influence training dynamics.
Findings
Moderate temperatures improve overall performance.
Higher temperatures increase robustness against adversarial attacks.
Temperature influences learning step size and optimization direction.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
