Temperature check: theory and practice for training models with softmax-cross-entropy losses
Not on the map. Why?
Abstract (arXiv)
The softmax function combined with a cross-entropy loss is a principled approach to modeling probability distributions that has become ubiquitous in deep learning. The softmax function is defined by a lone hyperparameter, the temperature, that is commonly set to one or regarded as a way to tune model confidence after training; however, less is known about how the temperature impacts training dynamics or generalization performance. In this work we develop a theory of early learning for models trained with softmax-cross-entropy loss and show that the learning dynamics depend crucially on the inverse-temperature β as well as the magnitude of the logits at initialization, ||βbf z||2. We follow up these analytic results with a large-scale empirical study of a variety of model architectures trained on CIFAR10, ImageNet, and IMDB sentiment analysis. We find that generalization performance depends strongly on the temperature, but only weakly on the initial logit magnitude. We provide evidence that the dependence of generalization on β is not due to changes in model confidence, but is a dynamical phenomenon. It follows that the addition of β as a tunable hyperparameter is key to maximizing model performance. Although we find the optimal β to be sensitive to the architecture, our results suggest that tuning β over the range 10-2 to 101 improves performance over all architectures studied. We find that smaller β may lead to better peak performance at the cost of learning stability.
Key facts. Cited by 31 papers in the map (data through 14 Oct 2026). First posted on arXiv 14 Oct 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 3; 2022: 2; 2023: 3; 2024: 9; 2025: 7; 2026: 7.
31 papers.
Sort:
By area:
- 2021Temperature as Uncertainty in Contrastive Learningcited by 25
- 2023SAM operates far from home: eigenvalue regularization as a dynamical phenomenoncited by 24
- 2025Training Transformers with Enforced Lipschitz Constantscited by 20
- 2024The Optimization Landscape of SGD Across the Feature Learning Strengthcited by 13
- 2024Neglected Hessian component explains mysteries in Sharpness regularizationcited by 12
- 2024Feature learning as alignment: a structural property of gradient descent in non-linear neural networkscited by 10
- 2025Exploring the Impact of Temperature Scaling in Softmax for Classification and Adversarial Robustnesscited by 9
- 2021Tilting the playing field: Dynamical loss functions for machine learningcited by 7
- 2024MAP: Model Aggregation and Personalization in Federated Learning with Incomplete Classescited by 7
- 2023SimSC: A Simple Framework for Semantic Correspondence with Temperature Learningcited by 6
- 2024LIBMoE: A Library for comprehensive benchmarking Mixture of Experts in Large Language Modelscited by 6
- 2025LILogic Net: Compact Logic Gate Networks with Learnable Connectivity for Efficient Hardware Deploymentcited by 6
19 more
- 2022Lazy vs hasty: linearization in deep networks impacts learning schedule based on example difficultycited by 5
- 2024Improving Local Training in Federated Learning via Temperature Scalingcited by 5
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperaturecited by 5
- 2024Deconstructing the Goldilocks Zone of Neural Network Initializationcited by 4
- 2024Extreme Miscalibration and the Illusion of Adversarial Robustnesscited by 4
- 2021Grassmannian learning mutual subspace method for image set recognitioncited by 3
- 2023Learning to Scale Temperature in Masked Self-Attention for Image Inpaintingcited by 3
- 2026Explaining Grokking in Transformers through the Lens of Inductive Biascited by 2
- 2026Sinkhorn doubly stochastic attention rank decay analysiscited by 2
- 2024Temperature Optimization for Bayesian Deep Learningcited by 1
- 2025A Novel Streamline-based diffusion MRI Tractography Registration Method with Probabilistic Keypoint Detectioncited by 1
- 2022Probability-Dependent Gradient Decay in Large Margin Softmaxcited by 0
- 2025Analytical Softmax Temperature Setting from Feature Dimensions for Model- and Domain-Robust Classificationcited by 0
- 2025Comparative sentiment analysis of public perception: Monkeypox vs. COVID-19 behavioral insightscited by 0
- 2026Over-Alignment vs Over-Fitting: The Role of Feature Learning Strength in Generalizationcited by 0
- 2026Temperature Scaling Attack Disrupting Model Confidence in Federated Learningcited by 0
- 2026Ghosts of Softmax: Complex Singularities That Limit Safe Step Sizes in Cross-Entropycited by 0
- 2026Scalable, Energy-Efficient Optical-Neural Architecture for Multiplexed Deepfake Video Detectioncited by 0
- 2026Mitigating Batch Effects in Histopathology via Language-Mediated Robust Embedding Generationcited by 0
- 2026Mitigating Batch Effects in Histopathology via Language-Mediated Robust Embedding Generation27 Jun 2026
- 2026Scalable, Energy-Efficient Optical-Neural Architecture for Multiplexed Deepfake Video Detection19 May 2026
- 2026Sinkhorn doubly stochastic attention rank decay analysis9 Apr 2026
- 2026Ghosts of Softmax: Complex Singularities That Limit Safe Step Sizes in Cross-Entropy13 Mar 2026
- 2026Explaining Grokking in Transformers through the Lens of Inductive Bias6 Feb 2026
- 2026Temperature Scaling Attack Disrupting Model Confidence in Federated Learning6 Feb 2026
- 2026Over-Alignment vs Over-Fitting: The Role of Feature Learning Strength in Generalization31 Jan 2026
- 2025LILogic Net: Compact Logic Gate Networks with Learnable Connectivity for Efficient Hardware Deployment15 Nov 2025
- 2025Training Transformers with Enforced Lipschitz Constants17 Jul 2025
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperature20 May 2025
- 2025Comparative sentiment analysis of public perception: Monkeypox vs. COVID-19 behavioral insights12 May 2025
- 2025Analytical Softmax Temperature Setting from Feature Dimensions for Model- and Domain-Robust Classification22 Apr 2025
19 more
- 2025A Novel Streamline-based diffusion MRI Tractography Registration Method with Probabilistic Keypoint Detection4 Mar 2025
- 2025Exploring the Impact of Temperature Scaling in Softmax for Classification and Adversarial Robustness28 Feb 2025
- 2024LIBMoE: A Library for comprehensive benchmarking Mixture of Experts in Large Language Models1 Nov 2024
- 2024Temperature Optimization for Bayesian Deep Learning8 Oct 2024
- 2024The Optimization Landscape of SGD Across the Feature Learning Strength6 Oct 2024
- 2024MAP: Model Aggregation and Personalization in Federated Learning with Incomplete Classes14 Apr 2024
- 2024Extreme Miscalibration and the Illusion of Adversarial Robustness27 Feb 2024
- 2024Feature learning as alignment: a structural property of gradient descent in non-linear neural networks7 Feb 2024
- 2024Deconstructing the Goldilocks Zone of Neural Network Initialization5 Feb 2024
- 2024Neglected Hessian component explains mysteries in Sharpness regularization19 Jan 2024
- 2024Improving Local Training in Federated Learning via Temperature Scaling18 Jan 2024
- 2023SimSC: A Simple Framework for Semantic Correspondence with Temperature Learning3 May 2023
- 2023SAM operates far from home: eigenvalue regularization as a dynamical phenomenon17 Feb 2023
- 2023Learning to Scale Temperature in Masked Self-Attention for Image Inpainting13 Feb 2023
- 2022Probability-Dependent Gradient Decay in Large Margin Softmax31 Oct 2022
- 2022Lazy vs hasty: linearization in deep networks impacts learning schedule based on example difficulty19 Sep 2022
- 2021Grassmannian learning mutual subspace method for image set recognition8 Nov 2021
- 2021Temperature as Uncertainty in Contrastive Learning8 Oct 2021
- 2021Tilting the playing field: Dynamical loss functions for machine learning7 Feb 2021
- 2021Temperature as Uncertainty in Contrastive Learningcited by 25
- 2023SAM operates far from home: eigenvalue regularization as a dynamical phenomenoncited by 24
- 2025Training Transformers with Enforced Lipschitz Constantscited by 20
- 2024The Optimization Landscape of SGD Across the Feature Learning Strengthcited by 13
- 2024Neglected Hessian component explains mysteries in Sharpness regularizationcited by 12
- 2024Feature learning as alignment: a structural property of gradient descent in non-linear neural networkscited by 10
- 2025Exploring the Impact of Temperature Scaling in Softmax for Classification and Adversarial Robustnesscited by 9
- 2021Tilting the playing field: Dynamical loss functions for machine learningcited by 7
- 2024MAP: Model Aggregation and Personalization in Federated Learning with Incomplete Classescited by 7
- 2023SimSC: A Simple Framework for Semantic Correspondence with Temperature Learningcited by 6
- 2025LILogic Net: Compact Logic Gate Networks with Learnable Connectivity for Efficient Hardware Deploymentcited by 6
- 2022Lazy vs hasty: linearization in deep networks impacts learning schedule based on example difficultycited by 5
12 most cited of 30 All 30 (JSON)
- 2026Mitigating Batch Effects in Histopathology via Language-Mediated Robust Embedding Generation27 Jun 2026
- 2026Scalable, Energy-Efficient Optical-Neural Architecture for Multiplexed Deepfake Video Detection19 May 2026
- 2026Sinkhorn doubly stochastic attention rank decay analysis9 Apr 2026
- 2026Ghosts of Softmax: Complex Singularities That Limit Safe Step Sizes in Cross-Entropy13 Mar 2026
- 2026Explaining Grokking in Transformers through the Lens of Inductive Bias6 Feb 2026
- 2026Temperature Scaling Attack Disrupting Model Confidence in Federated Learning6 Feb 2026
- 2026Over-Alignment vs Over-Fitting: The Role of Feature Learning Strength in Generalization31 Jan 2026
- 2025LILogic Net: Compact Logic Gate Networks with Learnable Connectivity for Efficient Hardware Deployment15 Nov 2025
- 2025Training Transformers with Enforced Lipschitz Constants17 Jul 2025
- 2025Subquadratic Algorithms and Hardness for Attention with Any Temperature20 May 2025
- 2025Comparative sentiment analysis of public perception: Monkeypox vs. COVID-19 behavioral insights12 May 2025
- 2025Analytical Softmax Temperature Setting from Feature Dimensions for Model- and Domain-Robust Classification22 Apr 2025
12 newest of 30 All 30 (JSON)