EasyDeepLearn

Write the Huber loss and explain when to use it.

medium

Answer

  • L_δ(y,  )  =  0.5(y)2(y, \;)\; = \;0.5 \cdot (y - )^{2} if  y\mathrm{if}\; \mid y-ŷ| ≤ δ, else δ(y    0.5δ){\delta} \cdot ( \mid y - \mid \; - \;0.5 \cdot {\delta}).
  • 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