Why is gradient boosting called gradient descent in function space, what are the pseudo-residuals for squared, absolute and logistic loss, and what is the full algorithm with regression trees as base learners?
Supervised learning, Ensembles
Level L4 Advanced. Length Long. Nature Th+Mat Both.
What's being asked
Whether you see boosting as minimising any differentiable loss by repeatedly fitting a simple model to the negative gradient.
Key idea
Treat the predictions as the unknowns. Each round computes the negative gradient of the loss at every training point, evaluated at the current model . These are the pseudo-residuals. It fits a tree to them and takes a small step: , where is the learning rate.
Steps
- State the goal: minimise over functions . Plain gradient descent on the vector would move each value by . That says nothing about new points , so instead we fit a base learner (a small tree) to the negative gradient; the tree generalises it to all .
- Initialise with the best constant, : the mean of for squared loss, the median for absolute loss, and the log-odds of the positive class for logistic loss.
- Compute the pseudo-residuals for each loss. Squared loss : , the ordinary residual. Absolute loss : . Logistic loss with , and : , so .
- Fit a regression tree to the pairs . Call its leaf regions . Then choose each leaf's value by a one-dimensional search on the true loss: .
- Update , with learning rate (shrinkage). Repeat for rounds.
- Control overfitting: use a small with more rounds, shallow trees, row subsampling (stochastic gradient boosting), and early stopping on a validation set. Mention that AdaBoost is the special case with the exponential loss and labels .
Common mistakes
- Saying gradient boosting always fits the residuals . That is true only for squared loss.
- Confusing boosting (sequential, mainly reduces bias) with bagging (parallel, mainly reduces variance).
- Thinking more rounds never hurt. Boosting does overfit, which is why early stopping is used.
- Sign errors in the logistic pseudo-residual. It is , the negative of .
How long your answer should be
About a page; 6–8 minutes.
Last checked on 4 December 2026.
Read this
- The Elements of Statistical Learning (ESL): Free PDF. Section 10.10 (Numerical Optimization via Gradient Boosting), pp. 358-361: steepest descent in function space, Table 10.2 (negative gradients for squared, absolute, Huber and deviance losses), and Algorithm 10.3 (Gradient Tree Boosting with per-leaf line search). Sections 10.12.1-10.12.2 cover shrinkage and subsampling.
- Cornell CS4780 Lecture Notes (Weinberger): Boosting: Gradient boosting as a Taylor-approximation step in function space, with Case Study #1 (Gradient Boosted Regression Trees): fit a regression tree to the negative gradients, which are the residuals for squared loss.
- NPTEL: Introduction to Machine Learning (IIT Madras, Prof. Balaraman Ravindran): Week 8, Gradient Boosting, which covers fitting each learner to the negative gradient of the loss.
Previous in Supervised learning: The linear SVM minimises , where and is the label. What changes if the penalty is replaced by , in the solution, the optimisation problem, the use of kernels and the meaning of the margin?
Next in Supervised learning: For a kernel density estimate in one dimension, derive the leading terms of its bias and variance at a point . Hence what is the bandwidth that minimises the asymptotic mean squared error, and at what rate does the error shrink with ?