← Back to Classic ML Mind Map
中文·English
📊 Classic MLID: boosting-gbdt

GBDT Negative Gradient

GBDT 负梯度拟合
🎯Core Definition
GBDT (Gradient Boosting Decision Tree) views boosting as gradient descent in function space: with the additive model FM(x)=∑m=1Mρmhm(x)F_M(x) = \sum_{m=1}^{M} \rho_m h_m(x), each round updates along the negative gradient of the loss w.r.t. the function values, Fm=Fm−1−ρm∇FL∣F=Fm−1F_m = F_{m-1} - \rho_m \nabla_F L\big|_{F = F_{m-1}}. Round mm has three steps: (1) compute the negative-gradient pseudo-residual for each sample, y~i=−[∂L(yi,F(xi))∂F(xi)]F=Fm−1\tilde{y}_i = -\left[ \frac{\partial L\left(y_i, F(x_i)\right)}{\partial F(x_i)} \right]_{F = F_{m-1}}; (2) fit a regression tree to (xi,y~i)(x_i, \tilde{y}_i), obtaining leaf regions RjmR_{jm} (j=1,…,Jmj = 1, \dots, J_m); (3) line-search each leaf's output ρjm=arg⁡min⁡ρ∑xi∈RjmL(yi,Fm−1(xi)+ρ)\rho_{jm} = \arg\min_{\rho} \sum_{x_i \in R_{jm}} L\left(y_i, F_{m-1}(x_i) + \rho\right). Under squared loss L=12(y−F)2L = \frac{1}{2}(y - F)^2 the pseudo-residual is exactly the residual y~i=yi−Fm−1(xi)\tilde{y}_i = y_i - F_{m-1}(x_i) and the leaf output is the leaf-mean; under absolute loss y~i=sign(yi−Fm−1(xi))\tilde{y}_i = \text{sign}\left(y_i - F_{m-1}(x_i)\right) and the leaf output is the median (L2 → mean, L1 → median); for binary classification with log loss, FF models the log-odds with p^i=σ(Fm−1(xi))\hat{p}_i = \sigma\left(F_{m-1}(x_i)\right), pseudo-residual y~i=yi−p^i\tilde{y}_i = y_i - \hat{p}_i, and leaf values are refined by a Newton step. Training uses shrinkage (learning rate) ν∈(0.01,0.1)\nu \in (0.01, 0.1): Fm=Fm−1+ν⋅treemF_m = F_{m-1} + \nu \cdot \text{tree}_m — each tree contributes less, more trees are needed, but generalization improves substantially; stochastic gradient boosting (subsampling) further reduces variance. Friedman (2001) showed AdaBoost is gradient boosting under exponential loss.
💡Use Cases
how pseudo-residuals arise, how leaf outputs are determined, differences from AdaBoost, and the role of the learning rate are frequent whiteboard follow-ups; GBDT is also the classic strong baseline for regression, classification, and ranking (LambdaMART).
⚡Key Problems Solved
AdaBoost's exponential loss only fits binary classification and is noise-sensitive — the negative-gradient framework extends boosting to any differentiable loss: each round fits ∂L∂F\frac{\partial L}{\partial F} instead of the labels, so adapting a new loss only requires its first derivative (Huber/quantile loss for robust regression, log loss for calibrated probabilities, NDCG surrogates for ranking); fitting residuals directly reduces bias, making it the standard fix for high-bias low-variance weak models (shallow trees), complementing random forests which reduce variance.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of GBDT Negative Gradient.
Use Cases
In production engineering, what are the primary use cases for GBDT Negative Gradient and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Whiteboard the negative-gradient pseudo-residual y~i=−[∂L∂F]F=Fm−1\tilde{y}_i = -\left[\frac{\partial L}{\partial F}\right]_{F = F_{m-1}}: why does it equal y−Fm−1y - F_{m-1} under squared loss?
2
Derive leaf outputs: mean under squared loss, median under absolute loss; why a Newton step for binary log loss?
3
Relationship to AdaBoost: why is AdaBoost a special case of gradient boosting under exponential loss? How do base learners and weighting differ?
4
Role of shrinkage ν\nu: why do small learning rates with more trees usually work better? Effect on the bias-variance tradeoff?
5
Which loss functions can GBDT adapt? Compare its use cases with random forests (bias vs variance reduction)?
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "GBDT Negative Gradient"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice ➔
← Previous CardAdaBoost DerivationNext Card →XGBoost 2nd-Order

🔗 More Classic ML Knowledge Cards

Bagging & Random ForestBaum-Welch (HMM EM)Confusion MatrixLinear-Chain CRF