AN EXPLAINABLE TWO-STAGE MULTI-DOMAIN MACHINE LEARNING FRAMEWORK FOR PERSONALIZED TYPE 2 DIABETES RISK ASSESSMENT WITH FORWARD TEMPORAL VALIDATION USING NHANES
DOI:
https://doi.org/10.4238/b0msmx37Keywords:
Type 2 diabetes mellitus; machine learning; XGBoost; explainable artificial intelligence; SHAP; risk assessment; temporal validation; NHANES; clinical decision support; calibrationAbstract
Background: Type 2 diabetes mellitus (T2DM) is a heterogeneous metabolic disorder shaped by demographic, anthropometric, hemodynamic, socioeconomic, and lifestyle-related factors. Machine learning methods can integrate these heterogeneous predictors to support individualized risk assessment; however, published prediction studies frequently emphasize discrimination while providing limited evidence on calibration, clinical utility, explainability, and temporal transportability. Objective: To develop and evaluate an explainable two-stage multi-domain machine learning framework for personalized T2DM risk assessment, quantifying discrimination, calibration, clinical utility, explainability, subgroup performance, and forward temporal transportability across independent NHANES cycles. Methods: NHANES 2015–2016 was used for model development and NHANES 2017–2018 for forward temporal validation. Adults with an available diabetes-status outcome (NHANES variable DIQ010) and relevant predictor information were included. The Stage-1 model used demographic, anthropometric, blood-pressure, socioeconomic, physical-activity, smoking, and alcohol-related variables while excluding HbA1c and fasting glucose. Feature engineering incorporated clinically motivated anthropometric and hemodynamic interaction terms. An XGBoost classifier was optimized using stratified cross-validation and randomized hyperparameter search, benchmarked against class-weighted XGBoost, LightGBM , CatBoost , and a soft-voting ensemble. The operating threshold was selected from out-of-fold development predictions and then fixed for temporal validation. Performance was evaluated with ROC-AUC, PR-AUC, sensitivity, specificity, F1 score, Brier score, calibration intercept/slope, bootstrap 95% confidence intervals (2,000 resamples), and decision curve analysis . SHAP values were used for interpretation. A secondary, exploratory Stage-2 model added HbA1c and fasting glucose for clinical refinement. Results: The development cohort comprised 5,856 participants, including 845 with T2DM (14.43%); the temporal validation cohort comprised 5,678 participants from NHANES 2017–2018 (878 events, 15.46%). The Stage-1 model achieved ROC-AUC 0.8083 (95% CI 0.7947–0.8212) and PR-AUC 0.4119 (95% CI 0.3805 0.4453) in forward temporal validation. At the development-derived threshold of 0.2195, sensitivity was 64.46% (95% CI 61.26–67.48%), specificity was 78.33% (95% CI 77.13–79.45%), and F1 was 0.4557 (95% CI 0.4311 0.4795). Brier score was 0.1088; the temporal calibration intercept and slope were 0.1783 and 1.1103, respectively, consistent with modest systematic underestimation of absolute risk alongside a well-preserved risk gradient. Decision curve analysis showed net benefit over treat-all and treat-none strategies across threshold probabilities from approximately 0.010 to 0.705. SHAP analysis ranked age, age×BMI, age×waist circumference, waist circumference, race/ethnicity, and BMI-to-waist ratio among the leading contributors. In a separate, secondary internal analysis using an 80/20 split of NHANES 2017–2018 alone, adding HbA1c and fasting glucose to the same predictor set (Stage 2) increased ROC-AUC to 0.9186 and PR-AUC to 0.7218; because this analysis used a different cohort/split than the forward-temporal-validation result, it is presented as an exploratory clinical-refinement analysis rather than a direct head-to-head comparison with the Stage-1 temporal-validation estimate. Conclusions: An explainable multi-domain XGBoost framework maintained stable discrimination across NHANES survey cycles while integrating calibration, threshold optimization, decision-curve analysis, subgroup assessment, and explainable machine learning. These results support the potential utility of multi-domain XGBoost for non-glycemic T2DM status/risk assessment and suggest that glycemic biomarkers can subsequently refine risk estimates, pending confirmation under the same temporal-validation design. Because NHANES is cross-sectional, this study characterizes diabetes-status classification and temporal transportability rather than prospective prediction of incident T2DM.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

