Gradient Boosting
An ensemble method in which base models are added sequentially: each new model is trained to correct what the current ensemble does not yet account for. Unlike bagging, the models here are built not independently, but one after another.
The Idea of Sequential Correction
The ensemble is described by an additive model — a sum of contributions:
Here \(F_{m-1}\) is the prediction before the current stage, \(h_m\) is the correction of the new base model, and \(\eta\) is the learning rate, which reduces the contribution of a single model.
For squared loss the initial prediction \(F_0\) is the mean of the target values, and the first model is trained on the residuals \(r_i=y_i-F_0(x_i)\), that is, on pseudo-residuals. It predicts how much the current prediction should be corrected, and each next stage repeats the same procedure with updated residuals.
Negative Gradient and Loss Function
The corrections are needed not by themselves, but as a step towards reducing the loss function. For an arbitrary differentiable loss, the role of residuals is played by pseudo-residuals — the negative derivatives of the loss with respect to the current prediction:
The idea is the same as in gradient descent, but the change happens in the space of predictions rather than in the space of the parameters of a single model: the base tree approximates the required correction for a whole group of objects at once.
Weak Models and Regularization
The base models are usually small trees: they give coarse but stable corrections, and the complexity of the ensemble is accumulated through the number of stages.
The main levers against overfitting:
- small tree depth;
- a reduced learning rate \(\eta\);
- a limit on the number of stages \(M\);
- early stopping by quality on the validation set.
The learning rate and the number of stages are considered together: a smaller \(\eta\) means more stages, and vice versa. With too small values of \(\eta\) and a small number of stages, the ensemble may remain underfitted.