Temperature Scaling: Calibrating a Softmax
An interactive live film: logits divided by T move the softmax point across the probability triangle, freezing to the argmax corner as T → 0 and melting to the center as T → ∞, with the argmax unchanged. Tune T so the top confidence matches the 52% validation accuracy.
Narration
A classifier produces raw unnormalized scores called logits for each competing class.
Dividing logits by temperature and exponentiating maps them onto the probability simplex, where all class probabilities sum to one.
The rest of the narration is in the book's Companion.
More from Chapter 13
Interactive1:35Normalizing Flows: Chaining Invertible MapsChapter 13
Preview1:38Independence as an Outer ProductChapter 13
Preview1:40Conditional Gaussian: A Slice of the BellChapter 13
Preview1:22Random Fourier FeaturesChapter 13
Preview1:46Change of Variables: Same Probability, Different AreaChapter 13
Preview1:35The von Mises-Fisher Distribution: A Gaussian for DirectionsChapter 13
Preview1:42The Dirichlet Distribution: A Density on the SimplexChapter 13
Preview1:14Gaussian Mixture Model: Multimodal TerrainChapter 13
Preview1:41Whitening: PCA and ZCAChapter 13
Preview1:36Beta and Bernoulli: Updating with Pseudo-CountsChapter 13
Preview1:43ROC Curve and AUC: the Mass Above the DiagonalChapter 13
Preview1:40Hoeffding's Inequality: How Fast a Sample Mean SettlesChapter 13
Preview1:34Mahalanobis Distance: The Ellipsoids of a GaussianChapter 13
Preview2:09Random Directions Are Nearly OrthogonalChapter 13