Home /permanent

Huber Loss

Huber Loss is a Loss Function for regression that combines Mean-Squared Error and Mean Absolute Error. For small errors (below a threshold δ\delta) it's quadratic like MSE, and for large errors it's linear like MAE:

Lδ(y,y^)={12(y−y^)2if ∣y−y^∣≤δδ(∣y−y^∣−12δ)otherwise L_\delta(y, \hat{y}) = \begin{cases} \frac{1}{2}(y - \hat{y})^2 & \text{if } |y - \hat{y}| \le \delta \\ \delta \left(|y - \hat{y}| - \frac{1}{2}\delta\right) & \text{otherwise} \end{cases}

This makes it less sensitive to outliers than MSE, while still being smooth around zero.

It's commonly used in Deep-Q Learning to stop large errors from causing huge, unstable updates.