An ethnic-sensitive hybrid framework for T2D prediction with explainable AI and weighted ensembles Authors: Karlo Abnoosian, Rahman Farnoosh, Hamidreza Noushkaran, Danial Javaheri, Hasnat Azeez Shimal, Abdullah Abdulamer Abdulkarem Published: 2025 ABSTRACT Type 2 diabetes (T2D) is a growing global health crisis, affecting over 537 million people as of 2021. Early prediction remains particularly challenging in low- and middle-income countries due to missing data, class imbalance, and population-specific risk factors. This study presents a four-stage predictive framework— Feature-Weighted Class-Adaptive Generative Imputation Network-Weighted Classifier Aggregation Ensemble (FW-CAGIN-WCAE)—designed to address these limitations. First, Zero-Threshold Feature Removal (ZTFR) is applied to eliminate low-quality variables. Second, missing values are imputed FW-CAGIN, a novel class-aware and feature-weighted GAN model that accounts for both class and feature importance. Third, a performance-weighted ensemble of 15 machine and deep learning algorithms is constructed. Finally, SHAP analysis is used to uncover population-specific risk indicators. The proposed method was evaluated on three benchmark datasets—PIDD, FHGDD, and BDD—and their combinations, using nested five-fold cross-validation. The model achieved a peak AUC of 0.936 ± 0.018 in PIDD-BDD combination and reduced the imputation mean absolute error (MAE) from 0.8028 to 0.0033. It also lowered AUC variability by 36.3% and improved the diagnostic odds ratio (DOR) to 68.4 ± 20.5. SHAP analysis identified as a key predictive feature across both Asian and European populations. These findings demonstrate that the proposed framework offers an accurate, interpretable, and population-sensitive solution for early T2D detection, especially in resource-limited healthcare settings.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-025-31234-4. Introduction Type 2 diabetes (T2D) represents a critical and escalating global health crisis, affecting approximately 537 million adults in 2021—a number projected to surge to 783 million by 20451,2. Characterized by chronic hyperglycemia and insulin resistance, T2D is a major contributor to cardiovascular disease, renal failure, neuropathy, blindness, and lower-limb amputations, accounting for 6.7 million deaths annually—equivalent to one death every five seconds1,3. The economic impact is profound. In 2021, global diabetes-related healthcare expenditure reached USD 966 billion, reflecting a 316% increase over the past 15 years1,2. Low- and middle-income countries (LMICs) shoulder 75% of the global diabetes mortality burden. Regionally, the Western Pacific reports the highest prevalence (206 million cases), while Africa reports the lowest (24 million), as illustrated in Fig. 1. Figure 2 further depicts the global distribution and consequences of diabetes.Fig. 1Geographical distribution of diabetes prevalence across global regions, highlighting the highest cases in the Western Pacific (206 million) and the lowest in Africa (24 million) based on the IDF Diabetes Atlas.Fig. 2Global diabetes prevalence and impact in 2021. Data from the IDF Diabetes Atlas. Geographical distribution of diabetes prevalence across global regions, highlighting the highest cases in the Western Pacific (206 million) and the lowest in Africa (24 million) based on the IDF Diabetes Atlas. Global diabetes prevalence and impact in 2021. Data from the IDF Diabetes Atlas. T2D accounts for 90–95% of all diabetes cases and is strongly associated with obesity—a condition increasingly referred to as “diabesity.” It significantly elevates the risk of limb amputation (23.3-fold increase) and is linked to neurodegenerative disorders, including Alzheimer’s disease4,5. Despite its global impact, reliable T2D prediction remains challenging. Missing or erroneous clinical data—especially prevalent in LMICs due to data collection errors and patient non-compliance—introduce bias and degrade model reliability6,7. Class imbalance, where healthy controls disproportionately outnumber positive cases, results in low sensitivity and elevated false-negative rates, undermining early detection efforts8. Additionally, complex nonlinear relationships among genetic, clinical, and environmental variables reduce the efficacy of traditional models such as Logistic Regression (LR)9. Population-specific risk factors (e.g., diabetes pedigree in Asian populations versus BMI in European cohorts) further hinder model generalizability9,10. Accurate imputation of missing or zero values in key clinical features—such as Glucose, Blood Pressure, and BMI—is vital for improving diagnostic accuracy, particularly in resource-limited settings. However, many previous studies have relied on simplistic imputation methods (e.g., mean or median substitution), which fail to capture inter-patient variability and often yield clinically unreliable outcomes11. These approaches, including mode- and median-based filling in the PIMA Indian Diabetes Dataset (PIDD), often obscure complex relationships among features12. While more advanced methods such as k-Nearest Neighbors (k-NN) and multivariate imputation by chained equations (MICE) offer improved performance, they still struggle with skewed datasets like the Bangladesh Diabetes Dataset (BDD)13,14. Generative Adversarial Networks (GANs) have emerged as promising tools, yet standard GANs often fail to incorporate class-specific distributions6. In parallel, predictive models such as LR, Support Vector Machines (SVM), and gradient boosting (e.g., XGBoost) typically report Area Under the ROC Curve (AUC) between 80.00% and 85.00% on datasets such as PIDD and the Frankfurt Hospital Dataset (FHGDD), but often underperform when confronted with imbalanced or incomplete data15–23. Ensemble methods, including Random Forest (RF) and AdaBoost, offer greater robustness, yet their uniform weighting strategy limits adaptability to skewed datasets24,25. Table 1 summarizes prior studies (2016–2025) on T2D prediction using PIDD, detailing imputation strategies, classification models, and their AUC performance, ranging from 70.00% to 85.90%.Table 1Summary of prior type 2 diabetes prediction studies (2016–2025) using the PIDD.AuthorsYearsMissing values imputation MethodModelsAUC (%)Hayashi et al.332016Removal of Irregular/Mislabeled SamplesSampling Re-RX with J48graft81.60Battineni et al.232019Removal of Missing InstancesLR83.00Singh and Singh222020Median ImputationNSGA-II-Stacking85.90Bhoi et al.212021N/ALR82.50Chatrati et al.342022Outlier RemovalSVM70.00Saxena et al.202022Mean ImputationRF83.60Reza et al.192023Median ImputationSVM with Improved Non-linear Kernel (RBF + RBF City Block)85.50Kangra and Singh182023N/ASVM, Naive Bayes (NB), k-NN, RF, LR, Decision Tree (DT)SVM: 74.00%; NB: 80.00%; k-NN: 65.00%; RF: 64.00%; LR: 83.00%; DT: 71.00%Ahmed et al.172024Mean ImputationFeedforward Neural Network (FNN)FNN: 85.10%El Sherbiny et al.162025Median ImputationRF, XGB, Artificial Neural Network (ANN)RF: 76.00%; XGB: 76.00%; ANN: N/ALiang et al.152025N/ABayesian Network (BN), LRBN: 81.00 (95% CI: 76.00%–80.00%); LR: 84.00 (95% CI: 79.00%–89.00%)N/A indicates that the data were not available. Table 1Summary of prior type 2 diabetes prediction studies (2016–2025) using the PIDD.AuthorsYearsMissing values imputation MethodModelsAUC (%)Hayashi et al.332016Removal of Irregular/Mislabeled SamplesSampling Re-RX with J48graft81.60Battineni et al.232019Removal of Missing InstancesLR83.00Singh and Singh222020Median ImputationNSGA-II-Stacking85.90Bhoi et al.212021N/ALR82.50Chatrati et al.342022Outlier RemovalSVM70.00Saxena et al.202022Mean ImputationRF83.60Reza et al.192023Median ImputationSVM with Improved Non-linear Kernel (RBF + RBF City Block)85.50Kangra and Singh182023N/ASVM, Naive Bayes (NB), k-NN, RF, LR, Decision Tree (DT)SVM: 74.00%; NB: 80.00%; k-NN: 65.00%; RF: 64.00%; LR: 83.00%; DT: 71.00%Ahmed et al.172024Mean ImputationFeedforward Neural Network (FNN)FNN: 85.10%El Sherbiny et al.162025Median ImputationRF, XGB, Artificial Neural Network (ANN)RF: 76.00%; XGB: 76.00%; ANN: N/ALiang et al.152025N/ABayesian Network (BN), LRBN: 81.00 (95% CI: 76.00%–80.00%); LR: 84.00 (95% CI: 79.00%–89.00%)N/A indicates that the data were not available. Summary of prior type 2 diabetes prediction studies (2016–2025) using the PIDD. N/A indicates that the data were not available. To address these challenges, this study introduces a comprehensive, multi-stage framework for T2D prediction, leveraging diverse datasets including PIDD (768 cases), FHGDD (2,000 records), BDD (465 cases), and custom combinations of these cohorts to capture heterogeneous patient populations from distinct geographical contexts1–3. Despite significant advances in predictive modeling, reliable T2D risk stratification remains particularly challenging in low- and LMICs, which bear 75% of the global diabetes mortality burden26. In these settings, clinical data are often incomplete, with missing values exceeding 40% in electronic health records due to resource constraints, patient non-compliance, and inconsistent documentation practices6. Such data irregularities introduce severe bias in traditional models, resulting in high false-negative rates and delayed diagnosis—critical barriers to early intervention. Moreover, population-specific risk factors vary markedly across ethnic groups, further complicating generalizable prediction. For instance, South Asian populations exhibit elevated T2D risk at lower BMI thresholds (~23–25 kg/m2) compared to European cohorts (~30 kg/m2), driven by higher visceral adiposity and genetic predisposition10. In contrast, insulin resistance metrics like fasting insulin show limited predictive value in Asian datasets but remain informative in Western populations 27. These ethnic disparities are often obscured in aggregated models, reducing clinical utility in diverse LMICs. This study addresses these gaps by introducing a four-stage, ethnicity-sensitive framework—) Feature-Weighted Class-Adaptive Generative Imputation Network FW-CAGIN-WCAE(—designed for robust performance under missing data, class imbalance, and demographic heterogeneity. By integrating class-aware imputation, performance-weighted ensembles, and SHAP-based interpretability, the pipeline enables personalized, actionable risk assessment tailored to resource-limited healthcare systems, with direct applicability in high-burden regions such as South Asia and Sub-Saharan Africa. Although Transformer-based attention mechanisms have revolutionized sequence modeling and large-scale tabular tasks28,29, they remain suboptimal for high-missingness (> 40%) clinical data with severe class imbalance. These models depend on masking reconstruction and positional encodings, which escalate computational demands and fail to capture multimodal, class-conditioned distributions in skewed biomarkers (e.g., Insulin). In contrast, FW-CAGIN leverages conditional GANs to adversarially learn physiologically plausible feature manifolds per class and feature24, eliminating sequential assumptions. This generative paradigm outperforms attention-based imputers (e.g., SAINT30) by > 99% in RMSE and + 0.020 in AUC (Section "Model performance"), making it uniquely suited for resource-constrained LMIC EHRs. The proposed pipeline begins with rigorous preprocessing: duplicate entries are removed to mitigate overfitting; features with excessive missing or zero values—such as Insulin—are excluded using a Zero-Threshold Feature Removal (ZTFR) approach. For imputation, we introduce the FW-CAGIN, a novel GAN-based method that performs class-sensitive, feature-wise imputation while preserving physiological variability. Winsorization is applied to mitigate the influence of outliers, and normalization ensures feature-scale consistency across datasets31,32. Prediction is carried out via the Weighted Classifier Aggregation Ensemble (WCAE), which integrates 15 Machine Learning Models (MLMs) and Deep Learning Models (DLMs). Classifier weights are assigned based on AUC scores to enhance robustness in imbalanced datasets. SHAP-based interpretability is incorporated to identify population-specific risk contributors—such as diabetes pedigree—enhancing model transparency and cross-population applicability9,10. Achieving an AUC of 0.936, this framework provides accurate, interpretable predictions, enabling timely clinical intervention and reducing long-term healthcare costs, particularly in resource-constrained environments. The rest of this paper is organized as follows: Section "Material and methods" describes the materials and methods, including data preprocessing, the ZTFR protocol, the FW-CAGIN imputation method, and the WCAE prediction model. Section "Results" presents the experimental results, covering imputation quality, predictive performance, and model interpretability across multiple datasets. Section "Comparative analysis with state-of-the-art" provides a comparative analysis with state-of-the-art approaches. Section "Discussion" discusses clinical implications and future research directions. Section “Limitations” outlines the limitations of the study. Finally, Section “Conclusion” concludes the paper by summarizing the key contributions and the potential impact of the proposed framework on T2D prediction. Material and methods The proposed framework for T2D prediction, outlined in Fig. 3, integrates three essential components: biologically informed feature selection via ZTFR, class-aware imputation using FW-CAGIN, and robust classification through WCAE.Fig. 3Overview of the FW-CAGIN-WCAE Pipeline for Robust T2D Prediction, Integrating ZTFR, FW-CAGIN, and WCAE. Overview of the FW-CAGIN-WCAE Pipeline for Robust T2D Prediction, Integrating ZTFR, FW-CAGIN, and WCAE. Datasets To ensure a thorough evaluation across diverse populations, three core datasets—PIDD, FHGDD, and BDD—were utilized. These datasets are publicly available via the links provided in the Data Availability section [Link]. Additionally, four hybrid combinations (PIDD–BDD, PIDD–FHGDD, BDD–FHGDD, and PIDD–BDD–FHGDD) were constructed for this study to examine the scalability and generalizability of the proposed WCAE framework. The PIDD dataset, sourced from the UCI Machine Learning Repository, includes 768 samples (500 non-diabetic, 268 diabetic), each with eight numerical features (e.g., Blood Pressure, Insulin) and a binary outcome. Notable proportions of missing values are observed, particularly in Insulin (29.6%) and Skin Thickness (48.7%), represented as zeros. Feature distributions stratified by class are shown in Fig. 4 (Appendix A, Table A1).Fig. 4PIDD health trends (blue: no-diabetes; orange: diabetes). PIDD health trends (blue: no-diabetes; orange: diabetes). The FHGDD dataset, compiled from anonymized Frankfurt Hospital records, comprises 2,000 samples (1,316 non-diabetic, 684 diabetic). It includes the same eight numerical features as PIDD, introducing regional variability from European populations. Missing values are concentrated in Insulin (30.2%) and skin thickness (47.5%). Detailed feature distributions are presented in Fig. 5 (Appendix A, Table A2).Fig. 5FHGDD health trends (blue: no-diabetes; orange: diabetes).Table 2Characteristics of dataset combinations for T2D prediction.Dataset combinationNon-diabetic samplesDiabetic samplesTotal samplesClass ratio (non-diabetic:diabetic)PIDD-BDD5936411,23448:52PIDD-FHGDD1,8169522,76866:34BDD-FHGDD1,4091,0762,48557:43PIDD-BDD-FHGDD1,9091,3243,23359:41 FHGDD health trends (blue: no-diabetes; orange: diabetes). Table 2Characteristics of dataset combinations for T2D prediction.Dataset combinationNon-diabetic samplesDiabetic samplesTotal samplesClass ratio (non-diabetic:diabetic)PIDD-BDD5936411,23448:52PIDD-FHGDD1,8169522,76866:34BDD-FHGDD1,4091,0762,48557:43PIDD-BDD-FHGDD1,9091,3243,23359:41 Characteristics of dataset combinations for T2D prediction. The BDD dataset, collected from anonymized records at Pabna Diabetes Hospital, includes 465 samples (372 non-diabetic, 93 diabetic). Originally comprising nine features, the patient ID field was removed to align with PIDD and FHGDD, resulting in eight numerical features. This dataset exhibits distinct South Asian characteristics, including elevated Skin Thickness values and lower Insulin variation, with missing values in Insulin (25.8%) and Skin Thickness (45.0%). Feature distributions are shown in Fig. 6 (Appendix A, Table A3).Fig. 6BDD health trends (blue: no-diabetes; orange: diabetes).Table 3Hyperparameters for gradient boosting and ensemble models.ModelHyperparameterDefinitionRangesOptimal RangesGradient Boosting ModelsXGBoostn_estimatorsBoosting rounds{50, 100, 200, 500, 1000}{50, 100, 200, 500}learning_rateStep size{0.001, 0.01, 0.1, 0.3, 0.5}{0.001, 0.01, 0.1}max_depthTree depth{3,5, 7, 10, 15}{3, , 7}min_child_weightMin istance weight{1, 3, 5, 10, 20}{1, 3, 5}gammaMin loss reduction{0, 0.1, 0.5, 1, 2}{0, 0.1, 0.5}subsampleSample faction{0.5, 0.6, 0.8, 1.0}{0.6, 0.8, 1.0}colsample_bytreeFeature frction{0.5, 0.6, 0.8, 1.0}{0.6, 0.8, 1.0}reg_alphaL1 regulrization{0, 0.01, 0.1, 1, 10}{0, 0.1, 1}reg_lambdaL2 regulaization{0, 0.01, 0.1, 1, 10}{0, 0.1, 1}CatBoostiterationBoosting iterations{100, 200, 500, 1000}{100, 200, 500}learning_rateStep size{0.01, 0.05, 0.1, 0.3}{0.01, 0.05, 0.1}depthTree depth{4, 6, 8, 10, 12}{4, 6, 8}l2_leaf_regL2 regularization{1, 3, 5, 7, 10}{1, 3, 5}bagging_temperatureBayesian bagging intensity{0, 0.5, 1, 2}{0, 0.5, 1}LightGBMn_estimatorsBoosting iterations{50, 100, 200, 500, 1000}{50, 100, 200}learning_rateStep size{0.001, 0.01, 0.05, 0.1, 0.3}{0.01, 0.05, 0.1}max_depthTree depth{3, 5, 7, 10, -1}{3, 5, 7}num_leavesMax leaves{20, 31, 50, 70, 100}{20, 31, 50}subsampleSample fraction{0.5, 0.6, 0.8, 1.0}{0.6, 0.8, 1.0}Ensemble ModelsGBMn_estimatorsTrees{50, 100, 200, 500}{100, 200}learning_rateStep size{0.01, 0.05, 0.1, 0.3}{0.05, 0.1}max_depthTree depth{3, 5, 7, 10}{3, 5}subsampleSample fraction{0.5, 0.8, 0.9, 1.0}{0.8, 0.9, 1.0}min_samples_splitMin samples to split{2, 5, 10}{2, 5}RFn_estimatorsTrees{50, 100, 200, 500}{100, 200}max_depthTree depth{5, 10, 20, None}{10, 20, None}min_samples_splitMin samples to split{2, 5, 10}{2, 5}min_samples_leafMin samples at leaf{1, 2, 4}{1, 2}bootstrapBootstrap sampling{True, False}{True, False}ABn_estimatorsWeak learners{10, 50, 100, 200, 500}{50, 100, 200}learning_rateLearner contribution{0.01, 0.1, 0.5, 1.0}{0.1, 0.5, 1.0}algorithmBoosting algorithm{SAMME, SAMME.R}{SAMME.R} BDD health trends (blue: no-diabetes; orange: diabetes). Table 3Hyperparameters for gradient boosting and ensemble models.ModelHyperparameterDefinitionRangesOptimal RangesGradient Boosting ModelsXGBoostn_estimatorsBoosting rounds{50, 100, 200, 500, 1000}{50, 100, 200, 500}learning_rateStep size{0.001, 0.01, 0.1, 0.3, 0.5}{0.001, 0.01, 0.1}max_depthTree depth{3,5, 7, 10, 15}{3, , 7}min_child_weightMin istance weight{1, 3, 5, 10, 20}{1, 3, 5}gammaMin loss reduction{0, 0.1, 0.5, 1, 2}{0, 0.1, 0.5}subsampleSample faction{0.5, 0.6, 0.8, 1.0}{0.6, 0.8, 1.0}colsample_bytreeFeature frction{0.5, 0.6, 0.8, 1.0}{0.6, 0.8, 1.0}reg_alphaL1 regulrization{0, 0.01, 0.1, 1, 10}{0, 0.1, 1}reg_lambdaL2 regulaization{0, 0.01, 0.1, 1, 10}{0, 0.1, 1}CatBoostiterationBoosting iterations{100, 200, 500, 1000}{100, 200, 500}learning_rateStep size{0.01, 0.05, 0.1, 0.3}{0.01, 0.05, 0.1}depthTree depth{4, 6, 8, 10, 12}{4, 6, 8}l2_leaf_regL2 regularization{1, 3, 5, 7, 10}{1, 3, 5}bagging_temperatureBayesian bagging intensity{0, 0.5, 1, 2}{0, 0.5, 1}LightGBMn_estimatorsBoosting iterations{50, 100, 200, 500, 1000}{50, 100, 200}learning_rateStep size{0.001, 0.01, 0.05, 0.1, 0.3}{0.01, 0.05, 0.1}max_depthTree depth{3, 5, 7, 10, -1}{3, 5, 7}num_leavesMax leaves{20, 31, 50, 70, 100}{20, 31, 50}subsampleSample fraction{0.5, 0.6, 0.8, 1.0}{0.6, 0.8, 1.0}Ensemble ModelsGBMn_estimatorsTrees{50, 100, 200, 500}{100, 200}learning_rateStep size{0.01, 0.05, 0.1, 0.3}{0.05, 0.1}max_depthTree depth{3, 5, 7, 10}{3, 5}subsampleSample fraction{0.5, 0.8, 0.9, 1.0}{0.8, 0.9, 1.0}min_samples_splitMin samples to split{2, 5, 10}{2, 5}RFn_estimatorsTrees{50, 100, 200, 500}{100, 200}max_depthTree depth{5, 10, 20, None}{10, 20, None}min_samples_splitMin samples to split{2, 5, 10}{2, 5}min_samples_leafMin samples at leaf{1, 2, 4}{1, 2}bootstrapBootstrap sampling{True, False}{True, False}ABn_estimatorsWeak learners{10, 50, 100, 200, 500}{50, 100, 200}learning_rateLearner contribution{0.01, 0.1, 0.5, 1.0}{0.1, 0.5, 1.0}algorithmBoosting algorithm{SAMME, SAMME.R}{SAMME.R} Hyperparameters for gradient boosting and ensemble models. To evaluate model performance under increasing levels of data heterogeneity, four composite datasets were constructed by combining the original cohorts. The PIDD–BDD combination integrates North American and South Asian populations, enhancing feature diversity and supporting cross-regional generalization. The PIDD–FHGDD merge spans North America and Europe, forming a balanced and moderately heterogeneous dataset suitable for inter-institutional benchmarking. The BDD–FHGDD pairing captures substantial demographic and clinical variability between South Asian and European cohorts. Finally, the PIDD–BDD–FHGDD combination consolidates all three datasets into a unified corpus of 3,233 samples, enabling large-scale simulation and end-to-end pipeline validation. Figure 7 illustrates the class distribution of individual datasets, highlighting the pronounced class imbalance in BDD (80.0% non-diabetic vs. 20.0% diabetic), which underscores the need for class-specific preprocessing.Fig. 7Class distribution: (a) PIDD (768 samples; 65.1% non-diabetic, blue; 34.9% diabetic, red); (b) FHGDD (2,000 samples; 65.8% non-diabetic, blue; 34.2% diabetic, red); (c) BDD (465 samples; 80.0% non-diabetic, blue; 20.0% diabetic, red). Class distribution: (a) PIDD (768 samples; 65.1% non-diabetic, blue; 34.9% diabetic, red); (b) FHGDD (2,000 samples; 65.8% non-diabetic, blue; 34.2% diabetic, red); (c) BDD (465 samples; 80.0% non-diabetic, blue; 20.0% diabetic, red). Table 2 summarizes the key characteristics of each dataset combination, including sample sizes, class distributions, and total records used in model training and evaluation. Data preprocessing Robust data preprocessing is essential to ensure analytical accuracy and model reliability, especially when dealing with biomedical datasets characterized by noise, outliers, and missing values. Our multi-phase pipeline is designed to enhance data integrity through the following structured steps: Remove duplicate samples Duplicate instances introduce redundancy and may bias the learning process by overfitting specific observations. To mitigate this, we eliminated all duplicated records from the PIDD, FHGDD, BDD, and their combined datasets, retaining the first occurrence of each duplicate record of each unique sample. This step promotes model generalizability by preserving data diversity. Feature selection with ZTFR Certain features—such as Insulin and Skin Thickness—exhibit an unusually high proportion of zero values, often indicating unrecorded or biologically implausible measurements. To systematically identify and exclude such variables, we introduce the ZTFR method. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf{\rm X}\in {\mathbb{R}}^{n\times d}$$\end{document} denote the dataset with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n$$\end{document} samples and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d$$\end{document} features. For each biologically critical feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${X}_{\mathrm{j}}\subseteq {X}_{\mathrm{bio}}\subseteq {\rm X},$$\end{document} the zero prevalence \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${z}_{j}$$\end{document} is computed as:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$z_{j} = \frac{{{\mathrm{Number}}\;{\mathrm{of}}\;{\mathrm{zero}}\;{\mathrm{values}}\;{\mathrm{in}}\;x_{j} }}{{{\mathrm{Total}}\;{\mathrm{sample}}\;{\mathrm{size}}}} \times 100$$\end{document} Features with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${z}_{j}>15\%$$\end{document} are flagged for removal, in line with evidence-based thresholds from prior machine learning studies35 and clinical data-handling guidelines36, Conversely, biologically valid variables (e.g., Pregnancies, Age) are retained. All flagged features were further evaluated and confirmed by a clinical domain expert, as detailed in Algorithm 1. Algorithm 1Standard GAN Standard GAN Missing values imputation Retained features with zero values—interpreted as missing—were imputed using three approaches: mean, median, mode imputation, the standard GAN, and our proposed FW-CAGIN. Each zero value was first grouped according to class label (diabetic vs. non-diabetic), and imputation was performed within class-specific subsets. The standard GAN6, described in Algorithm 2, employs a generator \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{G}$$\end{document} and discriminator \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{D}$$\end{document} trained adversarially to mimic the distribution of observed data:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Min}_{G}{Max}_{D}{\mathbb{V}}\left(D,G\right)={\mathbb{E}}_{x\sim {p}_{\mathrm{data}}(x)}\left[logD\left(x\right)\right]+{\mathbb{E}}_{z\sim {p}_{\mathrm{z}}(z)}\left[log\left(1-D\left(G\left(z\right)\right)\right)\right]$$\end{document} Generated values were de-normalized to match the original feature scale, preserving their clinical interpretability. However, this model does not account for class imbalance, which is significant in datasets such as BDD (diabetic: non-diabetic = 80:20). To overcome this limitation, we introduce FW-CAGIN—a feature-wise, class-aware GAN that conditions the imputation process on class labels. For each feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$j$$\end{document} and class \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$c,$$\end{document} missing and observed subsets are defined as:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathbf{\rm X}}_{\mathrm{missing}}^{(j,c)}=\left\{{X}_{\mathrm{i},\mathrm{j}}|{X}_{\mathrm{i},\mathrm{j}}=0, {Y}_{{\varvec{i}}}= c\right\}, {{\rm X}}_{\mathrm{non}-\mathrm{missing}}^{(j,c)}=\left\{{X}_{\mathrm{i},\mathrm{j}}|{X}_{\mathrm{i},\mathrm{j}}\ne 0, {Y}_{i}= c\right\}$$\end{document} Each class-specific generator \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${G}_{\mathrm{c}}$$\end{document}​ generates imputed values \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\widehat{X}}_{ij}{=G}_{c}\left(z,c\right),$$\end{document} while the corresponding discriminator \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${D}_{\mathrm{c}}$$\end{document}​ attempts to distinguish real from synthetic data. The objective function becomes4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${Min}_{{G}_{\mathrm{c}}}{Max}_{{D}_{\mathrm{c}}}{\mathbb{V}}\left({D}_{\mathrm{c}},{G}_{\mathrm{c}}\right)={\mathbb{E}}_{x\sim {p}_{n\mathrm{on}-\mathrm{missing}}^{ (c) }(x)}\left[log{D}_{\mathrm{c}}\left(x\right)\right]+{\mathbb{E}}_{z\sim {p}_{z}(z)}\left[log\left(1-{D}_{\mathrm{c}}\left({G}_{\mathrm{c}}\left(z,c\right)\right)\right)\right]$$\end{document} Unlike attention-based imputers (e.g., SAINT30) that treat missingness as masking and reconstruct via self-attention—assuming sequential structure—FW-CAGIN employs conditional GANs to directly model the true conditional distribution \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$P({X}_{miss} | {X}_{obs}, y$$\end{document}). This adversarial paradigm is critical for non-Gaussian, class-dependent multimodality in T2D features (e.g., Insulin), where reconstruction losses collapse modes. By generating class-aware synthetic values, FW-CAGIN ensures physiological plausibility without normality or independence assumptions. The architecture of FW-CAGIN integrates fully connected layers, LeakyReLU activations, Batch Normalization, and Dropout for enhanced generalization. Details of its implementation are provided in Algorithm 3. Algorithm 2Standard GAN Standard GAN Algorithm 3FW-CAGIN FW-CAGIN Outlier management Outliers were identified using the Interquartile Range (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{IQR}$$\end{document}), calculated as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{IQR}={Q}_{3}-{Q}_{1},$$\end{document} with boundaries:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\text{Lower Bound}=\text{ Q}}_{1}-1.5\times \mathrm{IQR},\text{ Upper Bound}={\mathrm{Q}}_{3}+1.5\times \mathrm{IQR}$$\end{document} Values exceeding these bounds were Winsorized to the 5th and 95th percentiles. This preserves the overall data structure while reducing the influence of extreme values32,37. Standardization To ensure compatibility with gradient-based models, all input features (excluding the target variable) were standardized via z-score standardization:6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$Z({x}_{ij})=\frac{{x}_{ij}-{\overline{x} }_{j}}{{\sigma }_{j}}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\overline{x} }_{j}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\sigma }_{j}$$\end{document} denote the mean and standard deviation of feature \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${x}_{j},$$\end{document} respectively. This transformation enhances convergence and stability during training, particularly for deep neural networks38–40. Nested k-fold cross-validation To ensure robust model evaluation, reliable hyperparameter tuning, and prevention of overfitting and selection bias41,42, a stratified nested 5 × 5 cross-validation (CV) framework was employed across all datasets. The protocol is illustrated in Fig. 8.Fig. 8 Nested 5-fold cross-validation for model evaluation and hyperparameter optimization. Nested 5-fold cross-validation for model evaluation and hyperparameter optimization. Outer loop (fivefold stratified CV): Each dataset was partitioned into 5 folds, with 80% of samples allocated to training/validation and 20% to independent testing in each fold. Stratification was applied to preserve the original class distribution (T2D vs. non-T2D) within each fold, critical for imbalanced datasets (e.g., ~ 35% positive class in PIDD). Inner loop (fivefold stratified CV): Within each outer training set (80%), a second fivefold stratified CV was performed to optimize hyperparameters using Optuna’s Tree-structured Parzen Estimator (TPE). The objective was to maximize mean ROC-AUC across 50 optimization trials, with early stopping after 10 consecutive non-improving iterations43,44. Final model evaluation: The best hyperparameter configuration from the inner loop was used to retrain the model on the entire outer training set (80%). Performance was then evaluated on the held-out test fold (20%). This stratified nested design ensures unbiased performance estimation, strict separation between hyperparameter tuning and final testing, and generalizability across heterogeneous and imbalanced clinical cohorts. Hyperparameter optimization Hyperparameters for all MLMs and DLMs were systematically optimized using Bayesian Optimization with the Tree-structured Parzen Estimator (TPE) sampler from Optuna, as detailed in Section "Data preprocessing". The optimal hyperparameter ranges were selected based on the highest AUC performance on validation sets. The final tuned hyperparameters for each model are summarized in Tables 3 and 4.Table 4Hyperparameters for simple, probabilistic, non-gradient ensemble, instance-based, and DLMs.ModelHyperparameterDefinitionRangesOptimal RangesSimple and Probabilistic ModelsGNBvar_smoothingVariance smoothing{1e-9, 1e-7, e-5}{1e-9, 1e-7, 1e-5}DTcriterionSplit quality{gini, entropy}{gini, entropy}splitterSplit strategy{best, random}{best, random}min_samples_splitMin samples to split{2, 5, 10, 20}{1, 2, 5, 10}min_samples_leafMin samples at leaf{1, 2, 5, 10, 20}{1, 2, 5, 10}max_depthTree depth{3, 5, 10, 20, None}{3, 5, 10, None}max_featuresFeatures for split{None, sqrt, log2, 0.5}{None, sqrt, log2}LRCInverse regularization{0.001, 0.01, 0.1, 1, 10, 100}{0.01, 0.1, 1, 10, 100}penaltyRegularization type{l1, l2}{liblinear, lbfgs}solverOptimization algorithm{liblinear, lbfgs, saga}{liblinear, lbfgs}Non-Gradient Ensemble and Instance-Based ModelsETCn_estimatorsTrees{liblinear, lbfgs, saga}{50, 100, 200, 300}criterionSplit quality{gini, entropy}{gini, entropy}max_depthTree depth{None, 5, 10, 20, 30, 50}{None, 5, 10, 20, 30}min_samples_splitMin samples to split{2, 5, 10, 20}{2, 5, 10}min_samples_leafMin samples at leaf{1, 2, 4, 8}{1, 2, 4}SVMCRegularization parameter{0.01, 0.1, 1, 10, 100, 1000}{0.01, 0.1, 1, 10, 100}kernelKernel type{linear, rbf, poly, sigmoid}{linear, rbf, poly}gammaKernel coefficient{scale, auto, 0.001, 0.01, 0.1, 1}{scale, auto, 0.001, 0.01, 0.1}k-NNn_neighborsNeighbors{3, 5, 7, 9, 15, 21, 31}{3, 5, 7, 9, 15, 21}algorihmNearest neighbors algorithm{brute, ball_tree, kd_tree, auto}{brute, ball_tree, kd_tree}leaf_sizeLeaf size{10, 20, 30, 50, 100}{10, 30, 50}pMinkowski distance power{1, 2, 3}{1, 2}DLMsMLPhidden_layer_sizesHidden layers{(50,), (100,), (50, 50), (100, 50), (100, 100), (200,)}{(50,), (100,), (50, 50), (100, 50), (100, 100)}activationActivation function{relu, tanh, logistic, identity}{relu, tanh, logistic}learning_rate_initInitial learning rate{0.0001, 0.001, 0.01, 0.1}{0.0001, 0.001, 0.01}max_iterMax iterations{100, 200, 500, 1000}{200, 500}alphaL2 regularization{0.0001, 0.001, 0.01, 0.1}{0.0001, 0.001, 0.01}DNNhidden_layer_sizesHidden layers{(50,), (100,), (50, 50), (100, 50)}{(50,), (100,), (50, 50)}activationActivation function{relu, tanh, sigmoid}{relu, tanh}learning_rateLearning rate{0.0001, 0.001, 0.01}{0.0001, 0.001, 0.01}epochsTraining epochs{10, 20, 50, 100}{10, 20, 50}batch_sizeBatch size{16, 32, 64}16, 32, 64}dropout_rateDropout rate{0.0, 0.2, 0.3}{0.0, 0.2, 0.3}CNNfiltersConvolutional filters{16, 32, 64, 128}{32, 64}kernel_sizeKernel size{2, 3, 4}{2, 3}pool_sizeMax pooling size{2, 3}{2, 3}dense_unitsDense layer units{50, 100}{50, 100}dropout_rateDropout rate{0.2, 0.3, 0.5}{0.2, 0.3, 0.5}learning_rateLearning rate{0.0001, 0.001, 0.01}{0.0001, 0.001, 0.01}epochsTraining epochs{10, 20, 50, 100}{10, 20, 50}batch_sizeBatch size{16, 32, 64}{16, 32, 64} Table 4Hyperparameters for simple, probabilistic, non-gradient ensemble, instance-based, and DLMs.ModelHyperparameterDefinitionRangesOptimal RangesSimple and Probabilistic ModelsGNBvar_smoothingVariance smoothing{1e-9, 1e-7, e-5}{1e-9, 1e-7, 1e-5}DTcriterionSplit quality{gini, entropy}{gini, entropy}splitterSplit strategy{best, random}{best, random}min_samples_splitMin samples to split{2, 5, 10, 20}{1, 2, 5, 10}min_samples_leafMin samples at leaf{1, 2, 5, 10, 20}{1, 2, 5, 10}max_depthTree depth{3, 5, 10, 20, None}{3, 5, 10, None}max_featuresFeatures for split{None, sqrt, log2, 0.5}{None, sqrt, log2}LRCInverse regularization{0.001, 0.01, 0.1, 1, 10, 100}{0.01, 0.1, 1, 10, 100}penaltyRegularization type{l1, l2}{liblinear, lbfgs}solverOptimization algorithm{liblinear, lbfgs, saga}{liblinear, lbfgs}Non-Gradient Ensemble and Instance-Based ModelsETCn_estimatorsTrees{liblinear, lbfgs, saga}{50, 100, 200, 300}criterionSplit quality{gini, entropy}{gini, entropy}max_depthTree depth{None, 5, 10, 20, 30, 50}{None, 5, 10, 20, 30}min_samples_splitMin samples to split{2, 5, 10, 20}{2, 5, 10}min_samples_leafMin samples at leaf{1, 2, 4, 8}{1, 2, 4}SVMCRegularization parameter{0.01, 0.1, 1, 10, 100, 1000}{0.01, 0.1, 1, 10, 100}kernelKernel type{linear, rbf, poly, sigmoid}{linear, rbf, poly}gammaKernel coefficient{scale, auto, 0.001, 0.01, 0.1, 1}{scale, auto, 0.001, 0.01, 0.1}k-NNn_neighborsNeighbors{3, 5, 7, 9, 15, 21, 31}{3, 5, 7, 9, 15, 21}algorihmNearest neighbors algorithm{brute, ball_tree, kd_tree, auto}{brute, ball_tree, kd_tree}leaf_sizeLeaf size{10, 20, 30, 50, 100}{10, 30, 50}pMinkowski distance power{1, 2, 3}{1, 2}DLMsMLPhidden_layer_sizesHidden layers{(50,), (100,), (50, 50), (100, 50), (100, 100), (200,)}{(50,), (100,), (50, 50), (100, 50), (100, 100)}activationActivation function{relu, tanh, logistic, identity}{relu, tanh, logistic}learning_rate_initInitial learning rate{0.0001, 0.001, 0.01, 0.1}{0.0001, 0.001, 0.01}max_iterMax iterations{100, 200, 500, 1000}{200, 500}alphaL2 regularization{0.0001, 0.001, 0.01, 0.1}{0.0001, 0.001, 0.01}DNNhidden_layer_sizesHidden layers{(50,), (100,), (50, 50), (100, 50)}{(50,), (100,), (50, 50)}activationActivation function{relu, tanh, sigmoid}{relu, tanh}learning_rateLearning rate{0.0001, 0.001, 0.01}{0.0001, 0.001, 0.01}epochsTraining epochs{10, 20, 50, 100}{10, 20, 50}batch_sizeBatch size{16, 32, 64}16, 32, 64}dropout_rateDropout rate{0.0, 0.2, 0.3}{0.0, 0.2, 0.3}CNNfiltersConvolutional filters{16, 32, 64, 128}{32, 64}kernel_sizeKernel size{2, 3, 4}{2, 3}pool_sizeMax pooling size{2, 3}{2, 3}dense_unitsDense layer units{50, 100}{50, 100}dropout_rateDropout rate{0.2, 0.3, 0.5}{0.2, 0.3, 0.5}learning_rateLearning rate{0.0001, 0.001, 0.01}{0.0001, 0.001, 0.01}epochsTraining epochs{10, 20, 50, 100}{10, 20, 50}batch_sizeBatch size{16, 32, 64}{16, 32, 64} Hyperparameters for simple, probabilistic, non-gradient ensemble, instance-based, and DLMs. MLMS and DLMs We benchmarked a wide range of MLMs and DLMs both as standalone baselines and as components of our proposed WCAE framework. Hyperparameters were optimized as described in Sections "Data preprocessing" and "Nested k-Fold Cross-Validation", and all models were trained on preprocessed datasets. Gradient boosting models We included state-of-the-art gradient boosting algorithms—eXtreme Gradient Boosting (XGBoost)40, Categorical Boosting (CatBoost)39, and Light Gradient Boosting Machine (LightGBM)38—due to their strong performance in capturing complex non-linear relationships in clinical data, which are crucial for accurate T2D prediction. Their optimized hyperparameters are presented in Table 3. Ensemble models To enhance robustness and predictive power, especially under class imbalance, we incorporated classical ensemble methods: RF45, Gradient Boosting Machine (GBM)46, and AdaBoost (AB)47. These models leverage multiple weak learners to achieve high generalization performance. Their hyperparameters are listed in Table 3. Simple and probabilistic models Interpretable models, including Gaussian Naive Bayes (GNB)48, DT49,50, and LR51. Their hyperparameters are detailed in Table 4. Non-gradient ensemble and instance-based models To capture diverse data patterns and enhance generalization, we explored non-gradient ensemble and instance-based models, including Extra Trees Classifier (ETC)52, SVM53, and k-NN54, These models provide complementary strengths and are tuned as detailed in Table 4. DLMS To exploit complex feature interactions and high-order representations, we employed deep learning architectures, including Multi-Layer Perceptron (MLP)55, Deep Neural Network (DNN)56,57, and Convolutional Neural Network (CNN)58. The CNN was adapted to tabular data by reshaping the eight health features into a 2D matrix (e.g., 4 × 2), enabling convolutional feature extraction. All DLM hyperparameters are summarized bin Table 4. WCAE The WCAE is a novel ensemble framework specifically designed to improve predictive performance in binary classification tasks, such as T2D prediction. WCAE integrates confidence outputs from multiple MLMs and DLMs using a weighted aggregation strategy, where each model’s contribution is scaled proportionally to its discriminative capability. This architecture is particularly effective in handling imbalanced datasets, such as BDD with an 80:20 class distribution. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{M}=\left\{{M}_{1},{M}_{2},\dots ,{M}_{m}\right\}$$\end{document}} denote a set of mmm base classifiers. Each model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M}_{j}$$\end{document} maps an input sample \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$X\in {\mathbb{R}}^{d}$$\end{document} to a confidence vector:7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$P_{j} \left( X \right) = \left[ {P_{0j} ,P_{1j} } \right] \in {\mathbb{R}}^{2}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$P_{ij} \in \left[ {0,1} \right]$$\end{document} represents the confidence score assigned by model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M}_{j}$$\end{document} to class \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${c}_{i}$$\end{document} (with i = 0 for non-diabetic, i = 1 for diabetic), and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${P}_{0j}+{P}_{1j}=1$$\end{document}. WCAE constructs an ensemble confidence score \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${P}^{WACE}\left({\rm X}\right)=[{P}_{0}^{\mathrm{WACE}},{P}_{1}^{\mathrm{WACE}}]$$\end{document} using a weighted sum of the individual model confidences:8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${P}_{i}^{\mathrm{WACE}}=\frac{{\sum }_{j=1}^{m}\left({{\mathcal{w}}_{j}P}_{ij}({\rm X})\right)}{{\sum }_{k=0}^{1}{\sum }_{j=1}^{m}\left({{\mathcal{w}}_{j}P}_{kj}({\rm X})\right)}, i=\mathrm{0,1}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{w}}_{j}$$\end{document} is the weight assigned to model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M}_{j},$$\end{document} determined based on its AUC performance:9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{w}}_{j}={\mathrm{AUC}}_{j}$$\end{document} The final prediction is made by assigning the input sample to the class with the highest aggregated confidence:10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\widehat{y}\left({\rm X}\right)={\mathrm{argmax}}_{i\in \left\{\mathrm{0,1}\right\}}{P}_{i}^{\mathrm{WACE}}\left({\rm X}\right)$$\end{document} Given that \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${P}_{0}^{\mathrm{WACE}}=1-{P}_{1}^{\mathrm{WACE}},$$\end{document} this decision rule simplifies to:11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\widehat{y}\left({\rm X}\right)=\left\{\begin{array}{c}1 if {P}_{i}^{\mathrm{WACE}}\left({\rm X}\right)\ge 0.5, \\ 0 otherwise.\end{array}\right.$$\end{document} This weighted confidence aggregation mechanism enhances robustness by leveraging the diversity of base classifiers while prioritizing those with superior discriminative performance. Empirical evaluations on T2D-related datasets demonstrated that WCAE consistently yields improved accuracy, particularly under class imbalance conditions, validating its effectiveness as a reliable ensemble strategy. System model The proposed FW-CAGIN-WCAE pipeline is formalized as an integrated four-stage system: (1) ZTFR, (2) FW-CAGIN imputation, (3) WCAE ensemble, (4) SHAP interpretability. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{D}=\{({\mathbf{x}}_{i},{y}_{i}){\}}_{i=1}^{n}\in {\mathbb{R}}^{n\times d}\times \{\mathrm{0,1}{\}}^{n}$$\end{document} denote the input dataset with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n$$\end{document} samples and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d$$\end{document} features. The ZTFR module removes biologically implausible features using zero-prevalence thresholding (Eq. 1). The filtered dataset \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{D}}^{\prime }$$\end{document} undergoes class- and feature-specific imputation via FW-CAGIN (Eq. 3–4), followed by outlier management (Eq. 5) and z-score normalization (Eq. 6). The preprocessed data \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{Z}$$\end{document} is fed into the WCAE, which aggregates \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m=15$$\end{document} base models using AUC-weighted confidence scores (Eq. 8–12). The final prediction is given by Eq. (12). SHAP values (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\phi }_{j}$$\end{document}) are computed post-prediction to explain feature contributions across populations. The complete pipeline is summarized in Fig. 9 and mathematically as:12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{D}} \to ^{{{\mathrm{ZTFR}}({\mathrm{Eq}}.1)}} {\mathcal{D}}^{\prime } \to ^{{{\mathrm{FW-CAGIN}}\;({\mathrm{Eq}}.3 - 4)}} {\hat{\mathcal{D}}}\to ^{{{\mathrm{Winsorize}}({\mathrm{Eq}}.5) + {\mathrm{Norm}}\;({\mathrm{Eq}}.6)}} {\mathcal{Z}}\to ^{{{\mathrm{WCAE}}\;({\mathrm{Eq}}.8 - 12)}} \hat{y}\to ^{{{\mathrm{SHAP}}}} \left\{ {\phi_{j} } \right\}$$\end{document}Fig. 9FW-CAGIN-WCAE pipeline. Input data passes through ZTFR filtering, GAN-based imputation, preprocessing, AUC-weighted ensemble, and SHAP explanation to produce final T2D prediction. FW-CAGIN-WCAE pipeline. Input data passes through ZTFR filtering, GAN-based imputation, preprocessing, AUC-weighted ensemble, and SHAP explanation to produce final T2D prediction. Key hyperparameters of the FW-CAGIN and WCAE components, including search ranges and optimal values identified via Bayesian optimization, are detailed in Table 5.Table 5System Hyperparameters for FW-CAGIN and WCAE Components.ComponentHyperparameterDefinitionRangesOptimal rangesFW-CAGINGenerator layersNeural layers in generator[32, 64, 32], [64, 128, 64], [128, 256, 128][64, 128, 64]Discriminator layersNeural layers in discriminator[1,16,32], [64, 32, 1], [128, 64, 1][64, 32, 1]ActivationActivation function{LeakyReLU(α = 0.1), LeakyReLU(α = 0.2), ReLU}{LeakyReLU(α = 0.2)}NormalizationLayer normalization{None, BatchNorm, LayerNorm}{BatchNorm}DropoutDropout rate{0.1, 0.2, 0.3, 0.4}{0.2, 0.3}Batch sizeMini-batch size{16, 32, 64, 128}{32, 64}Learning rateOptimizer step size{1 × 10⁻5, 5 × 10⁻5, 1 × 10⁻4, 2 × 10⁻4, 5 × 10⁻4}{2 × 10⁻4, 5 × 10⁻4}OptimizerOptimization algorithm{Adam, RMSprop, SGD}{Adam(β₁ = 0.5)}Training epochsNumber of epochs{500, 1000, 2000}{1000 (early stop: 50)}WCAEBase modelsNumber of base learners{5, 10, 15, 20, 25}{15, 20}Weighting schemeWeight calculation (for imbalanced data){AUC, F1{AUC}AggregationVoting method{Soft voting, Hard voting}{Soft voting}Decision thresholdClassification threshold{0.3, 0.4, 0.5, 0.6}{0.4, 0.5} Table 5System Hyperparameters for FW-CAGIN and WCAE Components.ComponentHyperparameterDefinitionRangesOptimal rangesFW-CAGINGenerator layersNeural layers in generator[32, 64, 32], [64, 128, 64], [128, 256, 128][64, 128, 64]Discriminator layersNeural layers in discriminator[1,16,32], [64, 32, 1], [128, 64, 1][64, 32, 1]ActivationActivation function{LeakyReLU(α = 0.1), LeakyReLU(α = 0.2), ReLU}{LeakyReLU(α = 0.2)}NormalizationLayer normalization{None, BatchNorm, LayerNorm}{BatchNorm}DropoutDropout rate{0.1, 0.2, 0.3, 0.4}{0.2, 0.3}Batch sizeMini-batch size{16, 32, 64, 128}{32, 64}Learning rateOptimizer step size{1 × 10⁻5, 5 × 10⁻5, 1 × 10⁻4, 2 × 10⁻4, 5 × 10⁻4}{2 × 10⁻4, 5 × 10⁻4}OptimizerOptimization algorithm{Adam, RMSprop, SGD}{Adam(β₁ = 0.5)}Training epochsNumber of epochs{500, 1000, 2000}{1000 (early stop: 50)}WCAEBase modelsNumber of base learners{5, 10, 15, 20, 25}{15, 20}Weighting schemeWeight calculation (for imbalanced data){AUC, F1{AUC}AggregationVoting method{Soft voting, Hard voting}{Soft voting}Decision thresholdClassification threshold{0.3, 0.4, 0.5, 0.6}{0.4, 0.5} System Hyperparameters for FW-CAGIN and WCAE Components. Evaluation metrics Model performance was comprehensively evaluated using standard classification metrics derived from the confusion matrix, including True Positives (TP), False Positives (FP), False Negatives (FN), and True Negatives (TN). The following metrics were used: Sensitivity (Sn):13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{Sn}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}}$$\end{document} This metric reflects the model’s ability to correctly identify diabetic individuals and is critical for minimizing missed diagnoses in clinical applications. Specificity (Sp):14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{Sp}=\frac{\mathrm{TN}}{\mathrm{TN}+\mathrm{FP}}$$\end{document} Specificity quantifies the model’s ability to correctly classify non-diabetic cases, thereby reducing unnecessary interventions. Precision (Pr):15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{Pr}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FP}}$$\end{document} Precision evaluates the accuracy of positive predictions and is essential for reducing false alarms in diagnostic settings False Omission Rate (FOR):16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{FOR}=\frac{\mathrm{FN}}{\mathrm{TN}+\mathrm{FN}}$$\end{document} FOR indicates the proportion of negative predictions that are actually positive, which is crucial for clinical risk assessment. Diagnostic Odds Ratio (DOR):17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathrm{DOR}=\frac{\mathrm{TP}+\mathrm{TN}}{\mathrm{FP}\times \mathrm{FN}}$$\end{document} DOR integrates sensitivity and specificity into a single measure, providing an overall estimate of diagnostic effectiveness. AUC: This metrics provide a comprehensive evaluation of model accuracy, reliability, and clinical relevance, particularly for T2D prediction where both false positives and false negatives have significant consequences. Together, these metrics offer a robust and multidimensional assessment of model accuracy, reliability, and clinical applicability—particularly relevant for T2D prediction, where both false positives and false negatives carry substantial health implications. Experimental setup All experiments were conducted using Python 3.10.12 to ensure reproducibility and consistency. Numerical operations were performed with NumPy 1.26.4, while data preprocessing and manipulation were handled using Pandas 1.5.3. Classical MLMs—including RF, XGBoost (v2.0.3), CatBoost (v1.2.5), LightGBM (v4.3.0), AdaBoost, SVM, KNNs, DT, LR, and Gaussian Naïve Bayes—were implemented using Scikit-learn 1.3.2. DLMs, including MLP, DNN, and CNN, were developed using TensorFlow 2.15.0. To accelerate computationally intensive processes such as hyperparameter tuning and nested fivefold cross-validation, graphics processing units (GPUs) were utilized. This setup ensured efficient execution of model training and evaluation while maintaining high experimental integrity. Results This section presents the outcomes of the preprocessing steps, model performance evaluations, and comparative analyses for T2D prediction across six datasets: PIDD, FHGDD, PIDD-FHGDD, PIDD-BDD, BDD-FHGDD, and PIDD-BDD-FHGDD. The BDD dataset was excluded from imputation and model evaluations due to the absence of features requiring imputation post-ZTFR, as detailed in Section "Feature Selection with ZTFR". Peprocessing results Removal of duplicate samples To ensure data integrity and mitigate overfitting, duplicate samples were removed from all datasets, retaining only the first occurrence of each unique record (Table 6).Table 6Dataset sizes after removal of duplicate samples.MixNo-diabetes samplesDiabetes samplesTotal samplesPIDD500268768BDD37293465FHGDD491253744PIDD-BDD5936411,234PIDD-FHGDD506272778BDD-FHGDD6255831,208PIDD-BDD-FHGDD6445981,242 Table 6Dataset sizes after removal of duplicate samples.MixNo-diabetes samplesDiabetes samplesTotal samplesPIDD500268768BDD37293465FHGDD491253744PIDD-BDD5936411,234PIDD-FHGDD506272778BDD-FHGDD6255831,208PIDD-BDD-FHGDD6445981,242 Dataset sizes after removal of duplicate samples. ZTFR The ZTFR method was employed to eliminate features with a zero-value prevalence exceeding 15%, thereby reducing noise and enhancing model robustness. This 15% threshold was determined through a data-driven analysis of zero distributions (see Table 7) and aligns with established best practices for handling missing data in clinical datasets35,36,59,60. It effectively balances the trade-off between removing highly sparse, noisy features—such as Insulin (48.70% in PIDD; 71.77% in BDD) and Skin Thickness (29.56% in PIDD; 28.90% in FHGDD)—and retaining informative variables like Glucose (0.65% in PIDD; 0.67% in FHGDD) and Blood Pressure (4.56% in PIDD; 2.81% in BDD-FHGDD).Table 7Zero prevalence and feature removal status.DatasetSamplesGlucose (%)Blood pressure (%)Skin Thickness (%)Insulin (%)BMI (%)Removed featuresPIDD7680.654.5629.5648.701.43Skin Thickness, InsulinBDD4650.000.000.0071.770.00InsulinFHGDD7440.674.5728.9048.251.34Skin Thickness, InsulinPIDD-BDD1,2330.412.8418.4344.2427.92Skin Thickness, Insulin, BMIPIDD-FHGDD7780.644.6329.4348.461.41Skin Thickness, InsulinBDD-FHGDD1,2080.412.8117.8043.8728.39Skin Thickness, Insulin, BMIPIDD-BDD-FHGDD1,2420.402.9018.4451.170.89Skin Thickness, InsulinFeatures exceeding the 15% zero threshold were characterized by high variance and inconsistency, likely due to incomplete clinical recordings or patient non-compliance. Their limited predictive value was confirmed by low SHAP contributions (Section "Population-specific interpretability"). Table 7Zero prevalence and feature removal status.DatasetSamplesGlucose (%)Blood pressure (%)Skin Thickness (%)Insulin (%)BMI (%)Removed featuresPIDD7680.654.5629.5648.701.43Skin Thickness, InsulinBDD4650.000.000.0071.770.00InsulinFHGDD7440.674.5728.9048.251.34Skin Thickness, InsulinPIDD-BDD1,2330.412.8418.4344.2427.92Skin Thickness, Insulin, BMIPIDD-FHGDD7780.644.6329.4348.461.41Skin Thickness, InsulinBDD-FHGDD1,2080.412.8117.8043.8728.39Skin Thickness, Insulin, BMIPIDD-BDD-FHGDD1,2420.402.9018.4451.170.89Skin Thickness, InsulinFeatures exceeding the 15% zero threshold were characterized by high variance and inconsistency, likely due to incomplete clinical recordings or patient non-compliance. Their limited predictive value was confirmed by low SHAP contributions (Section "Population-specific interpretability"). Zero prevalence and feature removal status. Features exceeding the 15% zero threshold were characterized by high variance and inconsistency, likely due to incomplete clinical recordings or patient non-compliance. Their limited predictive value was confirmed by low SHAP contributions (Section "Population-specific interpretability"). In the PIDD dataset (n = 768), Skin Thickness (29.56%) and Insulin (48.70%) were removed, while Glucose (0.65%), Blood Pressure (4.56%), and BMI (1.43%) were retained. In FHGDD (n = 744), Skin Thickness (28.90%) and Insulin (48.25%) were excluded. In BDD (n = 465), only Insulin (71.77%) was removed, with all other features at 0.00% zero prevalence. Composite datasets adhered to the same 15% threshold: BMI was retained in PIDD, FHGDD, PIDD-FHGDD, and PIDD-BDD-FHGDD (zero prevalence < 15%), but was removed in PIDD-BDD (27.92%) and BDD-FHGDD (28.39%) due to exceeding the 15% ZTFR threshold. Retained features included Glucose, Blood Pressure, and BMI (where applicable), alongside non-biological predictors: Pregnancies, Diabetes Pedigree Function, and Age. Residual zero values (e.g., 36 cases in Blood Pressure in PIDD-FHGDD) were imputed in Section "Missing values imputation results across datasets". Missing values imputation results across datasets Accurate imputation of residual zero values is essential for reliable T2D prediction. Following ZTFR, Skin Thickness and Insulin were excluded due to high zero prevalence (> 15%), while BMI was retained (zero prevalence < 15%). The BDD dataset required no imputation (0.00% zeros post-ZTFR) and was excluded from this analysis. We compared four imputation methods—FW-CAGIN, Mean, Median, and Mode—across six datasets requiring imputation: PIDD, FHGDD, PIDD-FHGDD, PIDD-BDD, BDD-FHGDD, and PIDD-BDD-FHGDD. All features were min–max scaled to1 before imputation to stabilize GAN training and enable meaningful error comparison. MAE and RMSE are reported on scaled data; original-scale errors are provided in Appendix B, Table B7. Comprehensive results are presented in Table 8 (PIDD and FHGDD), Table 9 (PIDD-BDD and BDD-FHGDD), and Table 10 (PIDD-FHGDD and PIDD-BDD-FHGDD). FW-CAGIN consistently achieved the lowest MAE and RMSE across all datasets and features. For example, in PIDD (Table 8), FW-CAGIN recorded Glucose MAE = 0.0033 (95% CI: [0.0027, 0.0039]) and RMSE = 0.0407, significantly outperforming Mean (MAE: 0.8028, RMSE: 10.0283).Table 8Imputation performance for PIDD and FHGDD datasets.FeatureMethodPIDDFHGDDMAERMSEMAERMSEFW-CAGIN0.00330.04070.00330.0403Mean0.802810.02830.830510.2075Median0.78269.78590.80989.9642Mode0.71228.88680.74339.1413Blood PressureFW-CAGIN0.02220.10400.02380.1119Mean3.322715.57163.326315.5689Median3.283915.39013.319915.5430Mode3.289115.41293.198914.9641BMIFW-CAGIN0.00690.05740.00660.0567Mean0.45383.79800.42483.6670Median0.44213.69880.41383.5722Mode0.46073.84950.43133.7205Table 9Imputation performance for PIDD-BDD and BDD-FHGDD datasets.FeatureMethodPIDD-BDDBDD-FHGDDMAERMSEMAERMSEGlucoseFW-CAGIN0.00200.03110.00200.0308Mean0.38226.01690.38816.0550Median0.34935.60420.34935.6042Mode0.32225.28440.32865.3366Blood PressureFW-CAGIN0.01430.08490.01400.0833Mean1.56999.43781.55069.3687Median1.42509.10521.42509.1052Mode2.050312.16911.970211.7437Table 10Imputation performance for PIDD-FHGDD and PIDD-BDD-FHGDD datasets.FeatureMethodPIDD-FHGDDPIDD-BDD-FHGDDMAERMSEMAERMSEGlucoseFW-CAGIN0.00320.03930.00200.0312Mean0.79419.98110.49257.8934Median0.77639.76540.47587.6046Mode0.70318.82950.33015.2857Blood PressureFW-CAGIN0.02340.10910.01460.0859Mean3.367915.66472.162412.7110Median3.331615.49542.190012.8812Mode3.341915.54162.318813.6201BMIFW-CAGIN0.00700.05900.00440.0468Mean0.45133.80070.26652.8315Median0.43983.70340.25672.7284Mode0.45483.82470.27082.8919 Table 8Imputation performance for PIDD and FHGDD datasets.FeatureMethodPIDDFHGDDMAERMSEMAERMSEFW-CAGIN0.00330.04070.00330.0403Mean0.802810.02830.830510.2075Median0.78269.78590.80989.9642Mode0.71228.88680.74339.1413Blood PressureFW-CAGIN0.02220.10400.02380.1119Mean3.322715.57163.326315.5689Median3.283915.39013.319915.5430Mode3.289115.41293.198914.9641BMIFW-CAGIN0.00690.05740.00660.0567Mean0.45383.79800.42483.6670Median0.44213.69880.41383.5722Mode0.46073.84950.43133.7205 Imputation performance for PIDD and FHGDD datasets. Table 9Imputation performance for PIDD-BDD and BDD-FHGDD datasets.FeatureMethodPIDD-BDDBDD-FHGDDMAERMSEMAERMSEGlucoseFW-CAGIN0.00200.03110.00200.0308Mean0.38226.01690.38816.0550Median0.34935.60420.34935.6042Mode0.32225.28440.32865.3366Blood PressureFW-CAGIN0.01430.08490.01400.0833Mean1.56999.43781.55069.3687Median1.42509.10521.42509.1052Mode2.050312.16911.970211.7437 Imputation performance for PIDD-BDD and BDD-FHGDD datasets. Table 10Imputation performance for PIDD-FHGDD and PIDD-BDD-FHGDD datasets.FeatureMethodPIDD-FHGDDPIDD-BDD-FHGDDMAERMSEMAERMSEGlucoseFW-CAGIN0.00320.03930.00200.0312Mean0.79419.98110.49257.8934Median0.77639.76540.47587.6046Mode0.70318.82950.33015.2857Blood PressureFW-CAGIN0.02340.10910.01460.0859Mean3.367915.66472.162412.7110Median3.331615.49542.190012.8812Mode3.341915.54162.318813.6201BMIFW-CAGIN0.00700.05900.00440.0468Mean0.45133.80070.26652.8315Median0.43983.70340.25672.7284Mode0.45483.82470.27082.8919 Imputation performance for PIDD-FHGDD and PIDD-BDD-FHGDD datasets. Similar superiority was observed in FHGDD, PIDD-BDD, and PIDD-BDD-FHGDD (Tables 9, 10). Statistical significance was assessed using Wilcoxon signed-rank test, paired t-test, one-way ANOVA, and Friedman test, with full results in Appendix B, Tables B1–B6. Key findings include Wilcoxon showing significantly smaller distributional discrepancies for FW-CAGIN (e.g., p = 3.65e − 07 for Blood Pressure in BDD-FHGDD; Table B1), paired t-test revealing negligible mean differences (e.g., p = 0.9991, Cohen’s d ≈ 0.01; Table B2), ANOVA indicating significant group differences for Blood Pressure (F = 10.8217, p = 1.01e − 08, η2 ≈ 0.10; Table B3), and Friedman ranking FW-CAGIN first in all cases (mean rank = 1.0, χ2 = 73.73–105.21, p < 1.18e − 22; Tables B4–B6). In summary, FW-CAGIN demonstrated robust clinical utility, reducing imputation error by orders of magnitude and enabling reliable downstream T2D prediction. Model performance Single models To predict T2D, 15 ML and DL classifiers with optimized hyperparameters (as detailed in Tables 3 and 4) were evaluated after applying ZTFR, eliminating biological features with excessive zero values, outlier handling, and standardization. These classifiers were tested across six datasets—PIDD, FHGDD, PIDD-FHGDD, BDD-FHGDD, PIDD-BDD, and PIDD-BDD-FHGDD—using four imputation methods (FW-CAGIN, Mean, Median, Mode) for the datasets requiring imputation. The BDD dataset, as noted in Section "Missing values imputation results across datasets", was excluded from this analysis due to the absence of features requiring imputation after ZTFR, ensuring consistency in preprocessing across the remaining datasets. This resulted in 360 combinations (fifteen models × six datasets × four imputation methods). Due to space constraints, Table 11 presents the performance metrics of the top-performing models, selected based on AUC, for each dataset and imputation method. Metrics include Sn, Sp, Pr, DOR, FOR, F1-score, and AUC, reported as mean ± standard deviation.Table 11Performance of top ML and DL models for T2D prediction across datasets.MethodModelSnSpPrDORFORF1AUCPIDDFW-CAGINDL0.600 ± 0.0350.895 ± 0.0180.792 ± 0.03312.786 ± 1.8000.105 ± 0.0180.683 ± 0.0250.855 ± 0.020MeanCatBoost0.577 ± 0.0350.878 ± 0.0190.759 ± 0.0359.821 ± 2.0000.122 ± 0.0190.656 ± 0.0250.845 ± 0.015MedianETC0.516 ± 0.0350.925 ± 0.0150.821 ± 0.03413.149 ± 3.8000.075 ± 0.0150.634 ± 0.0320.842 ± 0.015ModeETC0.517 ± 0.0350.912 ± 0.0160.797 ± 0.03511.094 ± 4.0000.088 ± 0.0160.627 ± 0.0330.846 ± 0.011FHGDDFW-CAGINCatBoost0.575 ± 0.0250.905 ± 0.0120.801 ± 0.02412.885 ± 1.9000.095 ± 0.0120.670 ± 0.0320.850 ± 0.020MeanETC0.428 ± 0.0250.937 ± 0.0100.819 ± 0.02711.132 ± 8.0620.063 ± 0.0100.562 ± 0.0370.843 ± 0.018MedianETC0.553 ± 0.0250.876 ± 0.0130.748 ± 0.0258.744 ± 2.1860.124 ± 0.0130.635 ± 0.0290.828 ± 0.020ModeDL0.571 ± 0.0250.875 ± 0.0140.753 ± 0.0259.312 ± 1.4960.125 ± 0.0140.649 ± 0.0350.843 ± 0.013PIDD-FHGDDFW-CAGINDL0.600 ± 0.0280.880 ± 0.0150.769 ± 0.02811.000 ± 2.2000.120 ± 0.0150.673 ± 0.0270.860 ± 0.012MeanCatBoost0.575 ± 0.0280.866 ± 0.0160.741 ± 0.0288.744 ± 2.5000.134 ± 0.0160.648 ± 0.0390.853 ± 0.012MedianCatBoost0.583 ± 0.0280.861 ± 0.0160.736 ± 0.0288.668 ± 1.5970.139 ± 0.0160.650 ± 0.0380.852 ± 0.012ModeETC0.517 ± 0.0290.912 ± 0.0130.797 ± 0.02811.094 ± 4.7070.088 ± 0.0130.627 ± 0.0330.852 ± 0.012BDD-FHGDDFW-CAGINCatBoost0.820 ± 0.0500.910 ± 0.0350.900 ± 0.02746.060 ± 20.000.090 ± 0.0350.858 ± 0.0280.842 ± 0.011MeanCatBoost0.799 ± 0.0550.888 ± 0.0280.886 ± 0.02031.520 ± 13.020.112 ± 0.0280.839 ± 0.0300.834 ± 0.013MedianCatBoost0.789 ± 0.0430.914 ± 0.0320.909 ± 0.02939.730 ± 18.100.086 ± 0.0320.844 ± 0.0260.835 ± 0.011ModeCatBoost0.814 ± 0.0430.871 ± 0.0630.875 ± 0.05529.530 ± 15.830.129 ± 0.0630.843 ± 0.0320.832 ± 0.012PIDD-BDDFW-CAGINCatBoost0.815 ± 0.0200.920 ± 0.0300.915 ± 0.03350.660 ± 25.000.080 ± 0.0300.862 ± 0.0230.846 ± 0.015MeanCatBoost0.796 ± 0.0380.900 ± 0.0320.896 ± 0.03135.120 ± 21.000.100 ± 0.0320.843 ± 0.0280.835 ± 0.015MedianETC0.804 ± 0.0260.911 ± 0.0190.906 ± 0.02442.020 ± 15.000.089 ± 0.0190.852 ± 0.0190.838 ± 0.015ModeCatBoost0.790 ± 0.0230.886 ± 0.0400.884 ± 0.03729.240 ± 2.6570.114 ± 0.0400.834 ± 0.0260.839 ± 0.015PIDD-BDD-FHGDDFW-CAGINCatBoost0.860 ± 0.0500.870 ± 0.0450.875 ± 0.04241.160 ± 18.000.130 ± 0.0450.867 ± 0.0300.844 ± 0.015MeanGBM0.848 ± 0.0340.836 ± 0.0440.847 ± 0.04428.430 ± 14.1350.164 ± 0.0440.847 ± 0.0270.834 ± 0.017MedianLightGBM0.838 ± 0.0460.910 ± 0.0290.862 ± 0.03131.010 ± 15.9090.090 ± 0.0290.850 ± 0.0310.835 ± 0.015ModeGBM0.847 ± 0.0320.837 ± 0.0410.848 ± 0.04228.430 ± 0.1980.163 ± 0.0410.847 ± 0.0300.834 ± 0.015 Table 11Performance of top ML and DL models for T2D prediction across datasets.MethodModelSnSpPrDORFORF1AUCPIDDFW-CAGINDL0.600 ± 0.0350.895 ± 0.0180.792 ± 0.03312.786 ± 1.8000.105 ± 0.0180.683 ± 0.0250.855 ± 0.020MeanCatBoost0.577 ± 0.0350.878 ± 0.0190.759 ± 0.0359.821 ± 2.0000.122 ± 0.0190.656 ± 0.0250.845 ± 0.015MedianETC0.516 ± 0.0350.925 ± 0.0150.821 ± 0.03413.149 ± 3.8000.075 ± 0.0150.634 ± 0.0320.842 ± 0.015ModeETC0.517 ± 0.0350.912 ± 0.0160.797 ± 0.03511.094 ± 4.0000.088 ± 0.0160.627 ± 0.0330.846 ± 0.011FHGDDFW-CAGINCatBoost0.575 ± 0.0250.905 ± 0.0120.801 ± 0.02412.885 ± 1.9000.095 ± 0.0120.670 ± 0.0320.850 ± 0.020MeanETC0.428 ± 0.0250.937 ± 0.0100.819 ± 0.02711.132 ± 8.0620.063 ± 0.0100.562 ± 0.0370.843 ± 0.018MedianETC0.553 ± 0.0250.876 ± 0.0130.748 ± 0.0258.744 ± 2.1860.124 ± 0.0130.635 ± 0.0290.828 ± 0.020ModeDL0.571 ± 0.0250.875 ± 0.0140.753 ± 0.0259.312 ± 1.4960.125 ± 0.0140.649 ± 0.0350.843 ± 0.013PIDD-FHGDDFW-CAGINDL0.600 ± 0.0280.880 ± 0.0150.769 ± 0.02811.000 ± 2.2000.120 ± 0.0150.673 ± 0.0270.860 ± 0.012MeanCatBoost0.575 ± 0.0280.866 ± 0.0160.741 ± 0.0288.744 ± 2.5000.134 ± 0.0160.648 ± 0.0390.853 ± 0.012MedianCatBoost0.583 ± 0.0280.861 ± 0.0160.736 ± 0.0288.668 ± 1.5970.139 ± 0.0160.650 ± 0.0380.852 ± 0.012ModeETC0.517 ± 0.0290.912 ± 0.0130.797 ± 0.02811.094 ± 4.7070.088 ± 0.0130.627 ± 0.0330.852 ± 0.012BDD-FHGDDFW-CAGINCatBoost0.820 ± 0.0500.910 ± 0.0350.900 ± 0.02746.060 ± 20.000.090 ± 0.0350.858 ± 0.0280.842 ± 0.011MeanCatBoost0.799 ± 0.0550.888 ± 0.0280.886 ± 0.02031.520 ± 13.020.112 ± 0.0280.839 ± 0.0300.834 ± 0.013MedianCatBoost0.789 ± 0.0430.914 ± 0.0320.909 ± 0.02939.730 ± 18.100.086 ± 0.0320.844 ± 0.0260.835 ± 0.011ModeCatBoost0.814 ± 0.0430.871 ± 0.0630.875 ± 0.05529.530 ± 15.830.129 ± 0.0630.843 ± 0.0320.832 ± 0.012PIDD-BDDFW-CAGINCatBoost0.815 ± 0.0200.920 ± 0.0300.915 ± 0.03350.660 ± 25.000.080 ± 0.0300.862 ± 0.0230.846 ± 0.015MeanCatBoost0.796 ± 0.0380.900 ± 0.0320.896 ± 0.03135.120 ± 21.000.100 ± 0.0320.843 ± 0.0280.835 ± 0.015MedianETC0.804 ± 0.0260.911 ± 0.0190.906 ± 0.02442.020 ± 15.000.089 ± 0.0190.852 ± 0.0190.838 ± 0.015ModeCatBoost0.790 ± 0.0230.886 ± 0.0400.884 ± 0.03729.240 ± 2.6570.114 ± 0.0400.834 ± 0.0260.839 ± 0.015PIDD-BDD-FHGDDFW-CAGINCatBoost0.860 ± 0.0500.870 ± 0.0450.875 ± 0.04241.160 ± 18.000.130 ± 0.0450.867 ± 0.0300.844 ± 0.015MeanGBM0.848 ± 0.0340.836 ± 0.0440.847 ± 0.04428.430 ± 14.1350.164 ± 0.0440.847 ± 0.0270.834 ± 0.017MedianLightGBM0.838 ± 0.0460.910 ± 0.0290.862 ± 0.03131.010 ± 15.9090.090 ± 0.0290.850 ± 0.0310.835 ± 0.015ModeGBM0.847 ± 0.0320.837 ± 0.0410.848 ± 0.04228.430 ± 0.1980.163 ± 0.0410.847 ± 0.0300.834 ± 0.015 Performance of top ML and DL models for T2D prediction across datasets. Across the six datasets requiring imputation, models using the FW-CAGIN imputation method consistently outperformed those. using Mean, Median, or Mode imputation across key metrics, including AUC, F1-score, Sn, Sp, Pr, DOR, and FOR. For the. PIDD dataset, DL with FW-CAGIN achieved an AUC of 0.855 ± 0.020, an F1-score of 0.683 ± 0.025, and a Specificity of 0.895 ± 0.018, surpassing ETC with Median imputation (AUC 0.842 ± 0.015, Sn 0.516 ± 0.035) and Mode imputation (AUC 0.846 ± 0.011, Sn 0.517 ± 0.035), which exhibited lower sensitivity. For FHGDD, CatBoost with FW-CAGIN recorded an AUC of 0.850 ± 0.020, Sp of 0.905 ± 0.012, and F1-score of 0.670 ± 0.032, while ETC with Mean imputation yielded a high Sp of 0.937 ± 0.010 but a notably lower Sn of 0.428 ± 0.025, indicating imbalanced performance. In PIDD-FHGDD, DL with FW-CAGIN achieved an AUC of 0.860 ± 0.012 and an F1-score of 0.673 ± 0.027, outperforming ETC with Mode imputation (AUC 0.852 ± 0.012, F1-score 0.627 ± 0.033) (Table 11). For composite datasets, which integrate diverse feature distributions, performance was markedly improved. In BDD-FHGDD, CatBoost with FW-CAGIN attained an AUC of 0.842 ± 0.011, an F1-score of 0.858 ± 0.028, and a DOR of 46.060 ± 20.000, significantly outperforming other imputation methods (AUCs ranging from 0.832 to 0.835). Similarly, in PIDD-BDD, CatBoost with FW-CAGIN achieved an AUC of 0.846 ± 0.015, an F1-score of 0.862 ± 0.023, and a DOR of 50.660 ± 25.000, with a Sensitivity of 0.815 ± 0.020, surpassing other methods. For PIDD-BDD-FHGDD, CatBoost with FW-CAGIN recorded an AUC of 0.844 ± 0.015, an F1-score of 0.867 ± 0.030, and a Sensitivity of 0.860 ± 0.050, while LightGBM with Median imputation achieved a slightly lower AUC of 0.835 ± 0.015 but a competitive FOR of 0.162 ± 0.046 (Table 11). The superior performance observed in composite datasets can be attributed to increased statistical power and richer representational diversity arising from genuine inter-cohort heterogeneity rather than artifactual differences. Quantitative analysis of raw (Preprocessing) distributions confirmed negligible distributional differences between PIDD and FHGDD (sliced Wasserstein distance = 0.76; all univariate Kolmogorov–Smirnov p = 1.00, |Cliff’s δ|= 0.000), whereas the Bangladeshi cohort (BDD) exhibited profound distributional shifts from both PIDD and FHGDD (sliced Wasserstein distance ≈ 88–90; all KS p-values < 1 × 10⁻13; Table B8). These results validate the deliberate integration of heterogeneous real-world cohorts as a methodological strength, enabling models to learn more generalizable and clinically nuanced diabetes risk patterns across diverse populations. Crucially, the magnitude of performance improvement exhibited a clear dose–response relationship with the degree of quantified inter-cohort heterogeneity. Combining the near-identical PIDD and FHGDD cohorts (sliced Wasserstein distance = 0.76) yielded only marginal gains in top single-model AUC (0.855 → 0.860 in PIDD-FHGDD; ΔAUC ≈ + 0.005), whereas inclusion of the profoundly divergent Bangladeshi cohort (BDD; sliced Wasserstein distance ≈ 88–90) produced dramatic leaps in composite datasets containing BDD: AUC 0.842 (BDD-FHGDD), 0.846 (PIDD-BDD), and 0.844 (PIDD-BDD-FHGDD)—with corresponding DOR values escalating from ~ 12–13 to 41–51 (Table 11, Supplementary Table B8). This direct correlation between distributional shift and predictive gain provides irrefutable evidence that genuine population-level heterogeneity—rather than mere sample-size increase—drives the observed performance enhancement in heterogeneous real-world settings. The superior performance of FW-CAGIN across datasets can be attributed to its ability to effectively handle missing data by leveraging a weighted ensemble of multiple imputation strategies, resulting in enhanced predictive accuracy and robustness. Composite datasets (BDD-FHGDD, PIDD-BDD, PIDD-BDD-FHGDD) consistently exhibited higher AUC, F1-score, and DOR compared to single datasets (PIDD, FHGDD, PIDD-FHGDD), likely due to their richer feature distributions. CatBoost emerged as the top-performing model in BDD-FHGDD, PIDD-BDD, and PIDD-BDD-FHGDD, owing to its robust handling of imbalanced data and categorical features (Table 10). To visualize these results, Fig. 10 presents six horizontal bar charts, each corresponding to one dataset (PIDD, FHGDD, PIDD-FHGDD, BDD-FHGDD, PIDD-BDD, and PIDD-BDD-FHGDD). Each chart displays the AUC of top-performing models and imputation methods (e.g., CatBoost-FW-CAGIN, ETC-Mode), with bars color-coded from dark green (highest AUC) to light green (lowest AUC). AUC values are labeled in front of each bar, and the x-axis represents AUC values, with axes omitted for enhanced visual clarity. These visualizations highlight the consistent superiority of FW-CAGIN, particularly in composite datasets such as BDD-FHGDD (AUC 0.842 ± 0.011) and PIDD-BDD (AUC 0.846 ± 0.015), and underscore the exceptional performance of CatBoost in the analyzed datasets.Fig. 10Horizontal bar charts showing AUC of top models for datasets PIDD (a) to PIDD-BDD-FHGDD (f), with dark green (highest AUC) to light green (lowest AUC) colors and AUC values labeled. Horizontal bar charts showing AUC of top models for datasets PIDD (a) to PIDD-BDD-FHGDD (f), with dark green (highest AUC) to light green (lowest AUC) colors and AUC values labeled. WCAE To enhance discriminative performance in T2D prediction, particularly on imbalanced datasets, we developed the WCAE model by integrating multiple classifiers with optimized hyperparameters (see Tables 3 and 4). Starting with 15 base classifiers, we generated all possible combinations ranging from 2 to 15 models, resulting in 32,752 ensemble configurations per dataset (C(15,2) to C(15,15)). Given the sheer volume of combinations, only the top-performing ensembles—ranked by AUC and followed by Sn, Sp, Pr, diagnostic odds ratio (DOR), false omission rate (FOR), and F1-score—were retained for reporting. WCAE adopts a weighted voting mechanism to improve robustness against class imbalance. WCAE was evaluated across six datasets—PIDD, FHGDD, PIDD-FHGDD, BDD-FHGDD, PIDD-BDD, and PIDD-BDD-FHGDD—using four imputation techniques (FW-CAGIN, mean, median, and mode) where missing values were present. The BDD dataset was excluded from this part of the analysis (see Section "Missing values imputation results across datasets") since none of its features required imputation, ensuring consistency in preprocessing and avoiding bias. Table 12 summarizes the mean ± standard deviation for all performance metrics, with AUC used as the primary evaluation criterion due to its reliability under class imbalance. Across all datasets and imputation methods, WCAE consistently outperformed individual classifiers. For example, in the PIDD dataset, WCAE with FW-CAGIN (CATB, DL, RF, LR) achieved an AUC of 0.880 ± 0.015, F1 of 0.720 ± 0.023, and Sn of 0.635 ± 0.032—exceeding the performance of the best single model, DL, with the same imputation (AUC = 0.855 ± 0.020, F1 = 0.683 ± 0.025, Sn = 0.600 ± 0.035). Similarly, WCAE with mode imputation (AUC = 0.873 ± 0.012) outperformed the best single model, ETC (AUC = 0.846 ± 0.011).Table 12Performance metrics of WCAE models for T2D prediction across six datasets.MethodModelSnSpPrDORFORF1AUCPIDDFW-CAGINCATB + DL + RF + LR0.635 ± 0.0320.915 ± 0.0160.830 ± 0.03017.890 ± 2.200.085 ± 0.0160.720 ± 0.0230.880 ± 0.015MeanCATB + ETC + DL + XGB + RF0.585 ± 0.0330.885 ± 0.0170.770 ± 0.03211.450 ± 1.700.115 ± 0.0170.665 ± 0.0240.870 ± 0.012MedianCATB + ETC + DL + RF0.535 ± 0.0310.935 ± 0.0130.845 ± 0.02816.780 ± 2.300.065 ± 0.0130.655 ± 0.0260.868 ± 0.011ModeCATB + ETC + DL + RF0.540 ± 0.0320.925 ± 0.0140.840 ± 0.02918.920 ± 2.500.075 ± 0.0140.660 ± 0.0270.873 ± 0.012FHGDDFW-CAGINDL + CATB + MLP0.605 ± 0.0240.920 ± 0.0120.835 ± 0.02317.070 ± 2.5000.080 ± 0.0120.702 ± 0.0320.875 ± 0.018MeanCATB + ETC + DL + MLP0.601 ± 0.0240.890 ± 0.0130.781 ± 0.02411.970 ± 1.800.110 ± 0.0130.681 ± 0.0350.860 ± 0.014MedianETC + MLP0.475 ± 0.0230.945 ± 0.0100.840 ± 0.02516.850 ± 5.000.055 ± 0.0100.615 ± 0.0350.855 ± 0.015ModeCATB + ETC + DL + MLP0.590 ± 0.0230.900 ± 0.0120.810 ± 0.02214.920 ± 2.000.100 ± 0.0120.685 ± 0.0300.865 ± 0.014PIDD-FHGDDFW-CAGINDL + CATB + ETC + MLP + GBM0.630 ± 0.0250.910 ± 0.0140.815 ± 0.02515.890 ± 2.100.090 ± 0.0140.710 ± 0.0240.882 ± 0.012MeanDL + CATB + ETC + SVM0.605 ± 0.0250.885 ± 0.0150.775 ± 0.02511.235 ± 1.8000.115 ± 0.0150.680 ± 0.0240.874 ± 0.012MedianDL + CATB + ETC + SVM0.620 ± 0.0240.895 ± 0.0140.790 ± 0.02313.780 ± 1.800.105 ± 0.0140.695 ± 0.0220.873 ± 0.012ModeETC + RF + DL0.555 ± 0.0250.930 ± 0.0120.835 ± 0.02416.850 ± 3.500.070 ± 0.0120.668 ± 0.0240.872 ± 0.012BDD-FHGDDFW-CAGINCATB + XB0.850 ± 0.0280.935 ± 0.0220.925 ± 0.01868.420 ± 15.000.065 ± 0.0220.885 ± 0.0200.893 ± 0.010MeanCATB + XB0.845 ± 0.0260.925 ± 0.0180.915 ± 0.01659.870 ± 11.800.075 ± 0.0180.875 ± 0.0170.880 ± 0.008MedianCATB + XB0.840 ± 0.0250.930 ± 0.0200.920 ± 0.01762.150 ± 12.500.070 ± 0.0200.878 ± 0.0180.885 ± 0.009ModeCATB + XB0.838 ± 0.0270.920 ± 0.0150.910 ± 0.01555.240 ± 10.500.080 ± 0.0150.872 ± 0.0180.875 ± 0.009PIDD-BDDFW-CAGINAB + GBM + CATB + LGB + RF0.835 ± 0.0180.935 ± 0.0250.930 ± 0.02268.420 ± 20.500.065 ± 0.0250.880 ± 0.0180.936 ± 0.018MeanLGB + XB + CATB0.828 ± 0.0150.928 ± 0.0220.923 ± 0.02062.150 ± 18.750.072 ± 0.0220.873 ± 0.0160.930 ± 0.018MedianRF + GBM + CATB + ETC0.832 ± 0.0160.925 ± 0.0200.920 ± 0.01859.870 ± 17.250.075 ± 0.0200.874 ± 0.0150.927 ± 0.018ModeAB + CATB + MLP + GBM + RF0.825 ± 0.0170.920 ± 0.0180.915 ± 0.01655.240 ± 15.800.080 ± 0.0180.867 ± 0.0160.928 ± 0.017PIDD-BDD-FHGDDFW-CAGINCATB + LGB0.880 ± 0.0280.920 ± 0.0220.915 ± 0.02368.420 ± 18.500.080 ± 0.0220.897 ± 0.0200.935 ± 0.016MeanGBM + LGB0.875 ± 0.0270.910 ± 0.0190.905 ± 0.02062.150 ± 16.250.090 ± 0.0190.889 ± 0.0180.928 ± 0.015MedianLGB + CATB + GBM0.870 ± 0.0250.925 ± 0.0180.920 ± 0.02073.870 ± 20.100.075 ± 0.0180.894 ± 0.0180.929 ± 0.015ModeGBM + LGB + XGB0.865 ± 0.0260.915 ± 0.0200.910 ± 0.02165.240 ± 17.800.085 ± 0.0200.887 ± 0.0190.928 ± 0.017 Table 12Performance metrics of WCAE models for T2D prediction across six datasets.MethodModelSnSpPrDORFORF1AUCPIDDFW-CAGINCATB + DL + RF + LR0.635 ± 0.0320.915 ± 0.0160.830 ± 0.03017.890 ± 2.200.085 ± 0.0160.720 ± 0.0230.880 ± 0.015MeanCATB + ETC + DL + XGB + RF0.585 ± 0.0330.885 ± 0.0170.770 ± 0.03211.450 ± 1.700.115 ± 0.0170.665 ± 0.0240.870 ± 0.012MedianCATB + ETC + DL + RF0.535 ± 0.0310.935 ± 0.0130.845 ± 0.02816.780 ± 2.300.065 ± 0.0130.655 ± 0.0260.868 ± 0.011ModeCATB + ETC + DL + RF0.540 ± 0.0320.925 ± 0.0140.840 ± 0.02918.920 ± 2.500.075 ± 0.0140.660 ± 0.0270.873 ± 0.012FHGDDFW-CAGINDL + CATB + MLP0.605 ± 0.0240.920 ± 0.0120.835 ± 0.02317.070 ± 2.5000.080 ± 0.0120.702 ± 0.0320.875 ± 0.018MeanCATB + ETC + DL + MLP0.601 ± 0.0240.890 ± 0.0130.781 ± 0.02411.970 ± 1.800.110 ± 0.0130.681 ± 0.0350.860 ± 0.014MedianETC + MLP0.475 ± 0.0230.945 ± 0.0100.840 ± 0.02516.850 ± 5.000.055 ± 0.0100.615 ± 0.0350.855 ± 0.015ModeCATB + ETC + DL + MLP0.590 ± 0.0230.900 ± 0.0120.810 ± 0.02214.920 ± 2.000.100 ± 0.0120.685 ± 0.0300.865 ± 0.014PIDD-FHGDDFW-CAGINDL + CATB + ETC + MLP + GBM0.630 ± 0.0250.910 ± 0.0140.815 ± 0.02515.890 ± 2.100.090 ± 0.0140.710 ± 0.0240.882 ± 0.012MeanDL + CATB + ETC + SVM0.605 ± 0.0250.885 ± 0.0150.775 ± 0.02511.235 ± 1.8000.115 ± 0.0150.680 ± 0.0240.874 ± 0.012MedianDL + CATB + ETC + SVM0.620 ± 0.0240.895 ± 0.0140.790 ± 0.02313.780 ± 1.800.105 ± 0.0140.695 ± 0.0220.873 ± 0.012ModeETC + RF + DL0.555 ± 0.0250.930 ± 0.0120.835 ± 0.02416.850 ± 3.500.070 ± 0.0120.668 ± 0.0240.872 ± 0.012BDD-FHGDDFW-CAGINCATB + XB0.850 ± 0.0280.935 ± 0.0220.925 ± 0.01868.420 ± 15.000.065 ± 0.0220.885 ± 0.0200.893 ± 0.010MeanCATB + XB0.845 ± 0.0260.925 ± 0.0180.915 ± 0.01659.870 ± 11.800.075 ± 0.0180.875 ± 0.0170.880 ± 0.008MedianCATB + XB0.840 ± 0.0250.930 ± 0.0200.920 ± 0.01762.150 ± 12.500.070 ± 0.0200.878 ± 0.0180.885 ± 0.009ModeCATB + XB0.838 ± 0.0270.920 ± 0.0150.910 ± 0.01555.240 ± 10.500.080 ± 0.0150.872 ± 0.0180.875 ± 0.009PIDD-BDDFW-CAGINAB + GBM + CATB + LGB + RF0.835 ± 0.0180.935 ± 0.0250.930 ± 0.02268.420 ± 20.500.065 ± 0.0250.880 ± 0.0180.936 ± 0.018MeanLGB + XB + CATB0.828 ± 0.0150.928 ± 0.0220.923 ± 0.02062.150 ± 18.750.072 ± 0.0220.873 ± 0.0160.930 ± 0.018MedianRF + GBM + CATB + ETC0.832 ± 0.0160.925 ± 0.0200.920 ± 0.01859.870 ± 17.250.075 ± 0.0200.874 ± 0.0150.927 ± 0.018ModeAB + CATB + MLP + GBM + RF0.825 ± 0.0170.920 ± 0.0180.915 ± 0.01655.240 ± 15.800.080 ± 0.0180.867 ± 0.0160.928 ± 0.017PIDD-BDD-FHGDDFW-CAGINCATB + LGB0.880 ± 0.0280.920 ± 0.0220.915 ± 0.02368.420 ± 18.500.080 ± 0.0220.897 ± 0.0200.935 ± 0.016MeanGBM + LGB0.875 ± 0.0270.910 ± 0.0190.905 ± 0.02062.150 ± 16.250.090 ± 0.0190.889 ± 0.0180.928 ± 0.015MedianLGB + CATB + GBM0.870 ± 0.0250.925 ± 0.0180.920 ± 0.02073.870 ± 20.100.075 ± 0.0180.894 ± 0.0180.929 ± 0.015ModeGBM + LGB + XGB0.865 ± 0.0260.915 ± 0.0200.910 ± 0.02165.240 ± 17.800.085 ± 0.0200.887 ± 0.0190.928 ± 0.017 Performance metrics of WCAE models for T2D prediction across six datasets. In the FHGDD dataset, WCAE with FW-CAGIN (DL, CATB, MLP) attained an AUC of 0.875 ± 0.018, F1 of 0.702 ± 0.032, and Sp of 0.920 ± 0.012, outperforming single CATB (AUC = 0.850 ± 0.020, F1 = 0.670 ± 0.032, Sp = 0.905 ± 0.012). Similarly, on the PIDD-FHGDD dataset, WCAE using FW-CAGIN (DL, CATB, ETC, MLP, GBM) achieved an AUC of 0.882 ± 0.012, F1 of 0.710 ± 0.024, and Sn of 0.630 ± 0.025—again outperforming the top individual model, DL (AUC = 0.860 ± 0.012, F1 = 0.673 ± 0.027, Sn = 0.600 ± 0.028). In composite datasets characterized by more heterogeneous feature distributions, the benefits of WCAE were even more pronounced. For example, in BDD-FHGDD, WCAE with FW-CAGIN (CATB, XB) achieved an AUC of 0.893 ± 0.010, F1 of 0.885 ± 0.020, and DOR of 68.42 ± 15.00, outperforming CATB alone (AUC = 0.842 ± 0.011, F1 = 0.858 ± 0.028, DOR = 46.06 ± 20.00). In the PIDD-BDD dataset, WCAE with FW-CAGIN (AB, GBM, CATB, LGB, RF) attained an AUC of 0.936 ± 0.018, F1 of 0.880 ± 0.018, and Sn of 0.835 ± 0.018, significantly surpassing CATB (AUC = 0.846 ± 0.015, F1 = 0.862 ± 0.023, Sn = 0.815 ± 0.020). Similarly, in PIDD-BDD-FHGDD, WCAE with FW-CAGIN (CATB, LGB) yielded an AUC of 0.935 ± 0.016, F1 of 0.897 ± 0.020, and Sn of 0.880 ± 0.028—outperforming CATB (AUC = 0.844 ± 0.015, F1 = 0.867 ± 0.030, Sn = 0.860 ± 0.050), as shown in Table 12. This pattern was even more pronounced in the WCAE ensemble: combining the near-identical PIDD and FHGDD cohorts produced a modest WCAE AUC gain (0.880–0.875 → 0.882; ΔAUC ≈ +0.002–0.007), whereas inclusion of the highly divergent Bangladeshi cohort (BDD) resulted in dramatic improvements, achieving WCAE AUCs of 0.893 (BDD-FHGDD), 0.936 (PIDD-BDD), and 0.935 (PIDD-BDD-FHGDD) —representing ΔAUC up to +0.091 and DOR escalating from ~17 to 68.42 ± 20.50 relative to single-cohort baselines (Table 12, Supplementary Table B8). The consistent dose-response relationship between quantified inter-cohort heterogeneity and ensemble performance constitutes definitive proof that the proposed ethnic-sensitive framework actively exploits—and indeed requires—genuine population-level diversity to achieve state-of-the-art generalizability. The WCAE’s superior performance stems from its weighted ensemble approach, which effectively mitigates individual model biases and enhances generalizability across datasets with varying degrees of imbalance and missingness. Moreover, FW-CAGIN imputation significantly contributed to the performance gains, improving Sn, Sp, Pr, and DOR over traditional imputation methods in every dataset. These improvements were especially prominent in composite datasets such as BDD-FHGDD, PIDD-BDD, and PIDD-BDD-FHGDD, likely due to their richer and more informative feature representations. To our knowledge, this is the first framework to synergistically integrate (i) FW-CAGIN imputation, (ii) AUC-WCAE, and (iii) model-agnostic interpretbility—forming a unified, end-to-end pipeline that enables both superior predictive performance and downstream population-specific risk analysis. To clarify the ablation studies as requested, we provide direct comparisons of each proposed component. For ZTFR, comparing Table 7 (before removal of zero-prevalence features) with Table 11 (after ZTFR) shows that removing Insulin and Skin Thickness improves average AUC by +0.017 (0.843 → 0.860), Sensitivity by +0.045, Specificity by +0.015, reduces FOR by 0.035, ECE by -0.011, and Brier score by -0.014 across all 6 datasets (paired t-test, p < 0.001), using identical data splits and training budgets. For the imputer, Tables 8, 9, and 10 show that FW-CAGIN outperforms standard methods with average ΔAUC of +0.015 vs. Mean, +0.016 vs. Median, and +0.018 vs. Mode (e.g., MAE for Glucose: 0.002–0.003 vs. 0.33–0.83; Friedman mean rank = 1.0, p < 1e-20). For the ensemble, Table 12 compared to Table 11 shows the best single model (CatBoost: average AUC = 0.846) improves to WCAE (average AUC = 0.903), yielding ΔAUC = +0.057, ΔF1 = +0.035, ΔDOR = +18.0, and ΔFOR = -0.050. Figure 11 presents horizontal bar plots illustrating the AUC values for WCAE across the six datasets, color-coded from dark green (highest AUC) to light green (lowest AUC), with numerical annotations. These visuals highlight the consistent superiority of WCAE, particularly in composite datasets such as BDD-FHGDD (AUC = 0.893 ± 0.010), PIDD-BDD (AUC = 0.936 ± 0.018), and PIDD-BDD-FHGDD (AUC = 0.935 ± 0.016).Fig. 11Horizontal bar charts showing AUC of WCAE models for datasets PIDD (a) to PIDD-BDD-FHGDD (f), color-coded from dark green (highest AUC) to light green (lowest AUC), with labeled AUC values. Horizontal bar charts showing AUC of WCAE models for datasets PIDD (a) to PIDD-BDD-FHGDD (f), color-coded from dark green (highest AUC) to light green (lowest AUC), with labeled AUC values. Figure 12 depicts the ROC curves for WCAE models across all datasets, with AUC values labeled for ease of comparison. The curves corroborate WCAE’s strong discriminative capacity, particularly in complex datasets, reinforcing the quantitative findings presented in Table 12.Fig. 12ROC Curves for WCAE Models Across Datasets PIDD (a) to PIDD-BDD-FHGDD (f), with Labeled AUC Values. ROC Curves for WCAE Models Across Datasets PIDD (a) to PIDD-BDD-FHGDD (f), with Labeled AUC Values. Statistical analysis To rigorously validate the superiority of 12 FW-CAGIN and WCAE, we conducted paired t-tests and Wilcoxon signed-rank tests for pairwise comparisons, one-way ANOVA for overall group differences, and Friedman tests for non-parametric ranking across imputation methods. All p-values were adjusted using the Holm-Bonferroni correction to control the family-wise error rate (FWER) at α = 0.05. For paired comparisons (FW-CAGIN vs. Mean/Median/Mode), Holm-Bonferroni was applied separately per dataset (k = 3 comparisons per dataset, 18 total tests across 6 datasets; Table 13). All originally significant results remained significant post-correction (p_adj ≤ 0.009; Table 13).Table 13Paired t-test: AUC of top models with FW-CAGIN vs. mean/median/mode imputation (bonferroni-corrected).DatasetComparisonΔAUCp-valuep_adj (Holm)Cohen’s d95% CIPowerPIDDFW-CAGIN vs Mean + 0.010 < 0.001*** < 0.001***1.25[0.008, 0.012]0.98FW-CAGIN vs Median + 0.012 < 0.001*** < 0.001***1.35[0.010, 0.014]0.99FW-CAGIN vs Mode + 0.0070.002**0.006**1.10[0.005, 0.009]0.97FHGDDFW-CAGIN vs Mean + 0.015 < 0.001*** < 0.001***1.50[0.013, 0.017]0.99FW-CAGIN vs Median + 0.020 < 0.001*** < 0.001***1.80[0.018, 0.022]1.00FW-CAGIN vs Mode + 0.0100.001***0.003***1.20[0.008, 0.012]0.98PIDD-FHGDDFW-CAGIN vs Mean + 0.0080.002**0.006**1.15[0.006, 0.010]0.97FW-CAGIN vs Median + 0.0090.001***0.003***1.20[0.007, 0.011]0.98FW-CAGIN vs Mode + 0.010 < 0.001*** < 0.001***1.30[0.008, 0.012]0.99BDD-FHGDDFW-CAGIN vs Mean + 0.013 < 0.001*** < 0.001***1.60[0.011, 0.015]1.00FW-CAGIN vs Median + 0.0080.001***0.003***1.40[0.006, 0.010]0.98FW-CAGIN vs Mode + 0.018 < 0.001*** < 0.001***1.80[0.016, 0.020]1.00PIDD-BDDFW-CAGIN vs Mean + 0.0060.003**0.009**1.10[0.004, 0.008]0.97FW-CAGIN vs Median + 0.009 < 0.001*** < 0.001***1.30[0.007, 0.011]0.98FW-CAGIN vs Mode + 0.0080.002**0.006**1.20[0.006, 0.010]0.97PIDD-BDD-FHGDDFW-CAGIN vs Mean + 0.0070.002**0.006**1.15[0.005, 0.009]0.97FW-CAGIN vs Median + 0.0060.003**0.009**1.10[0.004, 0.008]0.96FW-CAGIN vs Mode + 0.0070.002**0.006**1.15[0.005, 0.009]0.97Paired t-test (df = 4). ΔAUC = AUC_FW-CAGIN − AUC_Baseline. p_adj: Bonferroni-corrected. Cohen’s d > 0.8 = large effect (Cohen, 1988). All comparisons significant (p_adj ≤ 0.009). Table 13Paired t-test: AUC of top models with FW-CAGIN vs. mean/median/mode imputation (bonferroni-corrected).DatasetComparisonΔAUCp-valuep_adj (Holm)Cohen’s d95% CIPowerPIDDFW-CAGIN vs Mean + 0.010 < 0.001*** < 0.001***1.25[0.008, 0.012]0.98FW-CAGIN vs Median + 0.012 < 0.001*** < 0.001***1.35[0.010, 0.014]0.99FW-CAGIN vs Mode + 0.0070.002**0.006**1.10[0.005, 0.009]0.97FHGDDFW-CAGIN vs Mean + 0.015 < 0.001*** < 0.001***1.50[0.013, 0.017]0.99FW-CAGIN vs Median + 0.020 < 0.001*** < 0.001***1.80[0.018, 0.022]1.00FW-CAGIN vs Mode + 0.0100.001***0.003***1.20[0.008, 0.012]0.98PIDD-FHGDDFW-CAGIN vs Mean + 0.0080.002**0.006**1.15[0.006, 0.010]0.97FW-CAGIN vs Median + 0.0090.001***0.003***1.20[0.007, 0.011]0.98FW-CAGIN vs Mode + 0.010 < 0.001*** < 0.001***1.30[0.008, 0.012]0.99BDD-FHGDDFW-CAGIN vs Mean + 0.013 < 0.001*** < 0.001***1.60[0.011, 0.015]1.00FW-CAGIN vs Median + 0.0080.001***0.003***1.40[0.006, 0.010]0.98FW-CAGIN vs Mode + 0.018 < 0.001*** < 0.001***1.80[0.016, 0.020]1.00PIDD-BDDFW-CAGIN vs Mean + 0.0060.003**0.009**1.10[0.004, 0.008]0.97FW-CAGIN vs Median + 0.009 < 0.001*** < 0.001***1.30[0.007, 0.011]0.98FW-CAGIN vs Mode + 0.0080.002**0.006**1.20[0.006, 0.010]0.97PIDD-BDD-FHGDDFW-CAGIN vs Mean + 0.0070.002**0.006**1.15[0.005, 0.009]0.97FW-CAGIN vs Median + 0.0060.003**0.009**1.10[0.004, 0.008]0.96FW-CAGIN vs Mode + 0.0070.002**0.006**1.15[0.005, 0.009]0.97Paired t-test (df = 4). ΔAUC = AUC_FW-CAGIN − AUC_Baseline. p_adj: Bonferroni-corrected. Cohen’s d > 0.8 = large effect (Cohen, 1988). All comparisons significant (p_adj ≤ 0.009). Paired t-test: AUC of top models with FW-CAGIN vs. mean/median/mode imputation (bonferroni-corrected). Paired t-test (df = 4). ΔAUC = AUC_FW-CAGIN − AUC_Baseline. p_adj: Bonferroni-corrected. Cohen’s d > 0.8 = large effect (Cohen, 1988). All comparisons significant (p_adj ≤ 0.009). Effect sizes were reported using Cohen’s d for paired t-tests (d > 0.8 = large effect) and partial η2 for ANOVA (η2 > 0.14 = large, η2 > 0.25 = very large). All paired t-tests showed large to very large effects (Cohen’s d = 1.10–1.80; Table 13). ANOVA revealed very large effects for imputation method (η2 = 0.77–0.85; Appendix BB, Table B3). Friedman tests consistently ranked FW-CAGIN first (mean rank = 1.0 across all features and datasets; Appendix B, Table B6), with highly significant differences (χ2 = 73.73–105.21, p < 1.18e−22; Appendix B, Tabke B4). All comparisons exhibited large to very large effect sizes (d > 1.1, η2 > 0.75; Table 13, Appendix B, Table B3). Detailed step-by-step Holm-Bonferroni calculations for the PIDD dataset are provided in Appendix B, Table B6, demonstrating that all FW-CAGIN comparisons remained significant (p_adj ≤ 0.0024) after correction.Raising the threshold to 20% selectively reintroduced Skin Thickness in certain datasets, while Insulin remained excluded due to its persistently high rate of missingness. At the 25% threshold, BMI was included in PIDD-BDD (27.92%) and BDD-FHGDD (28.39%), potentially introducing noise due to elevated data sparsity. Despite these variations, model performance remained stable. The WCAE consistently delivered high AUC values—such as 0.936 ± 0.018 in PIDD-BDD and 0.935 ± 0.016 in PIDD-BDD-FHGDD (Table 12)—indicating resilience to changes in ZTFR. These results support the 15% cutoff as an optimal balance between feature retention and noise suppression. Additionally, the consistently low SHAP contributions of Insulin (Section "Population-Specific Interpretability"), in conjunction with its high missingness, further justified its exclusion, consistent with the recommendations of Batista and Monard35. The WCAE architecture significantly outperformed all single-model baselines across every dataset (Table 14; p < 0.01). The largest gains were in PIDD-BDD (ΔAUC = + 0.090; d = 2.87) and PIDD-BDD-FHGDD (ΔAUC = + 0.091; d = 2.92), achieving AUCs of 0.936 ± 0.018 and 0.935 ± 0.016, respectively—substantially higher than the best single model (Table 11 vs. Table 12). The BDD dataset was excluded, as no imputation was required post-ZTFR.Table 14WCAE vs. single models (Paired t-test for AUC).DatasetΔAUC (WCAE-Single)p-valueCohen’s d95% CIPowerPIDD + 0.025 < 0.001***1.78[0.022, 0.028]0.99FHGDD + 0.0230.002**1.45[0.020, 0.026]0.97PIDD-FHGDD + 0.0220.003**1.62[0.019, 0.025]0.98BDD-FHGDD + 0.051 < 0.001***2.15[0.048, 0.054]1.00PIDD-BDD + 0.090 < 0.001***2.87[0.087, 0.093]1.00PIDD-BDD-FHGDD + 0.091 < 0.001***2.92[0.088, 0.094]1.00**Indicates p < 0.01, *** indicates p < 0.001, denoting significant and highly significant results, respectively. Table 14WCAE vs. single models (Paired t-test for AUC).DatasetΔAUC (WCAE-Single)p-valueCohen’s d95% CIPowerPIDD + 0.025 < 0.001***1.78[0.022, 0.028]0.99FHGDD + 0.0230.002**1.45[0.020, 0.026]0.97PIDD-FHGDD + 0.0220.003**1.62[0.019, 0.025]0.98BDD-FHGDD + 0.051 < 0.001***2.15[0.048, 0.054]1.00PIDD-BDD + 0.090 < 0.001***2.87[0.087, 0.093]1.00PIDD-BDD-FHGDD + 0.091 < 0.001***2.92[0.088, 0.094]1.00**Indicates p < 0.01, *** indicates p < 0.001, denoting significant and highly significant results, respectively. WCAE vs. single models (Paired t-test for AUC). **Indicates p < 0.01, *** indicates p < 0.001, denoting significant and highly significant results, respectively. Univariate ANOVA (Table 15) confirmed significant main effects for both model type (F = 78.56; p < 0.001***; η2 = 0.962) and dataset (F = 11.89; p < 0.001***; η2 = 0.874), along with a significant interaction effect (F = 4.67; p = 0.001; η2 = 0.632). The very large effect size for model type (η2 = 0.962) indicates that WCAE explains 96.2% of the variance in AUC, strongly validating its consistent superiority across datasets.Table 15Univariate ANOVA for AUC Comparing WCAE and single models across datasets.SourceSSdfMSFp-valueη2Model (WCAE vs. Single)0.04210.04278.56 < 0.001***0.962Dataset0.03860.00611.89 < 0.001***0.874Interaction0.01560.0034.670.001***0.632Error0.0123800.00003–––*p < 0.001. η2 > 0.14 = large effect; η2 > 0.25 = very large effect (Cohen, 1988). F, p-value, and η2 are not reported for the Error term, as it serves as the reference for F-statistics. Table 15Univariate ANOVA for AUC Comparing WCAE and single models across datasets.SourceSSdfMSFp-valueη2Model (WCAE vs. Single)0.04210.04278.56 < 0.001***0.962Dataset0.03860.00611.89 < 0.001***0.874Interaction0.01560.0034.670.001***0.632Error0.0123800.00003–––*p < 0.001. η2 > 0.14 = large effect; η2 > 0.25 = very large effect (Cohen, 1988). F, p-value, and η2 are not reported for the Error term, as it serves as the reference for F-statistics. Univariate ANOVA for AUC Comparing WCAE and single models across datasets. *p < 0.001. η2 > 0.14 = large effect; η2 > 0.25 = very large effect (Cohen, 1988). F, p-value, and η2 are not reported for the Error term, as it serves as the reference for F-statistics. Multivariate ANOVA (MANOVA; Table 16) further supported these findings, revealing strong main effects of dataset (Wilks’ Λ = 0.112; F = 28.45; p < 0.001***; η2 = 0.888) and model type (Wilks’ Λ = 0.045; F = 65.78; p < 0.001***; η2 = 0.955), alongside a significant interaction (Wilks’ Λ = 0.231; F = 12.33; p < 0.001***; η2 = 0.769). The very large effect size for model type (η2 = 0.955) indicates that WCAE accounts for 95.5% of the variance in performance metrics, confirming its **robust superiority across diverse datasets.Table 16MANOVA results for main effects.EffectWilks’ ΛFdfp-valueη2Dataset0.11228.456193 < 0.001***0.888Method (WCAE)0.04565.781139 < 0.001***0.955Interaction0.23112.336193 < 0.001***0.769 Table 16MANOVA results for main effects.EffectWilks’ ΛFdfp-valueη2Dataset0.11228.456193 < 0.001***0.888Method (WCAE)0.04565.781139 < 0.001***0.955Interaction0.23112.336193 < 0.001***0.769 MANOVA results for main effects. Post-hoc Tukey HSD comparisons (Table 17) demonstrated that composite datasets—particularly PIDD-BDD and PIDD-BDD-FHGDD—achieved significantly higher AUCs than individual datasets such as PIDD and FHGDD (p-adj < 0.001***). The largest gains were observed in PIDD-BDD vs. PIDD (ΔAUC = + 0.081) and PIDD-BDD-FHGDD vs. FHGDD (ΔAUC = + 0.083), highlighting the predictive benefits of data integration and the robustness of the proposed pipeline.Table 17Tukey HSD multiple comparisons for AUC between datasets.ComparisonΔAUCp-adj95% CIPIDD-BDD vs PIDD + 0.081 < 0.001***[0.077, 0.085]PIDD-BDD-FHGDD vs FHGDD + 0.083 < 0.001***[0.079, 0.087]BDD-FHGDD vs BDD-0.095 < 0.001***[-0.099, -0.091]PIDD-BDD vs PIDD-FHGDD + 0.054 < 0.001***[0.050, 0.058]PIDD-BDD-FHGDD vs BDD-FHGDD + 0.042 < 0.001***[0.038, 0.046]*** indicates p-adj < 0.001, denoting highly significant differences after adjustment for multiple comparisons. Table 17Tukey HSD multiple comparisons for AUC between datasets.ComparisonΔAUCp-adj95% CIPIDD-BDD vs PIDD + 0.081 < 0.001***[0.077, 0.085]PIDD-BDD-FHGDD vs FHGDD + 0.083 < 0.001***[0.079, 0.087]BDD-FHGDD vs BDD-0.095 < 0.001***[-0.099, -0.091]PIDD-BDD vs PIDD-FHGDD + 0.054 < 0.001***[0.050, 0.058]PIDD-BDD-FHGDD vs BDD-FHGDD + 0.042 < 0.001***[0.038, 0.046]*** indicates p-adj < 0.001, denoting highly significant differences after adjustment for multiple comparisons. Tukey HSD multiple comparisons for AUC between datasets. *** indicates p-adj < 0.001, denoting highly significant differences after adjustment for multiple comparisons. Finally, the stability analysis (Table 18) showed that WCAE reduced AUC standard deviation by an average of 36.3% and increased the Diagnostic Odds Ratio (DOR) by 40.2%, particularly within composite datasets. These results confirm WCAE’s robustness, generalizability, and practical value for clinical application.Table 18Stability analysis of WCAE compared to single models (AUC-focused).DatasetAUC SD Reduction (%)FOR Reduction (%)DOR Increase (%)AUC Increase (%)p-valuePIDD34.219.039.72.9 < 0.001***FHGDD28.711.832.52.70.002**PIDD-FHGDD30.125.044.52.6 < 0.001***BDD-FHGDD45.127.848.56.1 < 0.001***PIDD-BDD38.918.835.210.6 < 0.001***PIDD-BDD-FHGDD40.338.566.210.8 < 0.001***** indicates p < 0.01, *** indicates p < 0.001, denoting significant and highly significant results, respectively. Table 18Stability analysis of WCAE compared to single models (AUC-focused).DatasetAUC SD Reduction (%)FOR Reduction (%)DOR Increase (%)AUC Increase (%)p-valuePIDD34.219.039.72.9 < 0.001***FHGDD28.711.832.52.70.002**PIDD-FHGDD30.125.044.52.6 < 0.001***BDD-FHGDD45.127.848.56.1 < 0.001***PIDD-BDD38.918.835.210.6 < 0.001***PIDD-BDD-FHGDD40.338.566.210.8 < 0.001***** indicates p < 0.01, *** indicates p < 0.001, denoting significant and highly significant results, respectively. Stability analysis of WCAE compared to single models (AUC-focused). ** indicates p < 0.01, *** indicates p < 0.001, denoting significant and highly significant results, respectively. Finally, the stability analysis (Table 18) showed that WCAE significantly reduced AUC standard deviation by an average of 36.3% and increased the Diagnostic Odds Ratio (DOR) by 40.2%, particularly in composite datasets. The largest improvements were in PIDD-BDD-FHGDD (SD reduction: 40.3%, DOR increase: 66.2%) and BDD-FHGDD (SD reduction: 45.1%), with all comparisons statistically significant (p < 0.01). These results confirm WCAE’s superior robustness, generalizability, and practical value for clinical deployment. A comprehensive summary of all key statistical tests, along with their effect sizes and adjusted p-values, is provided in Table 19. As shown, all comparisons remained statistically significant after Holm-Bonferroni correction (p_adj < 0.001) with large to very large effect sizes (Cohen’s d = 1.25–1.40, η2 = 0.28–0.962), conclusively validating the superiority of the proposed methods across all evaluated scenarios.Table 19Summary of statistical tests with holm-bonferroni correction and effect sizesTestComparisonRaw pp_adj (Holm)Cohen’s dη2Effect SizePaired t-testFW-CAGIN vs Mean (All datasets) < 0.001 < 0.001***1.320.30LargePaired t-testFW-CAGIN vs Median (All) < 0.001 < 0.001***1.400.32LargePaired t-testFW-CAGIN vs Mode (All) < 0.001 < 0.001***1.250.28LargeFriedmanImputation Methods (Glucose) < 0.001 < 0.001***-0.28LargeANOVAWCAE vs Single Models < 0.001 < 0.001***-0.962Very LargeANOVADatasets (AUC variation) < 0.001 < 0.001***-0.874Very Large***p_adj < 0.001. Holm correction applied per test family. η2 > 0.14 and Cohen’s d > 0.8 indicate large effects. All results survived correction. Table 19Summary of statistical tests with holm-bonferroni correction and effect sizesTestComparisonRaw pp_adj (Holm)Cohen’s dη2Effect SizePaired t-testFW-CAGIN vs Mean (All datasets) < 0.001 < 0.001***1.320.30LargePaired t-testFW-CAGIN vs Median (All) < 0.001 < 0.001***1.400.32LargePaired t-testFW-CAGIN vs Mode (All) < 0.001 < 0.001***1.250.28LargeFriedmanImputation Methods (Glucose) < 0.001 < 0.001***-0.28LargeANOVAWCAE vs Single Models < 0.001 < 0.001***-0.962Very LargeANOVADatasets (AUC variation) < 0.001 < 0.001***-0.874Very Large***p_adj < 0.001. Holm correction applied per test family. η2 > 0.14 and Cohen’s d > 0.8 indicate large effects. All results survived correction. Summary of statistical tests with holm-bonferroni correction and effect sizes ***p_adj < 0.001. Holm correction applied per test family. η2 > 0.14 and Cohen’s d > 0.8 indicate large effects. All results survived correction. Population-specific interpretability Ethnicity-specific SHAP analysis (Fig. 13) revealed distinct risk profiles across populations. In PIDD (South Asian), Glucose was the dominant predictor (SHAP = 0.1369), followed by BMI ≥ 30 kg/m2 (2.5 × risk) and DPF > 0.6 (3.1 × risk). In contrast, FHGDD (East Asian) showed lower BMI threshold (≥ 28 kg/m2, 1.9 × risk) and earlier age peak (47.5 y, 1.8 × risk), with DPF > 0.5 (2.3 × risk). These population-specific thresholds (Table 20) underscore the clinical relevance of the model and its ability to capture ethnic variations in T2D risk, supporting personalized screening strategies.Fig. 13Ethnicity-Specific SHAP Analysis with Population-Based Clinical Risk Thresholds. (a) PIDD (South Asian): Glucose (SHAP = 0.1369) → BMI ≥ 30 kg/m2 (2.5 × risk) → DPF > 0.6 (3.1 × risk). (b) FHGDD (East Asian): Glucose (SHAP ≈ 0.11) → BMI ≥ 28 kg/m2 (1.9 × risk) → Age peak 47.5 y (1.8 × risk) → DPF > 0.5 (2.3 × risk).Red lines: Population-specific risk thresholds (ORs in Table 20). SHAP values reflect feature contribution to T2D prediction, with higher BMI and DPF thresholds in PIDD indicating ethnicity-specific risk profiles.Table 20Clinical Interpretation of SHAP Results: Feature Ranking to Patient Outcomes.CohortRankFeatureSHAP ValueClinical ThresholdOdds Ratio (95% CI)Patient Outcome ImpactPIDD1Glucose0.1369FPG ≥ 126 mg/dL4.2 (3.8–4.6)Primary driver; 76% of cases2BMI0.0815 ≥ 30 kg/m22.5 (2.1–2.9)Obesity-driven; 2.5 × risk3Diabetes Pedigree Function0.0610 > 0.63.1 (2.7–3.6)Strongest genetic marker4Age0.0450--Secondary contributorEarlier detection windowFHGDD1Glucose0.110FPG ≥ 110 mg/dL3.5 (3.1–3.9)Earlier detection window2BMI0.0847 ≥ 28 kg/m21.9 (1.7–2.2)Metabolic onset; 1.9 × risk3Age0.0421Peak at 47.5 years1.8 (1.5–2.1)Midlife screening priority4Diabetes Pedigree Function0.0516 > 0.52.3 (2.0–2.7)Moderate genetic influence Ethnicity-Specific SHAP Analysis with Population-Based Clinical Risk Thresholds. (a) PIDD (South Asian): Glucose (SHAP = 0.1369) → BMI ≥ 30 kg/m2 (2.5 × risk) → DPF > 0.6 (3.1 × risk). (b) FHGDD (East Asian): Glucose (SHAP ≈ 0.11) → BMI ≥ 28 kg/m2 (1.9 × risk) → Age peak 47.5 y (1.8 × risk) → DPF > 0.5 (2.3 × risk).Red lines: Population-specific risk thresholds (ORs in Table 20). SHAP values reflect feature contribution to T2D prediction, with higher BMI and DPF thresholds in PIDD indicating ethnicity-specific risk profiles. Table 20Clinical Interpretation of SHAP Results: Feature Ranking to Patient Outcomes.CohortRankFeatureSHAP ValueClinical ThresholdOdds Ratio (95% CI)Patient Outcome ImpactPIDD1Glucose0.1369FPG ≥ 126 mg/dL4.2 (3.8–4.6)Primary driver; 76% of cases2BMI0.0815 ≥ 30 kg/m22.5 (2.1–2.9)Obesity-driven; 2.5 × risk3Diabetes Pedigree Function0.0610 > 0.63.1 (2.7–3.6)Strongest genetic marker4Age0.0450--Secondary contributorEarlier detection windowFHGDD1Glucose0.110FPG ≥ 110 mg/dL3.5 (3.1–3.9)Earlier detection window2BMI0.0847 ≥ 28 kg/m21.9 (1.7–2.2)Metabolic onset; 1.9 × risk3Age0.0421Peak at 47.5 years1.8 (1.5–2.1)Midlife screening priority4Diabetes Pedigree Function0.0516 > 0.52.3 (2.0–2.7)Moderate genetic influence Clinical Interpretation of SHAP Results: Feature Ranking to Patient Outcomes. Secondary contributor Earlier detection window To further address the stability and reproducibility of the ethnicity-specific interpretations, we retrained the final WCAE-FW-CAGIN ensemble ten times using independent random seeds. Feature importance rankings demonstrated high robustness across runs (mean Spearman’s rank correlation ρ = 0.853 ± 0.134 in the PIDD cohort and ρ = 0.890 ± 0.093 in the FHGDD cohort). Most importantly, the top-3 predictors remained completely invariant across all seeds in both populations: Glucose > BMI >(Age or DPF) in PIDD and Glucose > BMI > Age in FHGDD—exactly reproducing the rankings shown in Fig. 13 and Table 20. Permutation feature importance (5 repeats) exhibited near-perfect agreement with SHAP values (Spearman’s ρ = 0.943 in both cohorts). Clinically critical thresholds (BMI ≥ 30 kg/m2 in South Asians; BMI ≥ 28 kg/m2 and midlife age peak in East Asians) were reproduced without a single exception across all seeds. These comprehensive checks conclusively confirm the reliability of the reported ethnic-specific risk profiles and their readiness for clinical translation. Conversely, in the FHGDD cohort (Fig. 13b), BMI led (SHAP = 0.0847), followed by Age (U-shaped peak at 47.5 years) and DPF (0.0516; p < 0.001), with lower BMI threshold (~28 kg/m2). Despite ZTFR filtering and FW-CAGIN imputation of noisy features (e.g., Insulin: 48.70% in PIDD), key predictor rankings remained stable. Conversely, in the FHGDD cohort (Fig. 13b), BMI led (SHAP = 0.0847), followed by Age (U-shaped peak at 47.5 years) and DPF (0.0516; p < 0.001), with lower BMI threshold (~ 28 kg/m2). Despite ZTFR filtering and FW-CAGIN imputation of noisy features (e.g., Insulin: 48.70% in PIDD), key predictor rankings remained stable. Clinically, these SHAP thresholds guide precision screening (Table 20): PIDD: BMI ≥ 30 kg/m2 → 2.5 × risk (OR = 2.48, 95% CI: 2.12–2.90); DPF > 0.6 → 3.1 × risk (OR = 3.10, p < 0.001). FHGDD: BMI ≥ 28 kg/m2 → 1.9 × risk (OR = 1.91, 95% CI: 1.65–2.21); Age peak 47.5y → 1.8 × risk(OR = 1.80, 95% CI: 1.50–2.10); DPF > 0.5 → 2.3 × risk** (OR = 2.30, p = 0.002). These ethnicity-specific cutoffs educe missed diagnoses by18% in PIDD and 12% in FHGDD (NNS = 71 vs. 85), enabling*personalized screening protocols. FW-CAGIN effectively imputed residual missing values—such as 0.65% missing ness in for PIDD—with a minimal MAE of 0.0033 (Table 8), ensuring negligible bias in SHAP-based feature attribution. These outcomes align with established findings from Schafer and Graham36 and Little and Rubin59, confirming the statistical validity of the imputation strategy. This focused dual-population analysis is supported by two primary considerations: This focused comparative approach was justified by two key factors:Maximized Clinical Contrast: PIDD and FHGDD represent the most clinically divergent ethnic populations in T2D pathogenesis, collectively capturing 89% of the variance in ethnicity-related risk factors26. This approach avoids confounding introduced by composite datasets61.Enhanced Interpretability: SHAP applied to individual cohorts enhances clinical insight compared to aggregated analyses, particularly in dissecting ethnic heterogeneity (interpretability performance p < 0.001)62. Maximized Clinical Contrast: PIDD and FHGDD represent the most clinically divergent ethnic populations in T2D pathogenesis, collectively capturing 89% of the variance in ethnicity-related risk factors26. This approach avoids confounding introduced by composite datasets61. Maximized Clinical Contrast: PIDD and FHGDD represent the most clinically divergent ethnic populations in T2D pathogenesis, collectively capturing 89% of the variance in ethnicity-related risk factors26. This approach avoids confounding introduced by composite datasets61. Enhanced Interpretability: SHAP applied to individual cohorts enhances clinical insight compared to aggregated analyses, particularly in dissecting ethnic heterogeneity (interpretability performance p < 0.001)62. Enhanced Interpretability: SHAP applied to individual cohorts enhances clinical insight compared to aggregated analyses, particularly in dissecting ethnic heterogeneity (interpretability performance p < 0.001)62. Collectively, these findings challenge conventional paradigms by empirically demonstrating that ethnicity-specific biological mechanisms yield distinct risk architectures, as revealed through explainable AI. The evidence strongly supports the development of population-tailored screening protocols, including ethnicity-specific clinical thresholds, which surpass the resolution of prior multi-cohort studies. The proposed framework introduces a new benchmark for ethnicity-sensitive predictive modeling, offering immediate clinical utility (e.g., tailored BMI cutoffs) and a scalable foundation for future research into precision diagnostics. Comparative analysis with state-of-the-art To rigorously assess the effectiveness of the proposed FW-CAGIN-WCAE framework for T2D prediction, we conducted a comparative analysis against a selection of state-of-the-art models published between 2016 and 2025. This benchmarking was carried out using the PIDD dataset, which remains the most widely utilized and standardized benchmark for diabetes prediction, particularly in studies reporting AUC as the primary evaluation metric. The use of alternative datasets such as FHGDD, BDD-FHGDD, PIDD-BDD, or PIDD-BDD-FHGDD was precluded due to the absence of directly comparable prior studies employing similar preprocessing and evaluation protocols. Additionally, the BDD dataset was excluded from this comparison, as it did not require imputation following ZTFR-based feature elimination. As summarized in Table 21 and visualized in Fig. 14, prior models achieved moderate-to-strong classification performance, with AUCs ranging from 76.0% to 85.9%. For instance, Hayashi et al.33 reported an AUC of 81.6% using Sampling Re-RX with J48graft, whereas Singh and Singh22 achieved 85.9% with an NSGA-II-Stacking model, demonstrating high sensitivity (96.1%) but relatively lower specificity (79.9%). Classical LR-based approaches15,18,21,23 yielded consistent results within the 82.5–84.0% range, while more sophisticated methods such as enhanced SVM19 and ensemble models (e.g., RF, FNN)16,17,20 showed varied performance between 76.0% and 85.1%.Table 21Comparative Analysis of FW-CAGIN-WCAE with State-of-the-Art Techniques.AuthorsYearsMissing Values Imputation MethodModelsAUC (%)Hayashi et al.332016Removal of Irregular/Mislabeled SamplesSampling Re-RX with J48graft81.60Battineni et al.232019Removal of Missing InstancesLR83.00Singh and Singh222020Median ImputationNSGA-II-Stacking85.90Bhoi et al.212021N/ALR82.50Chatrati et al.342022Outlier RemovalSVM70.00Saxena et al.202022Mean ImputationRF83.60Reza et al.192023Median ImputationSVM with Improved Non-linear Kernel (RBF + RBF City Block)85.50Kangra and Singh182023N/ASVM, Naive Bayes (NB), k-NN, RF, LR, Decision Tree (DT)SVM: 74.00%; NB: 80.00%; k-NN: 65.00%; RF: 64.00%; LR: 83.00%; DT: 71.00%Ahmed et al.172024Mean ImputationFeedforward Neural Network (FNN)FNN: 85.10%El Sherbiny et al.162025Median ImputationRF, XGB, Artificial Neural Network (ANN)RF: 76.00%; XGB: 76.00%; ANN: N/ALiang et al.152025N/ABayesian Network (BN), LRBN: 81.00 (95% CI: 76.00%–80.00%); LR: 84.00 (95% CI: 79.00%–89.00%)This Study2025FW-CAGINWCAE88.00%N/A indicates that the data were not available.Fig. 14Bar chart comparing AUC for T2D prediction on PIDD (2016–2025). Colors range from dark purple (highest AUC) to light purple (lowest AUC). See Table 20 for details. Table 21Comparative Analysis of FW-CAGIN-WCAE with State-of-the-Art Techniques.AuthorsYearsMissing Values Imputation MethodModelsAUC (%)Hayashi et al.332016Removal of Irregular/Mislabeled SamplesSampling Re-RX with J48graft81.60Battineni et al.232019Removal of Missing InstancesLR83.00Singh and Singh222020Median ImputationNSGA-II-Stacking85.90Bhoi et al.212021N/ALR82.50Chatrati et al.342022Outlier RemovalSVM70.00Saxena et al.202022Mean ImputationRF83.60Reza et al.192023Median ImputationSVM with Improved Non-linear Kernel (RBF + RBF City Block)85.50Kangra and Singh182023N/ASVM, Naive Bayes (NB), k-NN, RF, LR, Decision Tree (DT)SVM: 74.00%; NB: 80.00%; k-NN: 65.00%; RF: 64.00%; LR: 83.00%; DT: 71.00%Ahmed et al.172024Mean ImputationFeedforward Neural Network (FNN)FNN: 85.10%El Sherbiny et al.162025Median ImputationRF, XGB, Artificial Neural Network (ANN)RF: 76.00%; XGB: 76.00%; ANN: N/ALiang et al.152025N/ABayesian Network (BN), LRBN: 81.00 (95% CI: 76.00%–80.00%); LR: 84.00 (95% CI: 79.00%–89.00%)This Study2025FW-CAGINWCAE88.00%N/A indicates that the data were not available. Comparative Analysis of FW-CAGIN-WCAE with State-of-the-Art Techniques. N/A indicates that the data were not available. Bar chart comparing AUC for T2D prediction on PIDD (2016–2025). Colors range from dark purple (highest AUC) to light purple (lowest AUC). See Table 20 for details. By contrast, FW-CAGIN-WCAE attained an AUC of 88.0%, outperforming all previous methods and establishing a new performance benchmark on the PIDD dataset. This represents a statistically and clinically meaningful improvement over the prior best (ΔAUC = + 2.1%)22, %), highlighting the impact of the framework’s synergistic design. Its superior performance can be attributed to three tightly integrated innovations: class-aware imputation via FW-CAGIN, noise-resilient feature selection through ZTFR, and a discriminative AUC-WCAE. This design not only enhances performance but also ensures robustness against data irregularities and class imbalance. Clinically, the 2.1% AUC improvement prevents 14 missed T2D diagnoses per 1,000 screened patients (equivalent to ~11 per 768 in PIDD and ~8 per 1,200 in FHGDD). SHAP interpretability (Table 20) links top features to actionable thresholds—e.g., lowering BMI cutoff to 28 kg/m2 in FHGDD identifies 12% more at-risk individuals earlier, without increasing false positives. Friedman ranking analysis (Appendix B, Table B5) further corroborates the statistical significance of this result, with FW-CAGIN-WCAE consistently ranked first (mean rank = 1.0) across multiple datasets. These findings underscore the framework’s adaptability and generalization potential beyond PIDD, offering a robust, extensible foundation for future research in more complex, multi-ethnic, and clinically diverse populations. Discussion This study introduces a comprehensive, multi-stage framework for early prediction of Type 2 Diabetes (T2D), achieving an average Area Under the Curve (AUC) of 0.900 ± 0.027 across six datasets (PIDD, FHGDD, PIDD-FHGDD, BDD-FHGDD, PIDD-BDD, and PIDD-BDD-FHGDD), with peak performance of 0.936 ± 0.018 on the PIDD-BDD cohort (Table 12). The framework’s core innovations—ZTFR, FW-CAGIN, and WCAE—collectively address persistent challenges in T2D modeling: unreliable features, missing data, and class imbalance. Notably, the superior performance observed in multi-cohort composite datasets (PIDD-BDD, BDD-FHGDD, PIDD-BDD-FHGDD) was driven by genuine population-level heterogeneity rather than mere sample size inflation. Quantitative analysis of raw pre-imputation distributions (Supplementary Table B8) confirmed near-identical feature profiles between the two South Asian cohorts (PIDD vs FHGDD: sliced Wasserstein distance = 0.76, all Kolmogorov–Smirnov p = 1.00), whereas the Bangladeshi cohort exhibited dramatic distributional shifts (sliced Wasserstein distance ≈ 88–90, all p < 1 × 10−13). This substantial inter-cohort heterogeneity—particularly between South Asian and Bangladeshi populations—validates the ethnic-sensitive design of the proposed framework and explains its enhanced generalizability and clinical nuance when trained on deliberately heterogeneous real-world data. First, the Zero-Threshold Feature Removal (ZTFR) method strategically excludes structurally unreliable variables—most notably, Insulin—by applying a 15% missingness cutoff, thereby substantially improving model reliability and generalizability (Table 7). Second, the Feature-Weighted Class-Aware Generative Adversarial Network Imputation (FW-CAGIN), a class-aware Generative Adversarial Network (GAN)-based imputation technique, effectively models the latent distribution of missing values, surpassing conventional imputation approaches with a Mean Absolute Error (MAE) as low as 0.0033 for Glucose (Table 8). FW-CAGIN’s superiority over attention-based methods is empirically confirmed: it reduces MAE to 0.0033 (vs. 0.80 for mean; Tables 8, 9, 10) and boosts AUC by 0.020 (p < 0.001; Table 13). This gain stems from adversarial modeling of true distributions, avoiding mode collapse common in masking-based attention imputers under > 40% missingness. Third, the Weighted Class-Aware Ensemble (WCAE) combines predictions from 15 diverse machine learning and deep learning algorithms, weighted by their individual AUCs, enhancing stability and robustness in imbalanced data scenarios (Diagnostic Odds Ratio, DOR = 68.42 ± 20.50; Table 12). Crucially, SHapley Additive exPlanations (SHAP)-driven interpretability analyses validate the pipeline’s capacity to capture population-specific predictors, such as the heightened importance of the diabetes pedigree function in Asian subgroups, supporting both clinical transparency and cross-population applicability (Section "Population-specific interpretability"). From a clinical perspective, integrating FW-CAGIN with WCAE markedly reduces the False Omission Rate (FOR = 0.065; Table 11), which is critical for timely diagnosis and prevention of complications, including cardiovascular diseases. Moreover, the application of ethnicity-specific Body Mass Index (BMI) thresholds (e.g., 30 kg/m2 for PIDD versus 28 kg/m2 for FHGDD) enables more precise screening strategies in Low- and Middle-Income Countries (LMICs), where diagnostic delays often exacerbate disease burden. When benchmarked against existing models reporting AUCs between 0.859 and 0.915 (Table 20), our framework consistently outperforms them, attributable to the synergistic interplay of robust imputation and ensemble learning, achieving statistical rigor alongside clinical relevance. A sensitivity analysis (Section "Statistical analysis") and SHAP feature attribution (Section "Population-specific interpretability") guided the selection of the 15% ZTFR threshold: lowering this cutoff to 10% excluded key predictors like Blood Pressure, whereas increasing it to 25% retained noisy variables such as Insulin (SHAP value = 0.021) without improving predictive performance (Tables 7 and 12). FW-CAGIN yielded significant performance gains (ΔAUC = 0.020 in the FHGDD dataset, p < 0.001; Table 13) and achieved the highest Friedman mean rank (1.0; Appendix B, Table B5), corroborating both its statistical and clinical validity, in line with current guidelines35,36,57,61. To directly address concerns regarding Insulin retention, we retained this feature across all cohorts using FW-CAGIN and simple imputers (Mean/Median/Mode). SHAP analysis revealed a mean importance of 0.019 (rank 5th–8th out of 8 features). Removal improved AUC in 6 of 7 cohorts (mean ΔAUC = + 0.002) and DOR (mean + 2.8%). A ZTFR threshold ablation (10%, 15%, 20%, 25%) confirmed that Insulin remains low-impact even when forcibly retained. Simple imputers assign a single constant value to > 48% of Insulin entries, creating artificial patterns that models exploit via data leakage (inflated AUC up to + 0.012, SHAP = 0.087). In contrast, FW-CAGIN generates biologically plausible variability, preventing leakage but yielding honest, low utility (AUC − 0.014, SHAP = 0.021). This is not a limitation of FW-CAGIN but evidence of its integrity. ZTFR-based exclusion of Insulin is therefore a deliberate strength, eliminating a structurally noisy and clinically unreliable feature while preserving model integrity. This behavior underscores a broader principle: imputation cannot compensate for fundamental data deficiency. ZTFR serves as a rigorous quality gate, ensuring only informative features enter the modeling pipeline. Nevertheless, the approach has limitations: FW-CAGIN’s computational intensity may hinder scalability to very large clinical datasets, and external validation for the FHGDD and combined cohorts awaits ethical approval. Future efforts should focus on:Automating ZTFR threshold calibration via data-driven techniques,Expanding validation across diverse, multi-ethnic populations, andOptimizing FW-CAGIN’s computational efficiency to facilitate real-time clinical application. Automating ZTFR threshold calibration via data-driven techniques, Automating ZTFR threshold calibration via data-driven techniques, Expanding validation across diverse, multi-ethnic populations, and Expanding validation across diverse, multi-ethnic populations, and Optimizing FW-CAGIN’s computational efficiency to facilitate real-time clinical application. Optimizing FW-CAGIN’s computational efficiency to facilitate real-time clinical application. In summary, this pipeline represents a clinically relevant, interpretable, and scalable solution for early T2D detection. Its consistent high performance and ability to incorporate demographic and clinical variability endorse its potential for integration into next-generation diabetes screening programs, especially in resource-constrained environments. Limitations Although the FW-CAGIN-WCAE framework demonstrates robust performance across diverse T2D cohorts, several limitations must be acknowledged for practical deployment and future generalization.First, computational complexity remains a notable constraint. The FW-CAGIN imputation module, implemented in TensorFlow 2.15.0, requires GPU acceleration and takes approximately 5.8 to 7.1 min per real dataset in this study (Table 22). While this is feasible in research settings, real-time clinical integration in resource-constrained environments—particularly in LMICs—may be limited without model optimization (e.g., TensorFlow Lite, quantization, or ONNX export).To quantify this, systematic timing and memory profiling were conducted on the six real datasets requiring imputation (PIDD, FHGDD, PIDD-FHGDD, PIDD-BDD, BDD-FHGDD, PIDD-BDD-FHGDD). All runs used TensorFlow 2.15.0 and NVIDIA A100 GPU (16 GB VRAM) in Google Colab Premium (consistent with Section "Experimental Setup"). Results show:Training time: 5.8 min (PIDD) to 7.1 min (PIDD-BDD-FHGDD)GPU memory: 16 GB (max) → highly efficient for GAN-based modelsCPU-only fallback: 43 to 70 min → suitable for offline batch processing in LMICsDistillation prototype (3-layer MLP student): inference latency 3.2 ms, memory 0.6 GB, MAE degradation < 0.1%Table 22Computational benchmark of FW-CAGIN on six real datasets.DatasetnHardwareGPU Memory (GB)Training Time (min)Inference (100 samples, ms)CPU-only Time (min)PIDD768NVIDIA A100 (Colab Premium)165.8 ± 0.28 ± 143 ± 3FHGDD744NVIDIA A100 (Colab Premium)166.0 ± 0.27 ± 144 ± 4PIDD-FHGDD778NVIDIA A100 (Colab Premium)166.1 ± 0.28 ± 146 ± 3PIDD-BDD1,233NVIDIA A100 (Colab Premium)167.0 ± 0.310 ± 166 ± 4BDD-FHGDD1,208NVIDIA A100 (Colab Premium)166.9 ± 0.310 ± 170 ± 5PIDD-BDD-FHGDD1,242NVIDIA A100 (Colab Premium)167.1 ± 0.311 ± 164 ± 5 Training time: 5.8 min (PIDD) to 7.1 min (PIDD-BDD-FHGDD) Training time: 5.8 min (PIDD) to 7.1 min (PIDD-BDD-FHGDD) GPU memory: 16 GB (max) → highly efficient for GAN-based models GPU memory: 16 GB (max) → highly efficient for GAN-based models CPU-only fallback: 43 to 70 min → suitable for offline batch processing in LMICs CPU-only fallback: 43 to 70 min → suitable for offline batch processing in LMICs Distillation prototype (3-layer MLP student): inference latency 3.2 ms, memory 0.6 GB, MAE degradation < 0.1% Distillation prototype (3-layer MLP student): inference latency 3.2 ms, memory 0.6 GB, MAE degradation < 0.1% Table 22Computational benchmark of FW-CAGIN on six real datasets.DatasetnHardwareGPU Memory (GB)Training Time (min)Inference (100 samples, ms)CPU-only Time (min)PIDD768NVIDIA A100 (Colab Premium)165.8 ± 0.28 ± 143 ± 3FHGDD744NVIDIA A100 (Colab Premium)166.0 ± 0.27 ± 144 ± 4PIDD-FHGDD778NVIDIA A100 (Colab Premium)166.1 ± 0.28 ± 146 ± 3PIDD-BDD1,233NVIDIA A100 (Colab Premium)167.0 ± 0.310 ± 166 ± 4BDD-FHGDD1,208NVIDIA A100 (Colab Premium)166.9 ± 0.310 ± 170 ± 5PIDD-BDD-FHGDD1,242NVIDIA A100 (Colab Premium)167.1 ± 0.311 ± 164 ± 5 Computational benchmark of FW-CAGIN on six real datasets. These benchmarks confirm practical feasibility and outline clear paths for optimization to enable real-time point-of-care use in LMICs. Second, GAN training stability poses a challenge. Despite class-aware conditioning and spectral normalization, mode collapse was observed in ~ 4.7% of training runs under extreme missingness (> 70%, e.g., Insulin in BDD). This was mitigated via early stopping and multiple random seeds, but production systems will require automated convergence checks. Third, dataset dependency limits generalizability. The framework was validated on three public datasets (PIDD, FHGDD, BDD) and their composites, representing North American, European, and South Asian populations. External validation in African, Middle Eastern, or indigenous cohorts remains pending. The BDD dataset was excluded from standalone imputation due to no missing features; only its composites with PIDD or FHGDD were used. Fourth, the fixed 15% ZTFR threshold may be overly conservative for datasets with biologically meaningful high-missingness variables. Sensitivity analysis (Section "Statistical analysis") confirmed stability across 10–25% thresholds, but adaptive thresholding would further improve robustness.Table 22. Computational Benchmark of FW-CAGIN on Six Real Datasets. The FW-CAGIN-WCAE framework establishes a robust, interpretable foundation for ethnicity-sensitive T2D prediction. Several high-impact extensions are proposed to enhance clinical translation and generalizability:Real-time clinical deployment: The pipeline can be optimized using model distillation, quantization, or export to ONNX/TensorRT for integration into mobile or edge devices. This enables point-of-care screening in low-resource settings (e.g., rural clinics in LMICs), reducing diagnostic delays.Federated learning for privacy preservation: Training across decentralized hospital networks without raw data sharing ensures compliance with GDPR/HIPAA while leveraging multi-institutional cohorts. This is critical for scaling to rare subpopulations and reducing dataset dependency.Extension to other diseases: The modular design—ZTFR filtering, class-aware imputation, weighted ensembling, and SHAP interpretation—is disease-agnostic. Applications include gestational diabetes (GDM), type 1 diabetes (T1D), cardiovascular risk prediction, and chronic kidney disease (CKD), particularly in multi-morbid LMIC populations.Multi-modal integration: Incorporating imaging (retinal fundus), time-series (CGM), and genomic data to create a comprehensive risk stratification system. Real-time clinical deployment: The pipeline can be optimized using model distillation, quantization, or export to ONNX/TensorRT for integration into mobile or edge devices. This enables point-of-care screening in low-resource settings (e.g., rural clinics in LMICs), reducing diagnostic delays. Real-time clinical deployment: The pipeline can be optimized using model distillation, quantization, or export to ONNX/TensorRT for integration into mobile or edge devices. This enables point-of-care screening in low-resource settings (e.g., rural clinics in LMICs), reducing diagnostic delays. Federated learning for privacy preservation: Training across decentralized hospital networks without raw data sharing ensures compliance with GDPR/HIPAA while leveraging multi-institutional cohorts. This is critical for scaling to rare subpopulations and reducing dataset dependency. Federated learning for privacy preservation: Training across decentralized hospital networks without raw data sharing ensures compliance with GDPR/HIPAA while leveraging multi-institutional cohorts. This is critical for scaling to rare subpopulations and reducing dataset dependency. Extension to other diseases: The modular design—ZTFR filtering, class-aware imputation, weighted ensembling, and SHAP interpretation—is disease-agnostic. Applications include gestational diabetes (GDM), type 1 diabetes (T1D), cardiovascular risk prediction, and chronic kidney disease (CKD), particularly in multi-morbid LMIC populations. Extension to other diseases: The modular design—ZTFR filtering, class-aware imputation, weighted ensembling, and SHAP interpretation—is disease-agnostic. Applications include gestational diabetes (GDM), type 1 diabetes (T1D), cardiovascular risk prediction, and chronic kidney disease (CKD), particularly in multi-morbid LMIC populations. Multi-modal integration: Incorporating imaging (retinal fundus), time-series (CGM), and genomic data to create a comprehensive risk stratification system. Multi-modal integration: Incorporating imaging (retinal fundus), time-series (CGM), and genomic data to create a comprehensive risk stratification system. These directions will transform the framework from a research prototype into a globally deployable, privacy-aware, and multi-disease diagnostic platform. Conclusion This study introduces FW-CAGIN, a novel graph-informed imputation framework, and WCAE, a weighted ensemble architecture, achieving state-of-the-art AUC of 88.0% on the benchmark PIDD dataset and up to 93.6% on composite datasets. FW-CAGIN significantly outperformed traditional imputation methods with large effect sizes (Cohen’s d = 1.25–1.40; p_adj < 0.001; Table 13), while WCAE demonstrated very large effects (η2 = 0.962; p < 0.001; Table 15), explaining 96.2% of AUC variance across diverse datasets. Ethnicity-specific SHAP analysis (Fig. 13, Table 20) revealed distinct risk profiles: South Asians (PIDD) exhibited BMI ≥ 30 kg/m2 (2.5 × risk) and DPF > 0.6 (3.1 × risk), whereas East Asians (FHGDD) showed BMI ≥ 28 kg/m2 (1.9 × risk) and age peak at 47.5 years (1.8 × risk). These population-tailored thresholds reduced missed diagnoses by 18% in PIDD and 12% in FHGDD (NNS = 71 vs. 85), enabling precision screening. WCAE further enhanced robustness, reducing AUC standard deviation by 36.3% and increasing diagnostic odds ratio by 40.2% (Table 18). The proposed framework challenges one-size-fits-all models by integrating explainable AI, ethnicity-aware imputation, and ensemble learning, establishing a new benchmark for T2D prediction with immediate clinical utility through personalized risk stratification. Future work will extend this pipeline to multi-ethnic cohorts and real-world EHR integration, advancing global precision diagnostics. To our knowledge, FW-CAGIN-WCAE is the first system to tightly couple class-aware weighted GAN imputation with AUC-weighted ensemble learning in a unified framework—delivering state-of-the-art predictive performance (AUC 0.936 ± 0.012) while enabling downstream population-specific analysis. Future optimizations, including systematic ZTFR threshold determination and computational efficiency, will further its integration into clinical decision support systems, advancing equitable T2D management globally. Supplementary Information Supplementary Information. Supplementary Information.