Greek letters
softmax ( z / τ ) \operatorname{softmax}(z / \tau) softmax ( z / τ ) TauA temperature that sharpens or flattens a softmax; in RL, a trajectory.
In ML papers As a temperature , τ \tau τ divides logits before a softmax: τ < 1 \tau < 1 τ < 1 makes the distribution sharper, τ > 1 \tau > 1 τ > 1 flatter. Contrastive losses (InfoNCE, CLIP) and distillation use it.
In reinforcement learning, τ = ( s 0 , a 0 , r 0 , s 1 , … ) \tau = (s_0, a_0, r_0, s_1, \ldots) τ = ( s 0 , a 0 , r 0 , s 1 , … ) is a trajectory , and in target-network updates τ \tau τ is the soft-update rate.
How to type it A worked example softmax ( 2 , 0 ) = ( 0.88 , 0.12 ) , softmax ( ( 2 , 0 ) 0.5 ) = ( 0.98 , 0.02 ) \operatorname{softmax}(2, 0) = (0.88, 0.12), \quad \operatorname{softmax}\left(\tfrac{(2, 0)}{0.5}\right) = (0.98, 0.02) softmax ( 2 , 0 ) = ( 0.88 , 0.12 ) , softmax ( 0.5 ( 2 , 0 ) ) = ( 0.98 , 0.02 ) Halving the temperature makes the larger logit win more decisively.
Work the math by hand · by the author of this site
Deep Learning Math by Hand
250 problems on gradients, backprop, attention, normalization and optimizers. By Spencer Uresk, who made this site.
See it on Amazon As an Amazon Associate I earn from qualifying purchases.
Equations that use it Related Decode this example →
Further reading, by other authors
Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville . The standard reference text, with a chapter on notation and the math background.Understanding Deep Learning by Simon J. D. Prince . A modern textbook covering transformers, diffusion models and more.As an Amazon Associate I earn from qualifying purchases.