AI Research Scientist · Softmax & Cross-Entropy
Cross-entropy loss and maximum likelihood training
Cross-entropy loss and maximum likelihood training
Cross-entropy loss
Cross-entropy loss measures how far a model’s predicted probability distribution over classes is from the true target distribution; it’s the default training objective for classification and next-token prediction.Cross-entropy . With one-hot true labels this reduces to , the negative log-likelihood — so minimizing CE over the dataset is exactly maximizing likelihood. Also : since is fixed, minimizing CE also minimizes KL divergence from the true distribution to the prediction.
- 1Compute softmax: .WhyCross-entropy needs probabilities, not raw logits.
- 2Gradient: .WhySoftmax+CE gradient reduces to predicted minus true, skipping the Jacobian.
Recall check from the same lesson
Label smoothing keeps the target for the true class at exactly 1 and every other class at exactly 0, so it trains identically to standard one-hot cross-entropy.
Review the explanation
Answer: False. Label smoothing replaces the one-hot target with a softened distribution — the true class gets slightly less than 1 and the remaining probability is spread across the other classes, which discourages overconfident logits and improves calibration.
Sources
One sitting · 20–30 minutes
A focused session on your AI Research Scientist interview
LearnBench starts from what you already know — skip what you have, master what you’re missing.
Start now