XGBoost vs LightGBM vs CatBoost · Gradient Boosting Libraries Compared
Three gradient boosting libraries dominate modern machine learning competitions and production systems. While all three implement gradient boosted trees, their design choices — particularly around tree growth, categorical handling, and optimization — lead to materially different performance characteristics.
Tree Growth Strategy
This is the most significant architectural difference.
XGBoost: Level-wise (depth-wise) growth. Trees are grown layer by layer — all nodes at depth $d$ are split before any node at depth $d+1$. This produces balanced trees but can waste computation on splits that provide negligible gain.
LightGBM: Leaf-wise growth. The leaf with the highest loss reduction is split first, regardless of depth. This converges faster and produces asymmetric trees, but risks overfitting on small datasets. LightGBM limits tree depth with max_depth and num_leaves parameters.
CatBoost: Symmetric trees (oblivious trees). All nodes at the same depth use the same split condition. This enables extremely fast inference (the tree simplifies to a lookup table indexed by feature values) at the cost of slightly lower accuracy.
Winner: LightGBM for speed and accuracy on large datasets. XGBoost for robustness (balanced trees are less prone to overfitting). CatBoost for fastest inference.
Categorical Feature Handling
XGBoost: Requires manual encoding (one-hot, label encoding). Native categorical support added in v1.3 (enable_categorical=True) but one-hot encoding remains common. This is XGBoost’s weakest point.
LightGBM: Native categorical support via categorical_feature parameter. Internally uses a histogram-based algorithm that finds optimal splits on categorical features without one-hot encoding. Significantly faster and more memory-efficient than one-hot encoding for high-cardinality categoricals.
CatBoost: Superior categorical handling with ordered target encoding — a schema that avoids target leakage by using only preceding observations in a random permutation to encode categorical features. This is CatBoost’s standout feature and the reason it often outperforms on datasets with many categorical variables.
Winner: CatBoost for datasets with many high-cardinality categorical features. LightGBM for mixed datasets (some categoricals, mostly numerical).
Speed

On benchmark datasets (Higgs 10M, airline 115M):
| Library | Training Time (relative) | Memory |
|---|---|---|
| LightGBM | 1× (fastest) | Lowest |
| XGBoost | 1.5–3× | Moderate |
| CatBoost | 2–5× | Highest |
LightGBM’s GOSS (Gradient-based One-Side Sampling) and EFB (Exclusive Feature Bundling) techniques provide substantial speedups on large datasets.
Default Parameters and “Works Out of the Box”
CatBoost requires the least tuning — its default parameters are well-chosen, and its ordered boosting provides built-in regularization against overfitting. XGBoost and LightGBM benefit more from hyperparameter tuning.
When to Use Which

XGBoost: When you need a proven, robust algorithm with excellent regularization. First choice for most tabular data tasks where categorical features are minimal. Best documentation and community support.
LightGBM: When training speed is critical or datasets exceed 100K rows. Best for Kaggle competitions with tight compute budgets. Leaf-wise growth provides fast convergence.
CatBoost: When the dataset has many categorical features (>10) with high cardinality, or when you need the best possible performance without extensive tuning. Also: when asymmetric treatment is needed (e.g., modeling treatment effects).
All three: For model ensembling. The diversity of their tree growth strategies means that averaging predictions from all three often outperforms any single model — a common pattern in winning competition solutions.