LightGBM (Light Gradient Boosting Machine) is a gradient boosting framework developed by Microsoft, introduced at NeurIPS 2017, and built for high-speed, memory-efficient training on large tabular datasets. It addresses the core bottleneck of traditional GBDT β the expensive exact-split search β through histogram-based learning, leaf-wise tree growth, Gradient-based One-Side Sampling (GOSS), and Exclusive Feature Bundling (EFB). The result is training speeds up to 20Γ faster than XGBoost with comparable accuracy. The critical mental model: unlike XGBoost's depth-wise growth, LightGBM grows the single leaf with the maximum loss reduction at each step β which converges faster but requires careful tuning of num_leaves and min_data_in_leaf to prevent extreme one-sided trees that overfit small datasets.
What This Cheat Sheet Covers
This topic spans 16 focused tables and 95 indexed concepts, 89 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Core Architecture β Histogram-Based Learning and Leaf-Wise Growth
LightGBM's speed advantage comes from two structural innovations that reshape how trees are built. Understanding these mechanisms makes every subsequent parameter decision more intuitive.
| Technique | Example | Description | |
|---|---|---|---|
max_bin=255 # default bin count | Continuous features are discretized into integer bins (default 255), reducing split search from O(#data) to O(#bins) β the primary source of LightGBM's speed advantage. | ||
# grows the single leaf with max delta loss | β’ Expands the leaf that reduces loss the most at each step, rather than all leaves at a given depth β’ converges faster but can overfit without proper num_leaves and min_data_in_leaf guards | ||
boosting='gbdt' # GOSS is default in gbdt | β’ Keeps all large-gradient instances (more informative) and randomly samples small-gradient ones, rescaling sampled weights β’ maintains accuracy while training on a fraction of data | ||
automatic; no param to set | β’ Bundles mutually exclusive sparse features (rarely non-zero simultaneously) into single features using a greedy graph-coloring algorithm β’ reduces effective feature count near-losslessly | ||
# sibling node hist = parent - current leaf | Computes sibling node histograms by subtracting child histogram from parent, halving the work for building each tree split β only one of two siblings needs a full histogram pass. | ||
params = {'max_bin': 255} # GPU: max_bin=63 recommended | β’ Controls histogram resolution β’ higher = more accurate splits but slower training β’ reduce to 63β127 for GPU training or very large datasets without significant accuracy loss |