Abstract
Machine Learning Models for Chronic Kidney Disease (CKD) often prioritize predictive accuracy but rarely distinguish correlation and causation. This study proposes a causal machine learning framework with explainable prediction that aims to identify clinically meaningful biomarkers for early CKD detection. Causal Relationships learned from publicly available clinical data are compared with traditional feature selection methods before training multiple machine learning classifiers and selecting the best one. By emphasizing causal feature discovery rather than predictive performance alone, this work aims to produce models that are both accurate and clinically interpretable, contributing toward more trustworthy AI for healthcare. (Al-Momany et al., 2026)
Introduction
Chronic Kidney Disease (CKD) remains one of the progressive and irreversible diseases that emerged as one of many internationally acclaimed global health challenges today. According to the Global Burden of Disease (GBD) 2021 study, 674 million individuals worldwide have CKD, accounting for 8.5% of the global population. While more than 1.5 million deaths have been accounted to the disease, it continues to worsen the disability-adjusted years (DALYs) (GBD 2021 Chronic Kidney Disease Collaborators, 2024), along with healthcare expenses and lessened quality of life, specifically as patients progress toward end-stage kidney disease in which they will require dialysis and transplantation.
The ’silent’ challenge this poses as Early-stage CKD often progresses without noticeable symptoms, causing many patients to remain undiagnosed until substantial and irreversible kidney damage has occurred. However, early diagnosis allows interventions such as blood pressure control, glycemic management, lifestyle modification, and pharmacology therapy to delay the condition. Consequently, early identification of individuals at risk has become a major clinical priority. According to The 2024 Kidney Disease: Improving Global Outcomes (KDIGO) guidelines it emphasizes strategies to delay and mitigate early signs of CKD that may involve blood pressure management, glycemic control, lifestyle management and pharmacological therapy. (Kidney Disease: Improving Global Outcomes (KDIGO) CKD Work Group, 2024)
To address such a challenge, this study proposes Machine Learning for adoption of early CKD Detection because of its ability to detect non-linear patterns within clinical data. Numerous studies have demonstrated high predictive performance using algorithms such as Random Forests, Support Vector Machines, Gradient Boosting, Extreme Gradient Boosting (XGBoost), and deep learning architectures. Despite the results, the majority of existing approaches prioritize predictive accuracy while treating the learning process as a "black box." (Ghosh & Khandoker, 2024).
This study proposes a causal machine learning framework for early CKD prediction using population-scale clinical data, driven by explainable feature engineering that helped narrow down on finding meaningful causal biomarkers, such biomarkers were first identified using mutual information that was supported by the use of permutation importance validated by a surrogate model. Seven widely used machine learning classifiers: Logistic Regression, Support Vector Machine, Extra Trees, Histogram Gradient Boosting, XGBoost, LightGBM, and CatBoost were benchmarked using repeated stratified cross-validation and evaluated with multiple discrimination, calibration, and agreement metrics. Finally, model robustness was assessed through noise injection, feature ablation, distribution shift analysis, bootstrap confidence intervals, and multiple statistical significance tests, including Friedman, Nemenyi, Wilcoxon signed-rank, McNemar, Cochran’s Q, permutation testing, and Cliff’s Delta (Demšar, 2006).
By integrating causal discovery, statistical validation, interpretable feature analysis, and rigorous experimental evaluation into a single framework, this study aims to identify clinically meaningful biomarkers while developing robust and interpretable machine learning models for early CKD detection.
Experimental Environment
All experiments were conducted using Python 3.12 on Google Colaboratory. The computational environment consisted of an Intel Xeon CPU, approximately 12 GB of RAM, and an NVIDIA Tesla T4 GPU whenever GPU acceleration was available. Random seeds were fixed (random_state = 42) throughout all experiments to improve reproducibility.
Software Libraries
The following Python libraries were used throughout this study:
- Scikit-learn (v1.9.0) – Machine learning algorithms, preprocessing, feature selection, model evaluation, and cross-validation.
- Pandas (v3.0.5) – Data manipulation, preprocessing, and tabular data analysis.
- NumPy (v2.5.1) – Numerical computing and array operations.
- Matplotlib (v3.11.1) and Seaborn (v0.13.2) – Data visualization and statistical plotting.
- LiNGAM (v1.3.6) – Causal discovery using the DirectLiNGAM algorithm and bootstrap analysis.
- DoWhy – Causal inference and causal effect estimation.
- XGBoost – Gradient boosting-based machine learning.
- LightGBM – Gradient boosting framework based on decision trees.
- CatBoost – Gradient boosting framework for categorical and numerical data.
- MLflow – Experiment tracking, metric logging, and model management.
- SciPy – Statistical hypothesis testing.
- Scikit-posthocs – Post-hoc statistical analyses, including the Nemenyi test.
- Statsmodels – McNemar’s test, Cochran’s Q test, and additional statistical analyses.
Reproducibility
All machine learning models were initialized with a fixed random seed (random_state = 42). Performance evaluation was performed using repeated stratified cross-validation. All preprocessing, feature selection, model training, statistical analyses, and robustness experiments were executed within identical experimental settings to ensure reproducibility.
Scope and Delimitations
This study serves as a machine learning framework with the goal of proposing a doubly robust causal model in order to identify potential biomarkers for CKD. The clinical interpretation of the identified biomarkers should be considered complementary rather than a replacement for expert medical judgment. These findings should be validated by healthcare professionals before being considered for clinical implementation. While the proposed work demonstrates predictive performance and robustness, it does not compose a clinical diagnostics tool and should not be used independently for medical decision-making processes without appropriate clinical evaluation and validation.
Methodology
This study proposes an end-to-end causal machine learning framework for the early prediction of Chronic Kidney Disease (CKD). The methodology consists of seven major phases: data acquisition, exploratory data analysis, causal assumption formulation, data preprocessing, causal biomarker discovery, machine learning benchmarking, and statistical validation. Figure X illustrates the overall workflow of the proposed framework. (For an easier mental framework, see appendix.)
Extract–Transform–Load (ETL)
The NHANES datasets were obtained directly from the Centers for Disease Control and Prevention (CDC) website. Individual survey modules were downloaded as SAS Transport (.XPT) files using automated scripts. The extracted datasets were transformed through variable selection, merging using the participant identifier (SEQN), removal of duplicate records, and filtering to include only adult participants (18 years and older). The resulting integrated dataset served as the foundation for all subsequent analyses.
Exploratory Data Analysis
Exploratory Data Analysis (EDA) was performed to examine data quality, variable distributions, missing values, class imbalance, and potential relationships among predictors. Summary statistics and graphical visualizations were used to identify skewed variables, detect outliers, and provide an initial understanding of the clinical characteristics of the dataset. Insights obtained during this phase guided feature engineering and preprocessing decisions.
Causal Assumptions
Prior to causal discovery, domain-informed causal assumptions were established based on existing nephrology literature and clinical guidelines. Demographic variables such as age and biological sex were assumed to temporally precede lifestyle behaviors, laboratory measurements, and CKD outcomes. Diabetes and hypertension were considered biologically plausible upstream contributors to kidney impairment, while socioeconomic factors were assumed to influence health-related behaviors and healthcare access. These assumptions were used solely for interpreting the discovered causal graph and were not imposed as structural constraints during causal discovery.
Data Preprocessing
The integrated dataset underwent preprocessing using the Python scientific computing ecosystem, including NumPy, Pandas, and SciPy. Missing values were handled according to variable-specific characteristics, while categorical variables were encoded into numerical representations suitable for machine learning algorithms. Clinical features such as systolic blood pressure (SBP), diastolic blood pressure (DBP), and pulse pressure were engineered from the original NHANES measurements. Robust scaling and quantile transformation were subsequently applied where appropriate to reduce the influence of skewed feature distributions and improve model stability.
Bootstrapped Causal Biomarker Discovery
Stable causal biomarkers were identified using the DirectLiNGAM causal discovery algorithm combined with bootstrap resampling. A total of 1,000 bootstrap samples were generated, and causal graphs were estimated for each resample. Stable direct parent nodes of CKD were subsequently extracted based on edge occurrence frequencies. The resulting candidate biomarkers were further validated using Mutual Information and Permutation Feature Importance prior to predictive modeling. (Shimizu et al., 2006).
Rationale: Causal Hierarchy theorem states that through purely predictive associations motivating the use of causal discovery to identify potential directional relationships underlying CKD risk (Pearl, 2009).
Machine Learning Benchmarking
Seven supervised machine learning algorithms were benchmarked using the stable causal biomarkers: Logistic Regression, Support Vector Machine, Extra Trees, Histogram Gradient Boosting, XGBoost, LightGBM, and CatBoost. Each algorithm was implemented within a preprocessing pipeline consisting of feature transformation, mutual information-based feature selection, and model training. Hyperparameters were selected from recommendations reported in the machine learning literature to provide strong baseline performance while maintaining reproducibility.
Rationale: The No Free Lunch Theorem states that no model is universally superior to one another when model performance is averaged on all tasks (Wolpert & Macready, 1997).
Model Evaluation
Model performance was evaluated using Repeated Stratified K-Fold Cross-Validation. Performance was assessed using Accuracy, Balanced Accuracy, Precision, Recall, F1-score, ROC-AUC, PR-AUC, Matthews Correlation Coefficient (MCC), Cohen’s Kappa, and Brier Score. Mean and standard deviation were reported across all folds.
Statistical Validation
To determine whether differences among machine learning models were statistically significant, multiple statistical hypothesis tests were performed, including the Friedman test, post-hoc Nemenyi test, pairwise Wilcoxon signed-rank tests with Holm-Bonferroni correction, McNemar’s test, Cochran’s Q test, permutation tests, and Cliff’s Delta effect size analysis.
Rationale: The Principle of Statistical Triangulation states that by validating a problem from one angle, it lessens the individual bias where measurement errors, p-values instability (Lawlor et al., 2016)
Robustness Analysis
The robustness of the proposed framework was evaluated through Gaussian noise injection, feature ablation experiments, subgroup-based distribution shift analysis, and bootstrap confidence intervals. These experiments were conducted to assess the stability, reliability, and generalizability of the identified causal biomarkers and predictive models under varying data conditions.
Ablation Study
An ablation study of the proposed framework was conducted and evaluated to analyze if the results of the proposed framework is equivalent to its individual proponents. Alternatives such as the full feature set and selected components to compare its performance against the proposed framework were conducted for comparative analysis.
Rationale: Reductionism framework states that you have to break down a complex system into different parts in order to understand how one piece works as a whole (Nagel, 1961).
Review of Related Literature
This Section reveals the literature that has been read and studied to conduct the methods for this research:
- Machine Learning for CKD Prediction: According to the systematic review of Sanmarchi et al. (2023), the authors screened 648 studies and included 68 that applied Artificial Intelligence (AI) and Machine Learning (ML) to CKD prediction, diagnosis, prognosis, and treatment. The authors found that ML generally showed a robust, promising performance; the studies used highly heterogeneous datasets, metrics, and modeling approaches that made the direct comparison difficult. More importantly, generalization to diverse populations was frequently addressed, and only 6 out of the 68 studies were conducted in a clinical domain. The authors themselves identified that Interpretability and Model Generalization remains one of the few bottlenecks.
- Explainable ML: The research of Ghosh & Khandoker (2024) evaluated five machine learning algorithms with XGBoost having the performance of (AUC = 0.9689). They used SHAP (Shapley Additive Explanations) and LIME (Local Interpretable Model Agnostic Explanations) to identify core features that influence creatinine, HbA1c, and age. However, these methods identify predictive importance rather than causal relationships.
- Causal CKD Analysis: Petousis et al. (2024) analyzed more than two million individuals, and demonstrated that associational analysis can differ from those identified through causal analysis. Their research provides substantial evidence that predictive performance and statistical associations alone cannot establish the reliability required for clinical interpretation.
Results
This section discusses the empirical results on all the analysis conducted:
- Model Benchmarking
- Statistical Analysis
- Feature Parsimony and Ablation
- Robustness and Stress Testing Experiments
Model Benchmarking
The final model benchmarking experiment evaluated Logistic Regression, Support Vector Machine (SVM), Extra Trees, Histogram Gradient Boosting (HGB), XGBoost, LightGBM, and CatBoost using the final 17-feature representation. Performance was assessed using Balanced Accuracy, Precision, Recall, F1-score, ROC-AUC, PR-AUC, and MCC, with results reported as mean ± standard deviation across repeated stratified cross-validation.
Overall, no single classifier dominated across the overall metrics. Logistic Regression showed the most sensitivity and discrimination of the overall performance, whereas the ensembled models generally favored Precision at the expense of Recall. The relatively small standard deviations across repeated cross-validation indicated stable performance estimates, with ROC-AUC standard deviations ranging from 0.013 to 0.015 and MCC standard deviations from 0.021 to 0.028. These results motivated subsequent statistical testing to determine whether the observed differences between classifiers were statistically significant.
Statistical Testing
The Observed Differences in model performance were evaluated and tested using non-parametric statistical testing. The Friedman Test showed a difference on all performances across the evaluated classifiers (χ2 = 66.617, p = 2.02 × 10−12), rejecting the null hypothesis that the classifiers exhibited equivalent performance across the repeated evaluation measurements.
Pairwise comparisons were evaluated using paired Wilcoxon tests with Holm correction for multiple comparisons. δ denotes Cliff’s delta. Statistical significance was assessed at α = 0.05.
Post Hoc Pairwise Comparison further validates such results by identifying differences. Through Holm adjusted Wilcoxon Tests, we demonstrated statistically significant differences across multiple classifier pairs. In particular, Logistic Regression differed significantly from Extra Trees (padj = 0.0019), HGB (padj = 0.0006), XGBoost (padj = 1.37 × 10−8), and CatBoost (padj = 5.63 × 10−8). SVM also demonstrated significant differences relative to XGBoost (padj = 3.76 × 10−5) and CatBoost (padj = 2.20 × 10−4). However, XGBoost and CatBoost demonstrated no statistically significant performances after the correction (padj = 1.000).
Feature Parsimony and Ablation Test
The Feature Parsimony examined the full 17 features to see if it retains its predictive performance versus the statistically significant 48 features validated after the Bootstrapped LiNGAM Validation. The Results demonstrated comparable performance as there were little to no differences. Despite removing 31 features in the feature space, the resulting reduction represented a reduction in the 64.6% while retaining the general predictive signal in the global feature space. Sequential feature ablation was subsequently used to evaluate whether the retained high-priority features contributed materially to model performance. Progressive removal of these features resulted in declining predictive performance, particularly for the nonlinear ensemble models. For example, XGBoost MCC decreased from approximately 0.434 under the full selected representation to approximately 0.290 following the removal of five high-priority features. These findings provide additional evidence that the final feature subset was not merely a smaller representation with redundant variables removed, but contained features contributing meaningfully to predictive performance.
Stress Testing and Robustness Analysis
Robustness was evaluated through controlled perturbation experiments involving increasing feature missingness, feature-level noise, and distributional shift. These analyses were designed to determine whether the observed benchmarking performance was maintained when the input data deviated from the ideal evaluation conditions.
Under increasing missingness, model performance generally exhibited gradual degradation rather than immediate collapse. However, the magnitude of degradation varied across classifiers, demonstrating that tolerance to incomplete observations was architecture-dependent. Logistic Regression maintained relatively stable discrimination under increasing missingness, whereas several ensemble models exhibited progressively larger reductions in predictive performance.
Noise perturbation produced a distinction between the classifiers. Linear models, however, particularly Logistic Regression and SVM, demonstrated comparatively stable performance under feature perturbation, whereas several nonlinear ensemble models experienced substantially greater performance degradation as perturbation increased. This indicates that strong baseline performance does not necessarily imply equivalent robustness to corrupted feature measurements.
Distribution-shift analysis further demonstrated that predictive performance varied across the evaluated subpopulations. Differences in performance between age groups indicated that the decision functions were not completely invariant to changes in the data distribution. For example, XGBoost demonstrated different MCC values between the evaluated age groups. This suggests that aggregate cross-validation performance may not fully characterize model heuristics under population assumptions and shifts.
Recommendations
This section demonstrates the future workflow of this research should it be continued on another hypothesized study.
- Causal Counterfactual Analysis: This test will assess if the proposed framework retains principal performance in random clinical interventions in features with meaningful changes in CKD Risk, thereby distinguishing such risks in a clinical intervention.
- Lift Analysis: This test will identify if the practical application of such a workflow for risk stratification will determine if the 17 features really retains such predictive information versus the 48 features.
- Prospective External Validation (A/B Testing): A/B testing refers to the comparative test of the proposed framework to another widely used framework in the industry, and such comparative analysis should be considered to be ethically appropriate such that there is proper clinical supervision. This kind of test should be done to measure the model’s generalization and causal actionability.
Together, these future frameworks can or cannot extend the robust predictive capability of the proposed framework.
Conclusions
The proposed framework developed a predictive and causally informed framework for CKD risk assessment using NHANES data. Across seven classifiers, Statistical Comparison highlighted performance differences in the heuristics; the predictive decision making of the model suggested that the cross validated results were not simply attributed to its variability. The Restriction of the feature usage (17 features) retained broad general performance supporting feature parsimony without losing model differences. Robustness Testing showed that performance remained relatively stable under moderate missingness, but degraded under increasingly severe perturbations, demonstrating the importance of evaluating model reliability beyond conventional performance metrics. The identified directed causal structure further provides a basis for interpreting relationships among candidate CKD-associated features. The findings support a compact, statistically evaluated, and stress-tested framework for CKD risk prediction while highlighting the need for external validation and counterfactual intervention analysis before clinical translation.
Acknowledgements
I would like to thank the NHANES (National Health and Examination Surveys) for providing the public data that is used for this study. I would also like to thank Ateneo De Naga University for inspiring me to pursue research in Chronic Kidney disease. I would like to thank my colleagues in CaresAI for allowing me to represent the organization through this research. The mentorship, the support, and the huge amount of time and opportunities they have given me made this research possible.
References
Al-Momany, A., Almomani, O., & Almomani, E. Y. (2026). Predicting chronic kidney disease from biomarkers: An explainable machine learning approach. Diagnostics, 16(13), 2000. https://doi.org/10.3390/diagnostics16132000
Demšar, J. (2006). Statistical comparisons of classifiers over multiple data sets. Journal of Machine Learning Research, 7, 1–30.
GBD 2021 Chronic Kidney Disease Collaborators. (2024). Global, regional, and national burden of chronic kidney disease, 1990–2021: A systematic analysis for the Global Burden of Disease Study 2021. The Lancet, 404(10454), 743–772. https://doi.org/10.1016/S0140-6736(24)00650-5
Ghosh, S. K., & Khandoker, A. H. (2024). Investigation on explainable machine learning models to predict chronic kidney diseases. Scientific Reports, 14, 3687. https://doi.org/10.1038/s41598-024-54375-4
Kidney Disease: Improving Global Outcomes (KDIGO) CKD Work Group. (2024). KDIGO 2024 clinical practice guideline for the evaluation and management of chronic kidney disease. Kidney International, 105(4S), S117–S314. https://doi.org/10.1016/j.kint.2023.10.018
Lawlor, D. A., Tilling, K., & Davey Smith, G. (2016). Triangulation in aetiological epidemiology. International Journal of Epidemiology, 45(5), 1866–1886.
Levin, A., Ahmed, S. B., Carrero, J. J., Foster, B., Francis, A., Hall, R. K., Herrington, W. G., Hill, G., Inker, L. A., Kazancıoğlu, R., Lamb, E., Lin, P., Madero, M., McIntyre, N., Morrow, K., Roberts, G., Sabanayagam, D., Schaeffner, E., Shlipak, M., … Stevens, P. E. (2024). Executive summary of the KDIGO 2024 Clinical Practice Guideline for the Evaluation and Management of Chronic Kidney Disease: Known knowns and known unknowns. Kidney International, 105(4), 684–701. https://doi.org/10.1016/j.kint.2023.10.016
Ma, J., Liu, R., Feng, X., et al. (2026). Explainable machine learning integrating biochemical and metabolomic biomarkers with conventional clinical factors improves chronic kidney disease prediction and risk stratification. BMC Nephrology, 27, 137. https://doi.org/10.1186/s12882-026-04781-9
Nagel, E. (1961). The structure of science: Problems in the logic of scientific explanation. Harcourt, Brace & World.
Pearl, J. (2009). Causality: Models, reasoning, and inference (2nd ed.). Cambridge University Press.
Petousis, A., et al. (2024). Testing causal explanations: A case study for understanding the effect of interventions on chronic kidney disease. arXiv. https://arxiv.org/abs/2410.12047
Sanmarchi, F., Fanconi, C., Golinelli, D., Gori, D., Hernandez-Boussard, T., & Capodici, A. (2023). Predict, diagnose, and treat chronic kidney disease with machine learning: A systematic literature review. Journal of Nephrology, 36(4), 1101–1117. https://doi.org/10.1007/s40620-023-01573-4
Shimizu, S., Hoyer, P. O., Hyvärinen, A., & Kerminen, A. (2006). A linear non-Gaussian acyclic model for causal discovery. Journal of Machine Learning Research, 7, 2003–2030.
Wolpert, D. H., & Macready, W. G. (1997). No free lunch theorems for optimization. IEEE Transactions on Evolutionary Computation, 1(1), 67–82.
Appendix
Related Posts
The Geography of Disease: a Bayesian Approach to Epidemiology
Figure 1: A map showing relative rates of pancreatic cancer...
Read MoreNeuroscience, Narrative, and Never-Ending Stories
Figure 1: A field of poppies. The myths of Persephone...
Read MoreRisk of Death Among Recently Released Inmates
Figure 1: While healthcare inequity is certainly an issue while...
Read MoreHow The Fight For Protection of Indigenous Land Helps The Environment
Figure 1: The sheer amount of deforestation of the Amazon...
Read MoreEarly Childhood Adversity Impacts Impulsive Decision-Making
Cover Image: An image of a girl holding a stuffed...
Read MoreDarius Dastur, Mishal Ali, Harshitha Ezhilarasan, Hasan Khan, Aaron Akasala
