Machine learning models trained on survey data from more than 400,000 women across eleven Sub-Saharan African countries can predict which pregnancies are likely to end preterm with striking accuracy, according to a new study published in Discover Artificial Intelligence. The work, led by Makda Fekadie Tewelgne and colleagues, pooled Demographic and Health Survey (DHS) datasets collected between 2019 and 2024 and applied four supervised learning algorithms to one of the region’s most consequential pregnancy outcomes. Preterm birth, defined as delivery before 37 weeks of gestation, affects roughly 15 million infants worldwide each year and accounts for about 11 percent of all live births, with Sub-Saharan Africa carrying the highest regional prevalence, often exceeding 10 percent of live births.
The analytic sample comprised 411,863 women aged 15 to 49 years, drawn from an initial pool of 433,330 observations after restricting to live births within five years preceding each survey and removing incomplete records. The eleven countries included Burkina Faso, Côte d’Ivoire, Ghana, Kenya, Lesotho, Madagascar, Mauritania, Mozambique, Rwanda, Senegal, and Tanzania. In the pooled dataset, 21,124 births, or 5.1 percent (95 percent confidence interval 5.04 to 5.17 percent), occurred preterm, while 390,739 births, or 94.9 percent, were delivered at term. That imbalance, with preterm cases forming a small minority, is precisely the kind of problem that trips up naive classifiers, which tend to default to the majority class and miss the rare outcome that matters most.
To handle this, the researchers applied the Synthetic Minority Over-Sampling Technique, or SMOTE, which generates synthetic examples of the minority class by interpolating between existing samples rather than duplicating them. Crucially, SMOTE was applied only within training folds during cross-validation, and the test set remained completely untouched until final evaluation. The dataset was split 80/20 into 329,490 training and 82,373 testing observations, with stratification preserving the class distribution in both subsets. Missing data were minimal, with no variable exceeding 7.1 percent missingness, and were handled by K-nearest neighbors imputation with k equal to 5, fitted exclusively on training data to prevent leakage. Outliers were screened using the Isolation Forest algorithm, and a sensitivity analysis comparing imputed data with a complete-case analysis showed consistent model performance and stable feature importance patterns.
Four algorithms competed: Random Forest, Decision Tree, Logistic Regression, and Extreme Gradient Boosting. Hyperparameters were tuned with RandomizedSearchCV combined with tenfold cross-validation, optimizing for ROC-AUC, and Recursive Feature Elimination was used to distill 31 candidate features down to the most predictive subset. The Random Forest model emerged as the clear winner, achieving an accuracy of 90.20 percent, a ROC-AUC of 96.92 percent, a precision-recall AUC of 97.50 percent, and a Brier score of 0.1685. The Decision Tree followed with an accuracy of 89.2 percent and a ROC-AUC of 92.19 percent, while XGBoost showed moderate performance and Logistic Regression was the weakest across all metrics, a pattern the authors attribute to its inability to capture the nonlinear relationships and interactions embedded in the data.
Calibration analysis added an important layer of scrutiny beyond raw discrimination. The calibration curve closely tracked the 45-degree reference line, indicating that predicted probabilities aligned well with observed outcomes, particularly in the moderate to high probability range between roughly 0.3 and 1.0. Below 0.2, the model showed slight underestimation of risk, though the authors describe the deviation as minimal. Confidence intervals for all performance metrics were estimated through bootstrap resampling with 1,000 iterations on the test dataset, and threshold-independent metrics were prioritized for model comparison given the class imbalance.
Perhaps the study’s most rigorous feature is its Leave-One-Country-Out validation, in which the model was iteratively trained on ten countries and tested on the eleventh, an entirely unseen national context. Performance held up but varied meaningfully. Accuracy ranged from 77.99 percent in Lesotho to 89.16 percent in Burkina Faso, and F1-scores spanned from 71.32 percent in Rwanda to 89.18 percent in Burkina Faso. ROC-AUC values ranged from approximately 0.71 to 0.91, with the highest discrimination in Côte d’Ivoire and all countries exceeding 0.70. Rwanda and Lesotho consistently showed weaker performance across both classification and discrimination metrics, which the authors link to differences in sample size distribution, healthcare system characteristics, survey implementation quality, reporting practices, and underlying epidemiology.
To open the black box, the team turned to SHAP, or SHapley Additive exPlanations, computed on the independent test set. The analysis identified low maternal educational attainment, unmarried marital status, lack of media exposure, lower household wealth index, and advanced maternal age of 35 years or older as key predictors associated with higher predicted probability of preterm birth. Additional contributors included substance use, rural residence, maternal employment, anemia, abnormal maternal body mass index, fewer than four antenatal care visits, and short birth interval. In one illustrative individual-level SHAP explanation, lack of media exposure added 0.16 to the predicted risk, lower literacy 0.12, short birth interval 0.10, and advanced maternal age and low maternal education 0.08 each, while the absence of anemia reduced the prediction by 0.10.
The authors are emphatic that these are predictive associations, not causal effects. SHAP values reflect model-dependent feature contributions that can be shaped by correlated predictors and the pooled multi-country data structure, and positive or negative attributions describe model behavior only. The cross-sectional survey design rules out causal inference, and the study’s stated primary objective is prediction rather than explanation of biological mechanisms. The researchers also note that sampling weights, stratification, and clustering were fully accounted for in descriptive analyses but not incorporated into model training, because standard machine learning algorithms do not natively support complex survey designs, meaning the models should not be read as producing nationally calibrated population estimates.
The outcome measure itself carries caveats. Gestational age was derived from the DHS variable b20, a self-reported duration of pregnancy recorded in completed months, with births at 5 to 8 months classified as preterm and 9 to 10 months as term. This month-based proxy approximates, but cannot exactly reproduce, the clinical threshold of 37 completed weeks, and a substantial proportion of births reported at exactly 9 months reflects digit preference that may blur the classification boundary. The authors state that this misclassification is likely random and may attenuate model performance, and they recommend future studies using clinically verified gestational age for validation.
The team also stresses that the model has not undergone external validation, prospective evaluation, clinical integration, or real-world calibration, and is therefore not suitable for direct clinical deployment or policy decision-making. Instead, they position the findings as exploratory predictive evidence that may guide future research and hypothesis generation, suggesting that future work incorporate multilevel and survey-weighted comparator models, explicit country-level modeling, and hierarchical or country-calibrated approaches to better handle the heterogeneity inherent in pooling eleven distinct national contexts. Within those limits, the study demonstrates that ensemble learning, careful leakage-safe pipelines, and explainable AI can extract coherent, transportable risk patterns from large-scale survey data in settings where clinical gestational age measurement is often unavailable.
Subject of Research: Explainable machine learning prediction of preterm birth and its associated factors using Demographic and Health Survey data from eleven Sub-Saharan African countries
Article Title: Explainable machine learning for predicting preterm birth and associated factors in Sub Saharan Africa
Article References: Tewelgne, M. F., Yehuala, T. Z., Aweke, M. N., Abuhay, H. W., Limenih, M. A., Tewoligne, S. F., Baykemagn, N. D., & Alemu, G. G. (2026). Explainable machine learning for predicting preterm birth and associated factors in Sub Saharan Africa. Discover Artificial Intelligence, 6(1), Article 1025. https://doi.org/10.1007/s44163-026-02092-4
Image Credits: AI Generated
DOI: 10.1007/s44163-026-02092-4
Keywords: preterm birth, machine learning, random forest, SHAP, Sub-Saharan Africa, Demographic and Health Surveys, SMOTE, cross-validation, antenatal care, maternal health, predictive modeling, neonatal mortality
News Source: Harold Sullivan. (October 29, 2026). Machine Learning Flags Preterm Birth Risk Across Eleven African Countries. Scienmag.



