A Comprehensive Machine Learning Framework for Customer Churn Prediction Using Optimized Tree-Based Ensembles and Explainable AI (XAI)

Authors

  • Hus Nul Mab Haider Faculty of Information Technology and Computer Science, University of Central Punjab, Lahore, Pakistan
  • Umer Farooq Faculty of Information Technology and Computer Science, University of Central Punjab, Lahore, Pakistan
  • Rabia Tehseen Faculty of Information Technology and Computer Science, University of Central Punjab, Lahore, Pakistan
  • Adbullah Nisar Faculty of Information Technology and Computer Science, University of Central Punjab, Lahore, Pakistan
  • Uzma Omer Department of Information Sciences, University of Education, Lahore, Pakistan

Keywords:

Customer Churn Prediction, Machine Learning, Gradient Boosting, XGBoost, Light GBM, Cat Boost, Explainable AI, SHAP, Predictive Analytics, Class Imbalance, SMOTE

Abstract

Customer churn is a major concern for subscription-based businesses since acquiring a new customer can cost several times more than retaining an existing one. High class imbalance ratios and high-dimensional, heterogeneous customer datasets constrain the scope of conventional predictive analytics. This study proposes an integrated machine learning framework which combines three tree-based ensemble techniques — Extreme Gradient Boosting (XGBoost), Light Gradient Boosting Machine (LightGBM) and CatBoost and Synthetic Minority Over-sampling Technique (SMOTE) applied exclusively on the training folds to address class imbalance. The framework is experimented on the IBM Telco Customer Churn dataset (7,043 instances: 1,869 churned [26.54%] and 5,174 retained [73.46%] customers), evaluated using 5-fold Stratified Cross-Validation. The study also integrates post-hoc explainable AI techniques to render model interpretation. The optimized XGBoost configuration achieved a cross-validated accuracy of 78.50% ± 1.08%, precision of 59.37% ± 1.83%, recall of 59.98% ± 3.47%, and ROC-AUC of 0.832 ± 0.012. While XGBoost outperformed the Logistic Regression and Decision Tree benchmarks in terms of accuracy (paired t-test on fold-level accuracy: p < 0.001), Logistic Regression achieved a higher ROC-AUC (0.844) compared to the tree-based models (0.832). No statistically significant difference in accuracy was found between the XGBoost and the other two ensembles (p > 0.05). The global SHAP analysis highlighted the influence of the contract duration, customer tenure and internet service types on customer attrition. The proposed framework can be utilized as a statistically validated and interpretable prototype in enterprise retention analytics.

Downloads

Published

2026-10-13

How to Cite

Haider, H. N. M., Farooq, U., Tehseen, R., Nisar, A., & Uzma Omer. (2026). A Comprehensive Machine Learning Framework for Customer Churn Prediction Using Optimized Tree-Based Ensembles and Explainable AI (XAI). Magna Carta: Contemporary Social Science, 5(5), 365–375. Retrieved from https://journal.50sea.com/index.php/MC/article/view/2049