Why does gradient boosting fit a tree to pseudo-residuals and then solve a separate leaf-value optimization problem?

Quick Overview

Asks why gradient boosting builds each tree on pseudo-residuals and then recomputes the leaf values against the true loss. Tests understanding of split finding, per-leaf line search, losses such as absolute and log loss, and the second-order leaf weights used by XGBoost and LightGBM.

Why does gradient boosting fit a tree to pseudo-residuals and then solve a separate leaf-value optimization problem?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

Why does gradient boosting fit a tree to pseudo-residuals and then solve a separate leaf-value optimization problem? Answer for gradient boosting with regression trees in Friedman's formulation, where at stage $m$ the pseudo-residuals are the negative gradients of the loss with respect to the current predictions $F_{m-1}(x_i)$. ```hint Compare two losses Write the pseudo-residuals for absolute loss and for squared loss. For each, ask whether the mean of the pseudo-residuals in a leaf is the value that minimizes that loss over the leaf. ``` ```hint Check the units For log loss, compare the units of the model output $F$ with the units of the pseudo-residuals. ``` ### What a Strong Answer Covers - Why a least-squares tree on pseudo-residuals is a cheap, loss-agnostic way to choose the splits - The per-leaf optimization problem and how it differs from a single global step size - At least one loss where the leaf mean of the pseudo-residuals is the wrong value, with the correct leaf value - The case where the two steps coincide - How second-order libraries such as XGBoost and LightGBM combine structure and leaf values ### Follow-up Questions - Derive the XGBoost split gain from the second-order approximation. How does $\lambda$ change which splits get chosen? - Where does the learning rate (shrinkage) enter relative to the leaf-value step? - For quantile loss at level $\alpha$, what is the optimal leaf value?

Overview: Asks why gradient boosting builds each tree on pseudo-residuals and then recomputes the leaf values against the true loss. Tests understanding of split finding, per-leaf line search, losses such as absolute and log loss, and the second-order leaf weights used by XGBoost and LightGBM.

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

Why does gradient boosting fit a tree to pseudo-residuals and then solve a separate leaf-value optimization problem?

Answer for gradient boosting with regression trees in Friedman's formulation, where at stage mm the pseudo-residuals are the negative gradients of the loss with respect to the current predictions Fm−1(xi)F_{m-1}(x_i).

What a Strong Answer Covers Guidance

  • Why a least-squares tree on pseudo-residuals is a cheap, loss-agnostic way to choose the splits
  • The per-leaf optimization problem and how it differs from a single global step size
  • At least one loss where the leaf mean of the pseudo-residuals is the wrong value, with the correct leaf value
  • The case where the two steps coincide
  • How second-order libraries such as XGBoost and LightGBM combine structure and leaf values

Follow-up Questions Guidance

  • Derive the XGBoost split gain from the second-order approximation. How does λ\lambda change which splits get chosen?
  • Where does the learning rate (shrinkage) enter relative to the leaf-value step?
  • For quantile loss at level α\alpha , what is the optimal leaf value?