Write the Huber loss and explain when to use it.
mediumAnswer
- L_δ -ŷ| ≤ δ, else .
- Quadratic for small errors (smooth, MSE-like gradients), linear for large errors (robust to outliers). δ ~ 1-2*σ of the noise.
- Common in bounding-box regression (Smooth L1 with δ=1 in R-CNN family) and robust regression.
Check yourself — multiple choice
- Always quadratic
- Quadratic below δ, linear above → smooth like MSE for small errors, robust like MAE for outliers
- Same as MSE everywhere
- Only used in classification
Huber: quadratic near zero, linear elsewhere → robust smooth loss (Smooth L1 = Huber δ=1).
#losses
Practise Deep Learning
214 interview questions in this topic.
Related questions
- Why compute softmax + cross-entropy jointly via log-sum-exp?
- How should the output head be designed for a regression task with a strictly positive target?
- How is the output head different for multi-label vs multi-class classification?
- What is label smoothing and why does it help?
- How does YOLO / SSD / RetinaNet differ from two-stage detection?
- Briefly, what do BLEU and ROUGE measure?