Temperature Scaling#
A simple post-hoc method that rescales logits to calibrate probabilities.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
Temperature scaling is the simplest post-hoc calibration method for neural nets — it divides the logits by a single learned scalar T before the softmax, softening or sharpening the probabilities:
It is a one-parameter fix applied after training.
What T does#
T = 1 leaves the model unchanged; T > 1 makes predictions less confident (softer), which corrects the overconfidence typical of modern networks; T < 1 makes them sharper. T is fit on a held-out validation set by minimizing negative log-likelihood.
Why it’s popular#
It is simple, effective, and crucially accuracy-preserving — dividing every logit by the same T never changes the argmax, so the decision boundary and accuracy are untouched. Its limit is expressiveness: it can only rescale confidence uniformly, not fix region-specific miscalibration.
Theme: Probability Calibration · All terminology
Hint
Mind map — connected ideas
Platt Scaling · Isotonic Regression · Overconfident · Confidence Level · Softmax Function · Underconfident
Hint
More in Probability Calibration
Adaptive ECE (Expected Calibration Error with Adaptive Binning) · Brier Score · Calibration quality (Model Calibration) · Expected Calibration Error (ECE) · Isotonic Regression · Maximum Calibration Error (MCE) · Murphy’s Decomposition · Overconfident · Platt Scaling · Reliability Curves (also called Calibration Curves) · Underconfident
See also
Source article Adapted (context, re-expressed) in our own words from: Temperature Scaling (insightful-data-lab.com).