What is the pseudo-residual for the binary logistic loss in gradient boosting?

Quick Overview

Asks for the pseudo-residual that gradient boosting fits under binary log loss when the model works on the log-odds scale. Tests the gradient derivation through the sigmoid, why boosting adds to raw scores, and how Newton-step leaf values use the Hessian.

What is the pseudo-residual for the binary logistic loss in gradient boosting?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What is the pseudo-residual for the binary logistic loss in gradient boosting? Assume labels $y \in \{0, 1\}$ and a boosted model whose raw output $F(x)$ is a score on the log-odds scale. ```hint Where to differentiate Write the log loss as a function of the raw score $F$ and differentiate with respect to $F$. A common slip is differentiating with respect to the probability instead. ``` ```hint Leaf values The residuals decide where a tree splits. Ask which extra quantity a Newton step needs to choose the value stored in each leaf. ``` ### What a Strong Answer Covers - The pseudo-residual stated as the negative gradient of the log loss with respect to the raw score, with a short derivation - Why the model is built on the log-odds scale and how its output maps back to a probability - The range of the residuals and which points receive the largest update - How leaf values are computed from the second derivative of the loss - The equivalent form under the $\{-1, +1\}$ label convention ### Follow-up Questions - How does the XGBoost leaf weight change once an L2 penalty on leaf weights is added? - What value should the model start from before the first tree, and why? - How do the pseudo-residuals and the trees change for multiclass softmax loss?

Overview: Asks for the pseudo-residual that gradient boosting fits under binary log loss when the model works on the log-odds scale. Tests the gradient derivation through the sigmoid, why boosting adds to raw scores, and how Newton-step leaf values use the Hessian.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

What is the pseudo-residual for the binary logistic loss in gradient boosting?

Assume labels y∈{0,1}y \in \{0, 1\} and a boosted model whose raw output F(x)F(x) is a score on the log-odds scale.

What a Strong Answer Covers Guidance

  • The pseudo-residual stated as the negative gradient of the log loss with respect to the raw score, with a short derivation
  • Why the model is built on the log-odds scale and how its output maps back to a probability
  • The range of the residuals and which points receive the largest update
  • How leaf values are computed from the second derivative of the loss
  • The equivalent form under the {−1,+1}\{-1, +1\} label convention

Follow-up Questions Guidance

  • How does the XGBoost leaf weight change once an L2 penalty on leaf weights is added?
  • What value should the model start from before the first tree, and why?
  • How do the pseudo-residuals and the trees change for multiclass softmax loss?