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 F(x1),…,F(xn) as the unknowns. Each round computes the negative gradient of the loss L at every training point, rim=−∂L(yi,F(xi))∂F(xi) evaluated at the current model Fm−1. These are the pseudo-residuals. It fits a tree hm to them and takes a small step: Fm=Fm−1+νhm, where ν is the learning rate.

Steps

  1. State the goal: minimise ∑iL(yi,F(xi)) over functions F. Plain gradient descent on the vector (F(x1),…,F(xn)) would move each value by −∂L/∂F(xi). That says nothing about new points x, so instead we fit a base learner (a small tree) to the negative gradient; the tree generalises it to all x.
  2. Initialise with the best constant, F0(x)=arg⁡min⁡γ∑iL(yi,γ): the mean of y for squared loss, the median for absolute loss, and the log-odds of the positive class for logistic loss.
  3. Compute the pseudo-residuals for each loss. Squared loss 12(y−F)2: r=y−F, the ordinary residual. Absolute loss ∣y−F∣: r=sign⁡(y−F). Logistic loss with y∈{0,1}, p=σ(F) and L=−yln⁡p−(1−y)ln⁡(1−p): ∂L/∂F=p−y, so r=y−σ(F).
  4. Fit a regression tree to the pairs (xi,rim). Call its leaf regions Rjm. Then choose each leaf's value by a one-dimensional search on the true loss: γjm=arg⁡min⁡γ∑xi∈RjmL(yi,Fm−1(xi)+γ).
  5. Update Fm(x)=Fm−1(x)+ν∑jγjm1[x∈Rjm], with learning rate 0<ν≤1 (shrinkage). Repeat for M rounds.
  6. 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 e−yF and labels y∈{−1,+1}.

Common mistakes

How long your answer should be

About a page; 6–8 minutes.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: The linear SVM minimises ∑i[1−ti(w⊤xi+b)]++λ∥w∥22, where [a]+=max⁡(0,a) and ti∈{−1,+1} is the label. What changes if the penalty is replaced by λ∥w∥1, 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 f^(x)=1nh∑iK ⁣(x−xih) in one dimension, derive the leading terms of its bias and variance at a point x. Hence what is the bandwidth that minimises the asymptotic mean squared error, and at what rate does the error shrink with n?