Gradient boosting

Gradient boosting is a machine-learning method that builds a model by adding small decision trees one at a time, with each new tree fitted to errors in the model so far. Each tree’s output is scaled by a learning rate before it is added. In credit scoring, the result can estimate default probability and serve as a challenger to a logistic regression scorecard.

Example

For illustration, suppose an application has a predicted default probability of 10%. If it defaults, its residual is 1 − 0.10 = 0.90. A first tree output of +0.8, scaled by a learning rate of 0.1, adds +0.08 to its log-odds.

Gradient boosting. How gradient boosting updates a default estimate: 1,000 applications, 100 bads, 900 goods, ln(100 ÷ 900) = −2.197, PD 10%. Residuals 1 − 0.10 = 0.90 and 0 − 0.10 = −0.10. First tree: +0.8 × learning rate 0.1 = +0.08. −2.197 + 0.08 = −2.117, PD 10.7%. Further trees.
Gradient boosting fits a first tree to residuals of 0.90 for a bad and −0.10 for a good, adding +0.08 to log-odds and moving PD from 10% to 10.7%.

How gradient boosting updates a default estimate

For an illustration, 1,000 applications include 100 bads and 900 goods. The starting default probability is 100 ÷ 1,000 = 10%, so the starting log-odds are ln(100 ÷ 900) = −2.197. Under log loss, a bad application’s residual is 1 − 0.10 = 0.90, and a good application’s is 0 − 0.10 = −0.10. The first tree is fitted to these residuals. If an applicant falls in a leaf with output +0.8 and the learning rate is 0.1, the addition is +0.08. Log-odds become −2.197 + 0.08 = −2.117. The resulting PD is 1 ÷ (1 + e^2.117) = 10.7%.

Further trees are added in the same way. Settings include the number of trees, learning rate, tree depth (often 3 to 6), minimum rows per leaf and the share of rows sampled for each tree (subsample). A smaller learning rate needs more trees. Early stopping holds back part of the training data and stops adding trees when its loss no longer improves.

Gradient boosting and a logistic regression scorecard

A logistic regression scorecard assigns readable points per attribute. Gradient boosting captures interactions and non-linear effects, and manual binning is not needed. It may rank better on large datasets with many variables, but on small samples or with a few strong variables the gain may be small or absent. Fit both on the same development sample, then compare Gini (2 × AUC − 1) or AUC on held-out or out-of-time data.

A boosted model has many trees, so per-applicant contributions such as SHAP values can show the reasons for a single decision. Monotonic constraints can require predicted default risk never to rise as income rises. Deep trees and many trees can fit noise. Using one calls for held-out and out-of-time validation, stability monitoring and model risk governance proportionate to its complexity.

Questions we get asked

What does GBM mean in gradient boosting?

GBM means gradient boosting machine. It is another name for a model built from gradient-boosted trees.

Is XGBoost the same as gradient boosting?

No. XGBoost is one implementation of gradient boosting. LightGBM, CatBoost and scikit-learn’s gradient boosting classifiers are other implementations.

What does DeLong’s test tell you about two models?

DeLong’s test assesses whether a difference in AUC between two models scored on the same sample is larger than chance. It is one way to evaluate the AUC difference in a model comparison.

Decisimo’s gradient boosting comparison tool fits a gradient boosting model and a scorecard on the same 70% of your file, then compares them on the 30% held out in your browser.