What is gradient boosting?
Gradient boosting is an ensemble learning method that adds weak models, usually small decision trees, in sequence, each correcting the error of the prediction so far.
It is also called gradient boosted trees or GBM. Unlike a random forest, whose trees train independently and vote, gradient boosting trains each tree on the error the previous ones left. Any weak learner can be used, though decision trees are the norm.
- Topic
- Machine learning, models and training
- Also known as
- Gradient boosted trees, GBM
- Origin
- 2001, Jerome Friedman
How gradient boosting works
- The starting prediction is simple, such as the target mean in regression.
- For each example the negative gradient of the loss with respect to the current prediction is computed; for mean squared error this is the gap between true value and prediction.
- A new shallow decision tree is trained to predict these gradients.
- Its output, multiplied by a small learning rate, is added to the total prediction; the loop runs to a set tree count or until validation stops improving.
In more detail
Second-order boosting and histogram-based splits
Modern libraries such as XGBoost, LightGBM and CatBoost extend Friedman's original first-order gradient boosting into second-order (Newton) boosting by using both the gradient and the Hessian (second derivative) of the loss function, combined with L1 and L2 leaf regularisation and histogram-based split finding for much faster convergence and scalability.
Limits on extrapolation and probability calibration
Tree-based gradient boosting has structural limits: it cannot extrapolate numeric trends beyond the range seen in training data, struggles with unstructured data like raw images or long text and tends to predict uncalibrated probabilities unless post-hoc calibration (such as Platt scaling or isotonic regression) is applied.
Positioning against tabular foundation models
While gradient boosted trees remain the standard baseline for large, heterogeneous enterprise tabular data, tabular foundation models (such as TabPFN v2) have emerged as strong competitors on small-to-medium datasets without extensive hyperparameter tuning.
Commonly confused terms
| Term | How it differs |
|---|---|
| AdaBoost | AdaBoost adjusts the weights of misclassified training examples after each weak learner, whereas gradient boosting fits each new learner to the negative gradient of an arbitrary differentiable loss function. |
Why gradient boosting matters for on-premises AI
On tabular company data such as credit scoring, fraud, churn and demand forecasting, gradient boosting often gives the highest accuracy. It trains on in-house CPU servers without a GPU. SHapley Additive exPlanations explains single decisions and feature importance explains the whole model in audits, though not causation. Too many trees or a high learning rate cause overfitting, so early stopping on validation data is used.
A retail chain produces weekly store-level demand forecasts with gradient boosting on an in-house server; the features most affecting each forecast, such as promotions, holiday weeks and weather, are shown to planners with SHAP values.
Common questions
How does gradient boosting differ from a random forest?
A random forest trains trees independently and votes. Gradient boosting adds trees in sequence, each correcting earlier errors; it is usually more accurate but needs more careful tuning.
Why is gradient boosting so strong on tabular data?
It handles numeric features of different scales without rescaling and captures feature interactions through trees; common libraries also handle missing values directly.
Related terms
- Ensemble learning
- Decision tree
- Random forest
- Regression
- Classification
- Feature importance
- SHapley Additive exPlanations
Sources
- Friedman, Greedy function approximation: A gradient boosting machine, 2001
- Chen and Guestrin, XGBoost: A Scalable Tree Boosting System, 2016
In the glossary: Glossary, D to L