A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Gradient Boosting Machines

Graduate Depth 97 in the knowledge graph I know this Set as goal
19topics build on this
676prerequisites beneath it
See this on the map →
Advanced Ensemble MethodsGradient Descent and Optimization+2 moreSupport Vector Machines
ensemble boosting supervised-learning

Core Idea

Gradient boosting fits weak learners sequentially to residuals, focusing on remaining errors. Each learner reduces previous prediction errors. XGBoost and LightGBM are efficient implementations with regularization. Works with any differentiable loss function.

Explainer

From ensemble methods, you know that combining multiple weak models often outperforms any single strong model. From gradient descent, you know how to minimize a loss function by iteratively stepping in the direction of steepest descent. Gradient boosting unifies these ideas in an elegant way: it performs gradient descent in function space, where each step is a new weak learner (typically a small decision tree) fitted to the negative gradient of the loss. Instead of adjusting numerical parameters, gradient boosting adjusts the prediction function itself, one additive correction at a time.

Here is the concrete procedure. Start with a simple initial prediction — for regression, the mean of all target values. Compute the residuals: the differences between the true targets and current predictions. These residuals tell you exactly where and by how much the current model is wrong. Now fit a small decision tree (a "weak learner") to predict these residuals. Add this tree's predictions to the current model, scaled by a learning rate (typically 0.01–0.3). The model has now corrected some of its errors. Repeat: compute new residuals from the updated predictions, fit another tree to those residuals, add it in. After hundreds or thousands of such iterations, the ensemble of small trees collectively produces highly accurate predictions. Each tree is simple (often just 4–8 terminal nodes), but their cumulative effect is powerful.

The connection to gradient descent becomes clear when you generalize beyond squared-error loss. For squared error, the residual (y − ŷ) happens to equal the negative gradient of the loss with respect to the prediction. For other loss functions — absolute error, log-loss for classification, quantile loss for prediction intervals — the residuals are replaced by the negative gradient of the loss function evaluated at each data point's current prediction. The new tree is always fitted to these pseudo-residuals. This is why the method is called gradient boosting: it performs gradient descent in function space, and the "gradient" is computed pointwise across the dataset. This generality means gradient boosting works with any differentiable loss function, making it applicable to regression, classification, ranking, and survival analysis.

The practical dominance of gradient boosting in applied machine learning (especially on tabular data) comes from implementations like XGBoost, LightGBM, and CatBoost that add critical engineering and regularization. XGBoost introduced second-order Taylor expansion of the loss (using both gradient and Hessian) for better split finding, plus L1 and L2 regularization on leaf weights to prevent overfitting. LightGBM made training dramatically faster with histogram-based splitting and leaf-wise tree growth instead of level-wise. Key hyperparameters to tune are learning rate (smaller = more trees needed but better generalization), tree depth (deeper = more complex interactions captured), and number of trees (controlled by early stopping on a validation set). The learning rate and number of trees trade off directly: halving the learning rate roughly doubles the number of trees needed, but often improves final accuracy. Gradient boosting remains the default choice for structured/tabular prediction tasks, consistently winning Kaggle competitions and powering production ML systems across industry.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionSine, Cosine, and Tangent RatiosTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionProbability Density Functions and Continuous DistributionsCumulative Distribution FunctionsContinuous Random VariablesProbability Density FunctionsExpected ValueLinear Regression in Machine LearningNeural Network FundamentalsBackpropagation AlgorithmMultilayer Perceptrons (MLPs)Activation Functions in Neural NetworksVanishing Gradient ProblemGradient Descent and OptimizationGradient Boosting Machines

Longest path: 98 steps · 676 total prerequisite topics

Prerequisites (4)

Leads To (1)