What is the advantage of using Log-Cosh loss compared to Huber loss?

Quick Overview

Asks what log-cosh loss offers over Huber loss for regression with outliers. Tests knowledge of each loss's shape, gradient and second derivative, why smoothness matters for Newton-step gradient boosting, the hidden scale assumption, and numerical stability.

What is the advantage of using Log-Cosh loss compared to Huber loss?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

What is the advantage of using Log-Cosh loss compared to Huber loss? Both are regression losses meant to be less sensitive to outliers than squared error. Compare them as you would when choosing a training objective, for example for a gradient-boosted model. ```hint Compare derivatives Write down the first and second derivatives of both losses as functions of the residual, and look at what happens at Huber's threshold. ``` ```hint What must be chosen Ask what a practitioner has to pick before training with Huber, and whether log-cosh hides an equivalent choice somewhere. ``` ### What a Strong Answer Covers - The shape of log-cosh for small and large residuals, and how close it is to Huber. - The smoothness difference and why second-order methods such as Newton-step boosting care about it. - The hyperparameter difference, including the scale that log-cosh assumes implicitly. - Caveats: the fixed transition point, the vanishing second derivative for large residuals, and numerical overflow. ### Follow-up Questions - How would you give log-cosh an adjustable transition point, and what does that cost you? - How does pseudo-Huber loss compare with log-cosh? - What gradient and Hessian would you return from a custom gradient-boosting objective for log-cosh? - When would you choose plain absolute error or a quantile loss over either of these?

Overview: Asks what log-cosh loss offers over Huber loss for regression with outliers. Tests knowledge of each loss's shape, gradient and second derivative, why smoothness matters for Newton-step gradient boosting, the hidden scale assumption, and numerical stability.

General logo
General
Nov 25, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

What is the advantage of using Log-Cosh loss compared to Huber loss?

Both are regression losses meant to be less sensitive to outliers than squared error. Compare them as you would when choosing a training objective, for example for a gradient-boosted model.

What a Strong Answer Covers Guidance

  • The shape of log-cosh for small and large residuals, and how close it is to Huber.
  • The smoothness difference and why second-order methods such as Newton-step boosting care about it.
  • The hyperparameter difference, including the scale that log-cosh assumes implicitly.
  • Caveats: the fixed transition point, the vanishing second derivative for large residuals, and numerical overflow.

Follow-up Questions Guidance

  • How would you give log-cosh an adjustable transition point, and what does that cost you?
  • How does pseudo-Huber loss compare with log-cosh?
  • What gradient and Hessian would you return from a custom gradient-boosting objective for log-cosh?
  • When would you choose plain absolute error or a quantile loss over either of these?