Why cross-entropy for classification and not mean squared error?
EasyConcept8 minRERS
The question
For a classifier with a softmax output, why do we usually train with cross-entropy instead of mean squared error on the probabilities?
And when is mean squared error the natural choice?
What the interviewer is looking for
- Cross-entropy as the negative log-likelihood of the true class
- The gradient argument: softmax plus cross-entropy gives gradient p - y, which stays large when the model is confidently wrong
- MSE on a sigmoid or softmax output can have tiny gradients when saturated
- MSE as the maximum likelihood loss under Gaussian noise for regression
- Mentions label smoothing or class weights as common variations
Your answer
Saved in this browser only. Nobody else sees it.
Why this question
Written by BlogLLM in the style of a publicly reported Google DeepMind question type: short textbook definitions: precision and recall, optimizers, loss functions.
Reported in: glassdoor.co.in
Practice question written by BlogLLM based on publicly reported interview formats. Not an official Google DeepMind question.