Why is it numerically safer to compute cross-entropy from logits than from probabilities?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Asks why deep learning frameworks compute cross-entropy from raw logits and what goes wrong when the loss starts from probabilities. Tests understanding of floating-point overflow and underflow, the log-sum-exp trick, stable binary cross-entropy and gradient behavior.