Machine Learning

How do I choose between XGBoost and LightGBM for large tabular datasets?

DE Asked by Derek Malone · 12-10-2025
0 upvotes 15,792 views 0 comments
The question

I am working on a competition dataset with over 5 million rows and 100 features. I’ve traditionally used XGBoost, but I am hearing that LightGBM is significantly faster for large-scale data. What are the primary trade-offs in terms of memory usage, training speed, and predictive accuracy between these two GBDT frameworks?

3 answers

0
SY
Answered on 15-10-2025

LightGBM is almost always faster for datasets of that size because of its "Leaf-wise" growth strategy and Gradient-based One-Side Sampling (GOSS). While XGBoost grows trees level by level, LightGBM grows them leaf by leaf, which reduces loss much more quickly. More importantly, LightGBM uses "Exclusive Feature Bundling" to reduce the number of features, making it incredibly memory efficient. In my experience, XGBoost 2.0 has closed the speed gap significantly, but LightGBM still holds the edge when you are constrained by RAM or need very fast iteration cycles during hyperparameter tuning.

0
FR
Answered on 17-10-2025

Since you have 5 million rows, are you using a GPU-accelerated version of these libraries, or are you strictly sticking to CPU-based training?

DE 19-10-2025

I’m currently on a CPU-only server with 64GB of RAM. Franklin, do you think the histogram-based algorithm in LightGBM will still outperform XGBoost in this environment, or is the GPU support the main reason people make the switch? I've noticed XGBoost can be quite a memory hog when it builds the initial histograms for such a high row count.

0
BR
Answered on 20-10-2025

Don't forget that LightGBM is highly sensitive to overfitting on smaller datasets. With 5 million rows you are safe, but always tune the 'num_leaves' carefully.

SY 22-10-2025

Bridgette is right. In LightGBM, 'num_leaves' should be smaller than 2^(max_depth) to prevent the trees from growing too deep and complex.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session