# Imbalance-XGBoost: Leveraging Weighted and Focal Losses for Binary Label-Imbalanced Classification with XGBoost

arXiv: https://arxiv.org/abs/1908.01672 · HTML: https://mlsanity.com/paper/1908.01672/

## Key facts

- Cited by 15 papers in the map (data through 7 Oct 2026).
- First posted on arXiv 5 Aug 2019.

## Built on by (most cited first, 15 of 15)

- [ACE: Ally Complementary Experts for Solving Long-Tailed Recognition in One-Shot](https://mlsanity.com/paper/2108.02385/) (2021)
- [GADBench: Revisiting and Benchmarking Supervised Graph Anomaly Detection](https://mlsanity.com/paper/2306.12251/) (2023)
- [A review of ensemble learning and data augmentation models for class imbalanced problems: combination, implementation and evaluation](https://mlsanity.com/paper/2304.02858/) (2023)
- [A Dependable Hybrid Machine Learning Model for Network Intrusion Detection](https://mlsanity.com/paper/2212.04546/) (2022)
- [Under-bagging Nearest Neighbors for Imbalanced Classification](https://mlsanity.com/paper/2109.00531/) (2021)
- [Diagnosis of Parkinson's Disease Based on Voice Signals Using SHAP and Hard Voting Ensemble Method](https://mlsanity.com/paper/2210.01205/) (2022)
- [Tree Boosting Methods for Balanced andImbalanced Classification and their Robustness Over Time in Risk Assessment](https://mlsanity.com/paper/2504.18133/) (2025)
- [Few-shot 1/a Anomalies Feedback : Damage Vision Mining Opportunity and Embedding Feature Imbalance](https://mlsanity.com/paper/2307.12676/) (2023)
- [Skew-Probabilistic Neural Networks for Learning from Imbalanced Data](https://mlsanity.com/paper/2312.05878/) (2023)
- [An Explainable Machine Learning Framework for the Accurate Diagnosis of Ovarian Cancer](https://mlsanity.com/paper/2312.08381/) (2023)
- [Classification Modeling with RNN-Based, Random Forest, and XGBoost for Imbalanced Data: A Case of Early Crash Detection in ASEAN-5 Stock Markets](https://mlsanity.com/paper/2406.07888/) (2024)
- [Improving GBDT Performance on Imbalanced Datasets: An Empirical Study of Class-Balanced Loss Functions](https://mlsanity.com/paper/2407.14381/) (2024)
- [ML2Tuner: Efficient Code Tuning via Multi-Level Machine Learning Models](https://mlsanity.com/paper/2411.10764/) (2024)
- [Class-Imbalanced-Aware Adaptive Dataset Distillation for Scalable Pretrained Model on Credit Scoring](https://mlsanity.com/paper/2501.10677/) (2025)
- [Performance of Machine Learning Classifiers for Anomaly Detection in Cyber Security Applications](https://mlsanity.com/paper/2504.18771/) (2025)

## Abstract (arXiv)

The paper presents Imbalance-XGBoost, a Python package that combines the powerful XGBoost software with weighted and focal losses to tackle binary label-imbalanced classification tasks. Though a small-scale program in terms of size, the package is, to the best of the authors' knowledge, the first of its kind which provides an integrated implementation for the two losses on XGBoost and brings a general-purpose extension on XGBoost for label-imbalanced scenarios. In this paper, the design and usage of the package are described with exemplar code listings, and its convenience to be integrated into Python-driven Machine Learning projects is illustrated. Furthermore, as the first- and second-order derivatives of the loss functions are essential for the implementations, the algebraic derivation is discussed and it can be deemed as a separate algorithmic contribution. The performances of the algorithms implemented in the package are empirically evaluated on Parkinson's disease classification data set, and multiple state-of-the-art performances have been observed. Given the scalable nature of XGBoost, the package has great potentials to be applied to real-life binary classification tasks, which are usually of large-scale and label-imbalanced.
