LightGBM accelerates training on huge, high-dimensional data with three mechanisms. (1) Histogram-based splitting: each continuous feature is discretized into
k bins and splits are only searched on bin boundaries — split complexity drops from
O(n⋅d) (pre-sorting) to
O(k⋅d), memory from
O(n⋅d) to
O(k⋅d), and parent-child histograms are reused incrementally. (2) GOSS (Gradient-based One-Side Sampling): when computing split gain, sort samples by absolute gradient
∣gi∣ descending, keep all of the top
a×100% large-gradient samples, randomly sample
b×100% from the remaining
(1−a)×100% small-gradient samples, and amplify the weights of sampled small-gradient samples by
b1−a — the gain is estimated from weighted statistics, unbiased in expectation, while only
(a+b) of the data is used (e.g.
a=0.2,b=0.1 uses ~30%). Intuition: large
∣gi∣ means large pseudo-residuals, i.e. under-fitted samples carrying most of the learning signal; uniform random sampling would likely drop them. (3) EFB (Exclusive Feature Bundling): in sparse data many features (especially one-hot encoded) are mutually exclusive — they are rarely nonzero simultaneously; bundling them into one composite feature (via greedy graph coloring with a conflict threshold) reduces the feature count from
d to the number of bundles, cutting histogram construction from
O(data×d) to
O(data×bundles). LightGBM also grows trees leaf-wise: each split expands the leaf with the current largest gain (capped by max_depth) — it converges faster and reaches lower error than level-wise growth, but overfits more easily with little data; categorical features are natively supported (no one-hot needed).