Label smoothing 2026-11-05
Label smoothing replaces a sharply concentrated training target with a mixture that assigns some probability to alternative labels. For a -class example whose observed label is , a common uniform version usesHere is the predicted probability vector and controls smoothing. The target still sums to one. This is a regularization of the training objective, not a statement that the example is known to have several simultaneously correct labels.[ref]
Rethinking the Inception Architecture for Computer Vision by Christian Szegedy and others. Section 7: target mixture and uniform smoothing distribution.
With three classes and , the observed class receives and each other class . This convention differs from assigning to the observed class and splitting only among the incorrect classes. State the convention when reporting a smoothing parameter.
For a softmax function applied to logits , the categorical cross-entropy loss has gradient . With fixed smoothed targets and unconstrained probabilities, the loss is minimized at . The three-class example consequently has optimum true-versus-other logit gap , rather than requiring an unbounded gap to approach a one-hot target.[ref]
Rethinking the Inception Architecture for Computer Vision by Christian Szegedy and others. Section 7: cross-entropy gradient and motivation concerning overconfident training predictions.
The changed objective can discourage extreme training predictions. Its effect on generalization, calibration or another downstream task is an empirical question; the derivation alone does not guarantee improvement on every dataset. Evaluation should therefore retain the distinction between a training regularizer and the true, unknown distribution of labels.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 3 c Solution Created 2026-10-03 Updated 2026-10-05
The feedforward neural network has three input coordinates, two hidden sigmoid function units and two output softmax function units. Every input is connected to each hidden unit, and each hidden unit to each output unit; each hidden and output unit also has a bias. A layer diagram isAlgebraically, with ,with responses conditionally independent. The fourteen displayed weight and bias parameters comprise six input weights, two hidden biases, four output weights and two output biases. The one-hot encoding supplies targets , , and the categorical cross-entropy loss is the negative of . There is softmax non-identifiability under a common shift of both output logits, but the predicted probabilities are well defined.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 218 5 c Solution 2026-10-03
For one-hot labels and predicted probabilities , the categorical cross-entropy loss isStochastic gradient descent initializes , randomly orders the observations in each of five epochs, and for each single-observation batch computes a forward pass, the sample loss, and its gradient, then updatesBackpropagation is used after the forward loss evaluation to compute this gradient from the output layer back through the hidden layers.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 4 b Solution 2026-09-28
The softmax non-identifiability already proves that the coefficient vector is not unique. For any and , replace both rows of by and both output biases by . Every logit then gains the same value , so all softmax probabilities, classifications, and losses remain unchanged. Permuting the two hidden units supplies another non-uniqueness.
Past exam of the mathematics course of the University of Cambridge 2025 iii Paper 218 4 b Solution Created 2026-09-24 Updated 2026-09-25
Training minimizes the empirical categorical cross-entropy lossby stochastic gradient descent. The independent validation set monitors generalization, while the small fixed number of epochs limits how long the network can fit training noise; using validation loss for early stopping would make this safeguard explicit. A forward pass computes all layer activations, class probabilities, and the mini-batch loss. There are training mini-batches per epoch and hence training forward passes, in addition to validation evaluation after each epoch.
Past exam of the mathematics course of the University of Cambridge 2026 iii Paper 218 5 a Solution Created 2026-09-24 Updated 2026-09-25
For standardized , model1 computesfollowed by logits and softmax function probabilitiesThe parameter count isFor one-hot labels , the categorical cross-entropy loss isThis is the negative conditional log-likelihood of independent categorical labels, equivalently Bernoulli labels in the two-class case.