Skip to content
atlas

Gradient boosting

Also known as: gradient boosted trees, GBM, XGBoost

A method that adds small decision trees one after another, each built to fix the mistakes the trees before it still make.

Draft - this entry has not been reviewed yet.

Formal

A way of building a strong model from many weak ones, usually small decision tree models, where each new tree is trained on what the current model still gets wrong, as measured by a loss function, and added with a small weight.

In plain English

Like a team of editors passing a text along; the first fixes the worst errors, the next fixes what the first missed, and after many rounds very few errors are left.

In practice

A Danish online shop predicts which orders will be returned from the product, the price, the customer's history and the time of day, and has found it more accurate than the other methods it tried.

Why it matters

It is often the most accurate choice for data in tables, such as bank, sales or health records, and wins many public contests there, often beating deep learning.

Technical deep dive

Boosting builds an additive model F(x) = sum of nu * h_m(x) stage by stage. Friedman (2001, Annals of Statistics) framed it as gradient descent in function space: at each stage a new weak learner h_m, typically a small regression tree, is fitted to the negative gradient of the loss with respect to the current predictions (the pseudo-residuals) and added with a shrinkage factor, the learning rate nu. For squared error the pseudo-residuals are simply the residuals; other differentiable losses give log-loss for classification or Huber and quantile losses for robust regression. AdaBoost (Freund and Schapire, 1997) is an earlier boosting method that turns out to be a special case with exponential loss.

The main hyperparameters interact: a smaller learning rate needs more trees but usually generalises better; tree depth (often 3 to 8 levels) controls how many features can interact; and subsampling rows or columns per tree (stochastic gradient boosting, Friedman 2002) adds regularisation. Because each tree corrects the previous ones, boosting mainly reduces bias and, unlike a random forest, can overfit as trees are added, so the number of rounds is set by early stopping on a validation set.

Modern libraries made the method fast and dominant on tabular data. XGBoost (Chen and Guestrin, KDD 2016) added a second-order approximation of the loss, explicit L1 and L2 penalties on leaf weights, sparsity-aware split finding and cache-aware parallel construction. LightGBM (Ke et al., 2017) uses histogram-based splits and leaf-wise growth, and CatBoost (Prokhorenkova et al., 2018) uses ordered boosting and native handling of categorical features. scikit-learn provides HistGradientBoostingClassifier and Regressor in the same histogram style.

Benchmarks such as Grinsztajn et al. (2022) found tree-based ensembles still outperform deep learning on typical medium-sized tabular datasets. The costs are sequential training that parallelises only within a tree, more sensitive tuning than random forests, and predictions that cannot extrapolate beyond the range seen in training.

What to learn first

Everything this builds on, foundations first.

  1. Training data
  2. →Feature
  3. →Machine learning
  4. →Decision tree
  5. →Loss function
  6. →Gradient boosting

Relationships

Alternative to
Random forest

Sources & further reading

Where this data comes from

This entry was drafted by an AI from the sources above and has not yet been checked by a person. Treat it as a starting point, and check anything important against the sources.

See the review queueSuggest a correction on GitHubThis term as JSON

Check yourself

Loading…

Atlas is in beta.