A comparative analysis of gradient boosting algorithms
Paper · 2020 · Candice Bentéjac, Anna Csörgő and Gonzalo Martínez-Muñoz
Summary
A fast classifier can still take a long time to put to work if finding its settings requires thousands of training runs. Bentéjac, Csörgő, and Martínez-Muñoz examine this problem for XGBoost, a system that builds a sequence of decision trees, each designed to improve the predictions made by the trees already in place. They compare it with conventional gradient boosting, which follows the same broad strategy, and random forest, which combines votes from trees grown with independently randomized inputs. The experiments use 28 classification datasets from the UCI repository. For each algorithm, the authors compare the software package’s defaults with settings selected by searching a grid of candidates. They measure accuracy on held-out data and record the time spent searching separately from the time spent fitting the selected ensemble.
The accuracy verdict depends on how success is counted. Tuned conventional gradient boosting had the highest mean test accuracy on 10 of the 28 datasets, the most wins by that measure. Tuned XGBoost led when the authors ranked the methods on each dataset and averaged the ranks. Across the six settings tested, the mean ranks did not differ significantly. Random forest was comparatively insensitive to the search. On 18 of the 28 datasets, the difference in test accuracy between its default and tuned settings was below 0.5%. The boosted methods generally benefited more from tuning, although the original XGBoost defaults were more accurate than tuned XGBoost on German, Parkinsons, and Vehicle.
XGBoost was the fastest on average when the comparison concerned fitting an ensemble after its settings had been specified. The cost of picking those settings was much larger. The paper reports that searching the grid accounted for over 99.9% of the computational effort for tuned gradient boosting or XGBoost under its procedure. Dataset-level timings also qualify the overall speed result. On some multiclass tasks, including Segment and Soybean, random forest took less time to fit than either boosted method with the original defaults.
The authors also ask how much of the XGBoost search is worth doing. A proposed fixed setting improved on the package defaults on 17 of the 28 datasets. A separate experiment let the learning rate, depth limit, and the minimum gain required for a split vary by dataset, while fixing how training rows and features were sampled. That smaller search placed ahead of the full XGBoost grid by average rank and used less computation. The findings give two ways to read the benchmark. A fast implementation makes repeated fitting less expensive, and the choice of which settings to search can matter more for the total cost than the speed of the final fit.
Deep dive: A comparative analysis of gradient boosting algorithms
A comparison of XGBoost, gradient boosting, and random forests shows how tuning affects classification accuracy and training time. · about 34 minutes to read
The problem and its context
Why compare the training procedures?
The paper starts from a practical question in machine learning. If several classifiers are credible candidates, how much work does it take to get good predictions from each? An algorithm may be easy to try with the settings supplied by its software package. It may also support a wide range of choices that change what it learns. Someone choosing between algorithms needs to know how each behaves under both circumstances. Otherwise, a comparison of defaults tells them little about what a search might buy, and a comparison of tuned results leaves the cost of getting there out of view.
The authors motivate this question with examples from fields where prediction involves complex data or a large amount of it. They point to work on credit scoring, prediction of bioactive molecules, renewable energy forecasting, and sentiment analysis. These examples establish the range of interest in ensemble methods. The benchmark itself asks a narrower question about classification. It uses the same kinds of accuracy and training-time measurements across a common collection of tasks so that the methods can be compared under a shared procedure.
An ensemble combines the outputs of several constituent learners. In this paper, the constituents are decision trees. A tree routes an example through tests on its features until it reaches a leaf, which supplies the tree’s output. Each branch test divides the examples reaching that point according to a feature value. A tree can represent different rules in different parts of the data because the tests reached on one branch can differ from those reached on another. The design question for an ensemble is how to make the trees collectively useful and how to combine their outputs.
The paper describes two broad approaches. Randomization makes several trees see different evidence or consider different possible splits. The aim is to obtain varied predictions that can be combined. Boosting instead makes the construction of each new tree depend on the ensemble already fitted. Later trees concentrate on changes that would improve its predictions according to a loss function. A loss assigns a cost to a prediction given the observed outcome. It tells the training procedure what kinds of mistakes to reduce.
These approaches give the paper a comparison at two levels. XGBoost and conventional gradient boosting share the sequential construction principle. Their comparison asks how differences in regularization and implementation play out within that family. Random forest supplies a different way of building and combining trees. Its inclusion asks whether the extra choices involved in a boosted procedure deliver an advantage over a method with a strong reputation for performance straight from its defaults.
What earlier work left open
The authors describe random forest as an established benchmark in prior broad comparisons of supervised learning methods. They note a comparison in which the leading methods were based on random forest and tuned only the number of features eligible at a split. In the same comparison, a forest using the default settings placed fifth out of 179 methods. That history gives the paper a specific reason to include both a default and a tuned forest. If an approach is already competitive with little selection effort, the question is whether a larger search produces any consistent gain.
The authors also point to XGBoost’s performance in Kaggle competitions. A competition entry shows what can be achieved for a particular task, with the settings and work that went into that entry. The paper’s experiment addresses the behavior of a training and selection procedure across tasks. In this setting, a method can be valuable because it does reasonably well throughout the benchmark, fits quickly, or yields a good result without much search. These properties are distinct from taking first place on a particular task.
The earlier comparisons identified by the authors had left gradient boosting methods outside their broad evaluations. The authors therefore put conventional gradient boosting into the benchmark in its own right. It helps establish whether strong performance belongs to the common boosting strategy or follows from choices specific to XGBoost. The paper also treats the training code as part of what an engineer uses. Two methods that build trees by related principles can impose quite different computational costs when they represent the data or search for a split differently.
The earlier account of XGBoost: A Scalable Tree Boosting System provides the immediate technical background. As described in the comparison, XGBoost changes the objective so it can penalize the complexity of the trees. It also organizes split finding to reduce repeated work. The objective can influence which trees are built, while the data layout and split-search procedures affect the cost of building them. Timing a complete implementation incorporates both kinds of choices. The paper’s additional comparisons within XGBoost give a closer look at selected settings that influence its predictions.
The study therefore treats algorithm choice and parameter choice as related decisions. A package default supplies a reproducible starting configuration. A search uses part of the available data to decide which configuration is promising for a particular task. Its benefit depends on whether the selection carries over to held-out examples, and its cost depends on the number and expense of fits. XGBoost provides the authors with a concrete way to investigate that tradeoff because its controls cover the size of a boosting update, the growth of trees, and the amount of randomization used during training.
The method, step by step
How the trees work together
The random forest begins by drawing a training sample for each tree. The paper describes bootstrap sampling, which draws with replacement and keeps the sample size equal to that of the original training set. A training example can appear more than once in a tree’s sample, while another example may be absent from it. There is a further random choice at each node. The tree considers a sampled subset of the input features when it looks for its best split. The feature subset can change at the next node, giving the same tree different candidates in different parts of its structure. For classification, the forest combines the trees by majority vote.
The paper presents the following rule from Breiman for the number of features considered at a split.
⌊log₂(#features) + 1⌋
Here #features is the total number of available input features, log₂ is the logarithm to base 2, and 1 is added before rounding down. The floor brackets ⌊ ⌋ take the greatest integer at or below the enclosed value. This rule describes the earlier method. The authors list sqrt as the package default in their own grid, where sqrt represents a feature count based on the square root of the available count.
The study varies other forest settings that control whether and how far a tree can grow. The minimum number of samples required at an internal node determines when the algorithm is allowed to attempt a split. A minimum leaf size puts a condition on the result of a proposed split. A candidate could therefore pass the internal-node requirement yet be rejected because it leaves too few examples on one side. A maximum depth imposes a separate limit on the length of a route through the tree. The authors use these controls to compare the defaults with forests whose individual trees can have different structures.
Boosting uses trees differently. It makes an initial prediction, evaluates it, then tries to find a tree whose output can be added to the current prediction to improve it. This update changes the problem facing the following tree. The new tree is trained against the ensemble as it stands at that stage, so the ensemble does not simply collect interchangeable votes. The constituent trees contribute numerical adjustments to an accumulated prediction.
This approach needs a way to specify what an improvement looks like. For an example with a known target, the loss measures the cost associated with the current prediction. The slope of the loss with respect to that prediction describes how the loss changes locally as the prediction moves. A tree fitted to the collection of these signals can produce a correction that varies across feature values. Examples that reach different leaves can receive different corrections, while examples that share a leaf receive the same tree output.
The diagram follows the construction of a boosted ensemble at the level shared by conventional gradient boosting and XGBoost. Their choices about fitting and constraining the new tree differ within these steps.
Building a boosted tree ensemble
The steps in order.
The boosting update
The authors describe a training set of inputs and observed outputs using the following notation.
D = {(xᵢ, yᵢ)}ᵢ₌₁ᴺ
D is the training dataset. The braces collect the examples indexed by i, from 1 through N, where N is the number of training examples. Each ordered pair contains an input xᵢ and its observed output yᵢ. An input contains the feature values on which a tree can split. The paper uses F* for the function it wants to approximate and F̂ for the fitted approximation. A prediction F(x) is the value returned by a particular approximation F at input x. The loss L(y, F(x)) measures the cost of that value for an example whose output is y.
The first approximation is constant across inputs. Its value is chosen by minimizing the total training loss among constant predictions.
F₀(x) = argmin over α [∑ᵢ₌₁ᴺ L(yᵢ, α)]
F₀ is the initial predictor, and x is the input at which it is evaluated. α is a candidate constant. The summation adds the loss L for predicting α on each outcome yᵢ, with i running from 1 to the training-set size N. The argmin returns the value of α at which that total is smallest. All inputs then receive that prediction before any tree is added. This gives the subsequent tree an existing prediction to improve.
After a tree has been chosen, the additive update in the paper has the following form.
Fₘ(x) = Fₘ₋₁(x) + ρₘ hₘ(x)
m denotes the current boosting stage. Fₘ₋₁(x) is the prediction accumulated through the preceding stage, and Fₘ(x) is the updated prediction for the same input x. The function hₘ is the learner fitted for stage m, and hₘ(x) is its output for x. The scalar ρₘ determines how strongly the learner contributes. Multiplying the tree output by this scalar preserves the pattern of corrections proposed by the tree while changing their scale.
The paper first expresses the desired choice of tree and scale as a joint minimization.
(ρₘ, hₘ) = argmin over ρ, h [∑ᵢ₌₁ᴺ L(yᵢ, Fₘ₋₁(xᵢ) + ρ h(xᵢ))]
The pair on the left is the chosen scale ρₘ and function hₘ for stage m. The candidates on the right are a scale ρ and a function h. For training input xᵢ, the candidate prediction combines the previous prediction Fₘ₋₁(xᵢ) and the proposed adjustment ρ h(xᵢ). The loss L assesses that prediction against output yᵢ, and the sum runs over the training examples i from 1 to N. The expression identifies the pair that minimizes this sum. The previous ensemble is held fixed during this choice, which is what makes training stagewise.
The training procedure uses a greedy approximation to the joint search. It obtains a signal for each training example by differentiating the loss with respect to the prediction. The pseudo-residual equation is written in the paper with the derivative as follows.
rₘᵢ = [∂L(yᵢ, F(x)) / ∂F(x)] evaluated at x = xᵢ and F(xᵢ) = Fₘ₋₁(xᵢ)
rₘᵢ is the pseudo-residual for example i at stage m. ∂ denotes partial differentiation. Here the derivative measures the change in L when the prediction F(x) changes and the observed outcome yᵢ is held fixed. It is evaluated for the training input xᵢ at the current prediction Fₘ₋₁(xᵢ). The displayed derivative gives the local slope. A descent update must move the prediction in a direction that lowers the loss, so the sign of the eventual correction matters. The term “pseudo-residual” reflects the use of a loss-dependent training signal. Its meaning comes from the derivative, beyond the ordinary idea of subtracting a prediction from an observed value.
The authors describe fitting hₘ on the original inputs paired with these new targets. The tree approximates the training signals with leaf outputs. The procedure then obtains ρₘ through a line search. Once the tree has determined the shape of a possible change, the line search chooses its scale by considering the training loss along that direction. At the next stage, the training signals are calculated again from the updated ensemble. The stagewise description explains why another tree can remain useful even after several trees have been added.
The paper discusses a way to make each step more conservative, called shrinkage.
Fₘ(x) = Fₘ₋₁(x) + νρₘ hₘ(x)
Fₘ(x) is the prediction at input x after stage m, and Fₘ₋₁(x) is the prediction before that stage. hₘ(x) is the new learner’s output and ρₘ is the scale obtained for it. The extra multiplier ν is the learning rate. The paper gives its range as above 0 and up to 1.0, and describes 0.1 as a usual setting. A smaller value applies a smaller portion of the correction on each round. With a fixed tree count, the learning rate controls how far the sequence can move through successive updates.
Shrinkage matters because the training signals themselves can be easy for a sufficiently expressive tree to fit. The authors give the example of quadratic loss. If a stage fits the required corrections perfectly and applies them in full, the following stage can have zero pseudo-residuals, ending the process early. Restricting tree depth or requiring enough samples before splitting places a limit on what any one tree can express. Fitting on a randomly sampled portion of the training rows, without replacement, provides another form of regularization. It varies the information available to successive trees. Together, these controls give the trainer several ways of distributing the work of fitting across the ensemble.
What XGBoost adds to the objective
The XGBoost objective counts both prediction loss and a charge for tree complexity. The paper gives it in this form.
Lₓgb = ∑ᵢ₌₁ᴺ L(yᵢ, F(xᵢ)) + ∑ₘ₌₁ᴹ Ω(hₘ)
Lₓgb names the full XGBoost training objective. In the first sum, L is the prediction loss applied to observed output yᵢ and ensemble prediction F(xᵢ) for input xᵢ. The index i runs from 1 through the number of training examples N. In the second sum, hₘ is the tree at index m, Ω is its complexity penalty, and m runs from 1 through the number of trees M. Both sums contribute to what the training procedure seeks to reduce.
The penalty for an individual tree is written as follows.
Ω(h) = γT + ½λ‖w‖²
Ω(h) is the penalty for tree h. T counts its leaves, and γ sets the charge attached to each leaf. The vector w contains the output scores assigned to the leaves. The squared norm ‖w‖² measures their squared magnitude, λ scales that part of the penalty, and ½ is the factor applied to it. A larger γ makes added leaves more expensive under the objective. The paper’s XGBoost search varies gamma, the software setting for γ. Its grids do not vary λ.
This penalty can be incorporated into the calculation that decides whether to split a node. A split gives the tree more freedom to improve predictions by assigning distinct outputs to the resulting groups. It also adds complexity. With a higher value of gamma, the loss reduction required to justify that change is larger. This gives XGBoost a way to stop branches that offer little improvement while still allowing other branches to grow. The maximum depth is a separate restriction. It sets an upper bound for every branch even when a deeper split would pass the gain criterion.
XGBoost also uses shrinkage and can sample training rows and feature columns. The paper describes column sampling at tree and node levels as part of the implementation and varies the setting named colsample_bylevel in the experiments. Row sampling controls the share of training examples available for building a tree. Feature sampling controls which columns are available for split finding. Either can alter the tree that is learned, and reducing the number of candidates can reduce the work involved in a fit.
How XGBoost reduces split-finding work
To find a split on a feature, a tree builder needs to consider values that can separate the examples reaching a node and assess the improvement associated with the candidate divisions. The paper describes a straightforward procedure based on scanning sorted feature values. If the values have to be sorted again at each node, the growing tree repeatedly pays for that ordering. XGBoost stores compressed feature columns in sorted form so that the initial organization can be reused. The column layout also allows split calculations for separate features to proceed in parallel. GPU & parallel computing
The paper describes a further option based on percentiles. It evaluates a subset of candidate split points and uses aggregated statistics to estimate their gains. Restricting the candidates changes the amount of work split finding requires. The paper relates this general idea to node-level data sub-sampling in CART. It also describes a sparsity-aware procedure that leaves missing entries out of the computation of candidate gains. The authors chose to fill missing values in the comparative experiment so that the methods could work from a common form of the data. The sparsity-aware handling is a capability of XGBoost discussed in the method, instead of a source of its measured advantage in this benchmark.
These implementation choices explain why the time comparison considers the packages as well as the learning principles. The study uses the XGBoost package for XGBoost and scikit-learn for both random forest and conventional gradient boosting. The measured work includes the way each package constructs trees. Changing the configuration can also change how much computation that construction requires. For example, a tree that stops growing after few splits generally gives the trainer less work than one that admits many candidate splits through a greater depth.
From parameter grids to held-out predictions
For each dataset, the authors separate the data into training and test partitions using stratified 10-fold cross-validation. Stratification aims to preserve the class distribution when the folds are formed. Each outer test fold supplies examples for evaluating a procedure trained on the corresponding training partition. Within that training partition, another stratified 10-fold cross-validation compares hyper-parameter configurations. Hyper-parameters are the choices supplied to training, such as the learning rate or depth cap. The tree splits and leaf outputs are then learned under those choices.
A grid search considers the combinations specified by a list of values for each hyper-parameter. For random forest, the search covers the depth limit, the minimum sample counts for an internal split and a leaf, and the number of eligible features. For conventional gradient boosting, the search includes learning rate, depth, the minimum sample count for a split, the feature setting, and the row sub-sampling rate. The XGBoost grid varies learning rate, depth, gamma, feature sampling, and row sub-sampling. The advertised grid sizes are 256 configurations for random forest, 1920 for conventional gradient boosting, and 3840 for XGBoost.
The inner comparisons select a configuration for each method on the current training partition. The authors refit that configuration on the whole outer training partition and then score it on the outer test fold. They also fit an ensemble on that partition using each package’s default settings. This gives both configurations access to the same amount of data at the final fitting stage. The distinction is that the tuned configuration has been selected using the inner validation results, while the default has been set in advance.
Every ensemble in the experiment contains 200 decision trees. For random forest, the authors cite the argument that generalization error approaches a limit as the forest grows. For gradient boosting, adding trees can hurt generalization when the learning rate is high. The paper follows the approach of fixing a computationally feasible ensemble size and varying shrinkage. The resulting comparison is therefore about the specified tree count and the configurations available at that count. It also makes training time easier to interpret because fitting a different number of trees is outside the search.
There is an additional step for XGBoost. The authors train the available configurations on each full outer training partition and record their test performance. In combination with the inner validation results, this lets them examine what would have happened under alternative grids and compare the behavior of particular settings. These evaluations serve different purposes. Inner scores are used to choose a configuration within a candidate grid. The recorded outer scores show how that choice performs and support the paper’s later analysis of settings across datasets.
The study fills missing entries with the mean of the corresponding feature using scikit-learn’s imputation facility. The authors explain the decision as a way to compare methods under a common treatment of missing values, given the limitations of the scikit-learn tree implementations they used. This places the treatment of missing values outside the algorithm comparison. It also matters when interpreting the training protocol, because the procedure for estimating means can affect what information reaches a fitted classifier.
Experiments and results
The benchmark and the measures
The 28 UCI datasets differ in the number of examples, the number of features, the presence of missing values, and the number of classes. Echo has 74 examples, while Magic04 has 19,020. Iris has 4 attributes, and Sonar has 60. Banknote is a classification task with 2 classes, while Soybean has 18. Hepatitis is among the datasets marked as having missing values. These differences give the authors a basis for examining both small and relatively costly fits, as well as tasks extending beyond binary classification.
The reported accuracy is the percentage of test examples classified correctly. The main table gives a mean over the outer folds and a standard deviation, which describes how much the measured accuracy varies across folds. Those statistics answer different questions. The mean locates the center of the reported performance. The standard deviation shows how sensitive that performance was to the examples assigned to particular test folds. A small difference between reported means can accompany substantial fold-to-fold variation.
The baseline comparison includes the default and tuned versions of each algorithm. The defaults ask how the packages perform under a common experimental setup with their listed parameter choices. The tuned versions ask what happens when each method can choose among its grid configurations using inner cross-validation. Because the grids differ, the comparison is between the policies the authors evaluated for each method. In particular, each tuned result includes the effects of the grid and the way the validation data distinguished among its candidates.
The paper summarizes the results in two ways across datasets. It counts how frequently each setting obtains the highest reported mean accuracy, including cases in which more than one setting reaches the same value. It also ranks the settings separately on each task and averages their ranks. A win count rewards reaching the top. A rank average also reflects how near the top a setting stays on tasks it fails to win. Neither gives extra influence to a dataset merely because it has more examples, and neither describes the magnitude of a difference in accuracy.
Accuracy, dataset by dataset
Tuned conventional gradient boosting led the win count with the highest mean test accuracy on 10 of the 28 datasets. Tuned XGBoost led on 8, and default conventional gradient boosting led on 5. Tuned and default random forest each led on 4. Default XGBoost led on 3. The counts can overlap because reported means can tie. For example, the Tic-tac-toe mean was 100.00% for both tuned boosting methods. The authors’ separate rank comparison puts tuned XGBoost first, followed by default gradient boosting and default random forest.
The authors use the Nemenyi test to assess differences between average ranks. They report a critical distance of 1.42 for the comparison of 6 settings on 28 datasets at a p-value threshold below 0.05. The critical distance is the gap that average ranks would have to exceed for the test to declare a difference significant under this comparison. The test found no statistically significant differences among the settings. The leading rank and the leading win count therefore describe the ordering observed on the benchmark. The cross-dataset test gives less support to a claim that one choice consistently outperforms the others.
The dataset results show why both aggregate descriptions are useful. On Hepatitis, the tuned configurations of the two boosting methods achieve higher means than their respective defaults, while the tuned forest mean falls below the default forest mean. The spread across methods is visible within one task, and the effects of tuning go in different directions.
Default and tuned classifiers on Hepatitis by mean test accuracy
Tuned XGBoost has the highest mean, and tuning improves both boosted methods on this dataset.
The numbers
| System or setting | accuracy % |
|---|---|
| Default XGBoost | 59.21 |
| Tuned XGBoost (this paper) | 67.00 |
| Default random forest | 65.54 |
| Tuned random forest | 61.83 |
| Default gradient boosting | 56.58 |
| Tuned gradient boosting | 64.96 |
On Hepatitis the standard deviation of test accuracy was 6.56 for tuned XGBoost and 12.35 for default random forest. These are fold-level statistics accompanying their means. Their magnitude is relevant when interpreting how finely the means distinguish the methods. The paper’s stated significance result concerns ranks across the full benchmark, so the bars for a particular dataset are best read as reported point estimates.
On Phishing, tuned XGBoost reached 91.13% mean test accuracy and default XGBoost reached 89.65%. Default gradient boosting was at 90.62%, ahead of tuned gradient boosting at 90.25%. The same inner search procedure that found a useful XGBoost setting selected a conventional boosting setting whose mean was slightly below that package’s default. On Banknote the results for both boosting packages are near the upper end of the scale. Tuned gradient boosting reached 99.78%, default gradient boosting reached 99.71%, and both XGBoost settings reached 99.64% mean test accuracy. A win on a task with this pattern contributes to the count in the same way as a win with a wider separation.
Random forest showed the greatest stability under the switch from package defaults to grid selection. The authors report that the absolute difference in accuracy was below 0.5% on 18 of the 28 datasets. On Cleveland both forest settings obtained 82.46% mean test accuracy. On Magic04, the default forest obtained 88.19% and the tuned version 88.18%. Looking only at the tuned forest would obscure the central result for that method. The default already captured much of the performance available from this particular set of candidate settings.
Some of the clearest reversals for XGBoost occur on German, Parkinsons, and Vehicle. On German, the default gave 79.00% mean test accuracy, compared with 77.40% for tuned XGBoost. On Parkinsons the corresponding means were 92.14% and 90.14%, and on Vehicle they were 78.74% and 77.18%. The authors note that the default configuration on these datasets was among the best ≈ 5% of settings in training and test performance. They interpret the reversals in light of noisy data and a strong starting setting. When many candidates are tried, the best inner validation score can belong to a configuration that benefited from the particular examples in those folds. The outer results show whether the selected advantage transfers.
Fitting time and the expense of selection
The paper reports time in seconds and makes a distinction for tuned procedures. The first component measures the within-training grid search. The second measures the refit with the selected configuration. A default procedure has only a fitting time because no inner search was used to choose its settings. The final row of the timing table reports average ratios relative to the time for fitting default XGBoost, with XGBoost’s own default as the reference at 1.0.
For fitting under package defaults, the average ratio was 3.6 for random forest and 2.4 for conventional gradient boosting. After selection, the fitting ratios were 0.8 for XGBoost, 3.5 for random forest, and 4.3 for conventional gradient boosting, still using default XGBoost as the reference. These are averages of relative times in the paper’s reporting scheme. They do not imply a constant ordering on each task, and the tuned fitting ratios exclude the cost that was incurred to find the settings.
Segment illustrates an exception to the average XGBoost advantage. The fastest fit on this dataset was the default random forest. The chart includes the refit time for tuned settings, keeping all bars on the same measure of a fit on an outer training partition.
Final ensemble fitting time on Segment
Random forest fits fastest under both selection policies, and the default forest has the shortest fit overall.
The numbers
| System or setting | seconds |
|---|---|
| Default XGBoost | 3.22 |
| Tuned XGBoost refit | 2.21 |
| Default random forest (this paper) | 0.77 |
| Tuned random forest refit | 0.79 |
| Default gradient boosting | 2.25 |
| Tuned gradient boosting refit | 2.71 |
Soybean shows a similar pattern with the defaults. The forest fit took 0.31 seconds, while conventional gradient boosting took 3.14 seconds and XGBoost took 3.73 seconds. The paper identifies these as cases where the two boosting implementations became slower relative to the forest on multiclass tasks. The observation is about those tasks. Establishing how much of the slowdown comes from the number of classes would require holding other features of the comparison more closely fixed.
The grid-search times are of a different scale. On Magic04, the search took 123,764 seconds for XGBoost, 11,860 seconds for random forest, and 160,831 seconds for conventional gradient boosting under the paper’s sequential accounting. For the final fits after the search, the reported times were 7.86 seconds for XGBoost, 9.44 seconds for random forest, and 48.07 seconds for conventional gradient boosting. The final XGBoost fit was fastest among these tuned settings, while the forest search was cheapest. This illustrates why a timing result can change depending on whether the question concerns a known configuration or the entire selection procedure.
The experiments ran on an Intel Core i7-4790K processor reported at 4.00GHz. The authors executed the grid search in parallel and report sequential time as their measure of computational effort. They note that random forest and XGBoost use internal multithreading in the compared implementations. Within a forest it can be used to train individual trees, and within XGBoost it can be used in calculating splits. Independent grid fits give another opportunity for parallel execution. The timing tables are therefore best interpreted as an account of work under the paper’s convention. The elapsed time a user would experience also depends on how that work is scheduled.
The larger XGBoost grid was, on average, less costly than the conventional boosting grid under this timing measure. Its reported average grid-search ratio relative to fitting default XGBoost was 29043.7, compared with 69238.2 for conventional gradient boosting. The forest’s grid-search ratio was 8953.4. The authors emphasize that the different candidate counts prevent a direct algorithmic comparison using these search totals alone. The totals answer how expensive the evaluated search procedures were, with their actual grids. The isolated final-fit times address the cost of producing another ensemble once the settings have already been chosen.
What the ablations show
Changing a setting while holding the others fixed
The paper offers controlled comparisons within XGBoost at two levels. It compares configurations that differ in a single hyper-parameter and then repeats the selection analysis under restricted grids. The first comparison asks how often a particular change improves the ranking of a configuration across datasets. The second asks what happens when the learner has fewer choices available during validation. A setting can look favorable when compared with alternatives directly and still be dispensable as a dimension of a search if a fixed value performs consistently well.
For the first analysis, the authors use the held-out results for all 3840 XGBoost configurations. Each configuration receives an average rank across datasets. To examine two values of a particular parameter, the authors match configurations whose remaining settings are identical. They count how frequently changing the parameter value produces a better average rank. The denominator concerns the matched settings of the other parameters. A percentage in these comparisons is therefore a frequency of rank improvement across combinations, instead of a percentage of correctly classified examples or a frequency of winning on individual datasets.
The comparison for learning rate favors intermediate values overall. For instance, the table reports that changing from 0.3 to 0.1 improves the average rank in 95.2% of the matched comparisons. The authors identify 0.05 and 0.1 as generally favorable values. These results are tied to the decision to fit 200 trees. A learning rate controls the contribution of each tree, and the experiment measures how much correction can accumulate within that fixed sequence. The observed ordering addresses that setup directly.
The comparisons for gamma favor moderate penalties over the strongest ones tested. Changing gamma from 0.0 to 0.2 improves the average rank in 60.0% of the matched configurations, according to the table. Changing from 2.0 to 0.2 does so in 96.7%. Taken together, those comparisons explain why the authors looked for a value between leaving the split gain threshold at its original setting and requiring a large gain. A modest penalty can prevent some splits that make small improvements to the training objective. The reported rank comparisons show the net performance associated with the change under the tested configurations.
The depth comparison is initially surprising in a method whose conventional presentation emphasizes shallow trees. A change in maximum depth from 3 to 5 improves the average rank in 71.9% of the matched comparisons. A change from 10 to 100 improves it in 53.0%. The values are depth ceilings. Raising the ceiling creates the option to continue splitting, and the split criterion can still stop growth earlier. In particular, gamma can make a marginal split unattractive even with a high ceiling. The result describes a preference for greater freedom to grow under these grid settings. The analysis ranks the configurations by predictive performance and does not measure how deep the fitted trees typically became.
For feature sampling, the authors find similar performance for the settings 0.25, sqrt, and log2. These options let only some of the features enter the split search. In the comparison that starts at the all-features setting printed as 1.0, moving to sqrt improves average rank in 72.3% of the matched cases. The nearby results for the other sampled feature choices suggest that applying feature sampling matters more in this benchmark than distinguishing among these particular ways of setting the number of candidates.
The row sub-sampling analysis identifies 0.75 as the authors’ preferred choice. Starting at 1.0 and changing to 0.75 improves average rank in 75.4% of the table’s matched comparisons. This setting samples training rows without replacement for a tree. The direction of the finding supports using a substantial share of the training data while introducing some variation in which examples are used. The test does not identify a mechanism for each individual dataset. It shows that the sampled setting gives a better ordering across this benchmark more frequently under the other combinations explored.
A frequency of improvement also leaves the size of the change open. A small improvement that recurs across many configurations can yield a high frequency. A lower frequency can include some large gains. The paper complements these comparisons with actual test accuracies for configurations motivated by the rank patterns. That makes it possible to see both how often a setting helped and what performance looked like when the authors committed to it.
A fixed configuration motivated by the comparisons
The authors combine the patterns into a proposed fixed XGBoost configuration. It uses a learning rate of 0.05, gamma of 0.2, maximum depth of 100, the feature setting sqrt, and row sub-sampling of 0.75. The high depth cap allows branches to grow when the gain criterion justifies it. The gain threshold, shrinkage, and sampling still constrain how the ensemble is fitted. The original configuration in the paper uses a learning rate of 0.1, depth 3, and gamma of 0, with the full row and feature settings listed in the defaults.
The proposed fixed configuration has better mean test accuracy than the original default on 17 of the 28 datasets. On Echo it obtains 98.75%, compared with 94.46% for the original. On Sonar it obtains 87.52%, compared with 85.59%. On Tic-tac-toe it reaches 99.58%, compared with 96.56%. These examples illustrate how a common set of changes can make a fixed procedure more competitive on some of the tasks where the original defaults left room for improvement.
Other datasets favor the original setting. On German the proposed configuration yields 75.90% mean test accuracy, while the original yields 79.00%. On Vehicle it yields 76.95%, while the original gives 78.74%. The authors also flag Parkinsons as a task favoring the existing default. The proposal thus changes the balance of performance across the benchmark. Its gains concern the frequencies and accuracies observed on these tasks, with the authors’ further comparisons asking how to retain the freedom to adapt when a fixed configuration fits a task poorly.
The fixed proposal changes several choices together. Its improvement relative to the package defaults measures the effect of using the combined configuration. The matched comparisons are the parts of the paper that examine each choice with the others held fixed. Their patterns motivate the combination, while the test results of the combined configuration show how those choices perform together.
Searching fewer settings
The first restricted grid sets gamma to 0.0 and allows the other settings in the full grid to vary. This comparison addresses the value of including a split gain threshold among the choices available to the inner search. The same XGBoost implementation is used throughout, and depth and shrinkage can still affect the complexity of the trees. The comparison isolates the decision to vary gamma within the selection procedure, with the other parameters still free to respond to that restriction during selection.
The second restricted grid fixes row sub-sampling at 0.75 and feature sampling at sqrt. It continues to tune the learning rate, gamma, and maximum depth. This comparison concerns the need to search the randomization settings. Sampling remains part of the training procedure. Fixing its levels reduces the number of candidate combinations that the inner validation folds have to distinguish.
Among these tuned XGBoost alternatives, the search with fixed randomization settings produced the best mean test result on 11 datasets. The full grid did so on 9, and the grid with gamma fixed at its original setting on 8. The average ranks ordered the three searches in the same way. The paper reports a critical distance of 1.15 for its wider comparison of XGBoost configurations, which also includes the fixed configurations. The authors describe the edge from tuning the gain threshold as small and statistically inconclusive. The relative position of the fixed-randomization search is evidence that reducing the search space can retain competitive accuracy in this benchmark.
Individual results show how the remaining choices matter. On Liver, the fixed-randomization grid reached 69.97% mean test accuracy, the grid with gamma fixed reached 69.31%, and the full grid reached 68.11%. On Segment, the full grid reached 98.70% and both restricted grids reached 98.66%. On Soybean, the grid with gamma fixed reached 95.53%, ahead of the full grid at 95.22% and the fixed-randomization grid at 94.65%. The aggregate ordering allows for all of these patterns because each grid selects its own surviving configuration on each training partition.
The time table supports the computational case for reducing the search. On Australian, the full XGBoost grid took 2775 seconds, with a subsequent refit of 0.08 seconds. The grid with fixed randomization took 340 seconds, with a refit of 0.11 seconds. Both search times use the paper’s sequential convention. The saving occurs during candidate evaluation even though the selected ensemble from the smaller search takes somewhat longer to fit. The conclusion reports a 16-fold reduction in grid size when the randomization settings are fixed.
The timing discussion and timing table give different impressions of which restricted grid saves the most time. In the table’s average grid-search ratios, normalized by the time for fitting default XGBoost, the fixed-randomization search is at 3472.0 and the search with gamma fixed is at 1782.3, against 29043.7 for the full search. The prose assigns a speedup of over 16 times to fixing randomization, while the conclusion associates the factor 16 with the reduction in candidate count. The tabulated timings establish that both restricted searches use less computation than the full grid. Their accuracy results are what favor the search with fixed randomization in the authors’ comparison.
Limitations
Limits the authors identify
The paper distinguishes the expense of fitting an ensemble from the expense of choosing its configuration. The latter depends on the candidate grid. Because the three algorithms are assigned grids of different sizes, the authors caution against treating total search time as a direct comparison of their intrinsic training speeds. A larger grid requires more fits, and some configurations within it can cost more than others. The per-fit timings and complete search timings are each meaningful for the particular question they measure.
The authors also acknowledge that cross-validation inside the training partition can select a configuration that generalizes poorly, especially on noisy tasks. Their explanation for the reversals on German, Parkinsons, and Vehicle is that the original settings were already strong and repeated attempts at selection offered opportunities to favor incidental features of the training data. The outer test folds are what reveal those reversals. The procedure protects the main selection comparison through held-out evaluation while leaving the selection itself subject to variation.
Their treatment of missing data is a further stated restriction. XGBoost’s own missing-value handling was set aside in favor of mean imputation across algorithms. The purpose was to make the input treatment comparable to that available for the scikit-learn baselines. Consequently, the accuracy and timing comparisons apply to that common treatment. They leave open how the methods would compare when the original missing entries are retained and XGBoost uses its dedicated procedure.
The authors also temper the performance ordering with the statistical result. Their benchmark gives tuned gradient boosting the most wins and tuned XGBoost the highest average rank, yet the Nemenyi comparison finds no significant average-rank differences in the main experiment. Their assessment of the gain from tuning gamma is similarly cautious. They report a favorable tendency under the settings studied, with the statistical evidence insufficient to separate the approaches by rank. These limits are especially relevant for readers who want to carry the observed ordering to other classification tasks.
Limits implied by the setup
The proposed fixed XGBoost configuration was designed by inspecting the performance of configurations across these same benchmark datasets. Its comparison with the original default therefore measures how a choice informed by this collection performs on that collection. A separate collection would be needed to estimate how reliably the proposal transfers to new tasks. This qualification is distinct from the outer-fold protocol used to evaluate settings chosen by inner cross-validation. The two procedures draw their choices from different bodies of evidence.
The fixed tree count also conditions the findings. Shrinkage controls the size of each update, while the number of rounds controls how often an update can be made. With 200 trees, a learning rate that works well is one that makes progress at an appropriate pace within that budget. The best values from the paper’s grid describe that joint setup. Experiments allowing the number of trees to vary, or measuring how accuracy evolves over a sequence of tree counts, would address a different question.
The paper says that missing values are imputed by the mean of the whole attribute. It leaves unclear whether the mean is recomputed within the training portion of each split, including the inner splits used for selection. That distinction affects the independence of the test data. If a mean is estimated using held-out rows, information about their feature distribution contributes to preprocessing. The paper establishes a common imputation rule for the compared algorithms, while the placement of the estimation step within cross-validation remains unspecified.
Accuracy also defines the scope of the predictive results. It gives each example equal weight within an evaluation fold. The reported means and standard deviations tell readers how often the predicted class was correct under that measure and how variable the observed scores were. They leave per-class behavior and the quality of probability estimates unresolved. Average ranks add a cross-dataset view, at the cost of setting aside the size of the accuracy difference on any given task. A task with tightly clustered results can have as much influence on the rank ordering as a task where the accuracy values are more widely separated.
The timing comparisons depend on the specific packages, the processor, the search space, and the authors’ sequential accounting. They characterize the resources used by the tested procedures. The accounting leaves actual parallel completion times dependent on factors beyond the reported ratios. The study measures training and selection time, so it also leaves the cost of serving predictions and the memory use of the resulting ensembles outside the measured comparison.
Finally, the benchmark is a study of random forest, conventional gradient boosting, and XGBoost on the stated classification datasets. The earlier applications motivate the question, while the experiments supply evidence about this particular set of tasks. The comparison can support claims about the behavior of these implementations under the tested defaults, grids, and evaluation scheme. Broader claims about which ensemble family will perform best, or which settings always warrant a search, would require evidence across additional procedures and datasets.
What came after
Reading Dynamics and Comprehension in Cognitive Aging: A Multimodal Language Resource (2026) cites the comparison in work on a multimodal resource concerning reading, comprehension, and cognitive aging. The citation establishes a connection to that later application area. The role of the comparison in the resource’s design and evaluation remains unspecified, including whether the authors drew on its classifier benchmark, its analysis of XGBoost settings, or its treatment of training cost.
Cite
Cite as Candice Bentéjac, Anna Csörgő and Gonzalo Martínez-Muñoz. 2020. A comparative analysis of gradient boosting algorithms. Artificial Intelligence Review.
@article{bentejac2020comparative,
title = {{A comparative analysis of gradient boosting algorithms}},
author = {Candice Bentéjac, Anna Csörgő and Gonzalo Martínez-Muñoz},
journal = {Artificial Intelligence Review},
year = {2020},
doi = {10.1007/s10462-020-09896-5},
eprint = {1911.01914},
archivePrefix = {arXiv},
url = {https://doi.org/10.1007/s10462-020-09896-5}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bentejac-2020-comparative-analysis-gradient-boosting-algorithms/