Divergent Equilibria
No update.
For MIMIC-III, the DOI is 10.13026/C2XW26
For MIMIC-IV, the DOI is 10.13026/6c2g-5v22
For MIMIC-IV-EDv2.2, the DOI is 10.13026/5ntk-km72
Note: These original data are available from PhysioNet (MIMIC, credentialed access) subject to the repository’s data use agreement. In accordance with the PhysioNet/MIMIC license, we do not redistribute row-level data. We release the complete extraction and preprocessing code and cohort definitions to enable full reproduction by credentialed users.
We conducted a secondary analysis of the MIMIC-III/IV EHRs to predict AKI and assess sex-specific risk factors, then modeled CKD and death after AKI with competing risks. Across ElasticNet logistic, random forest, XGBoost, DNN, DCN, and Transformer models, XGBoost achieved the best AUC-ROC.
In regression models, creatinine, bicarbonate, and hemoglobin associated more strongly with AKI in men; liver disease and widowed status were high risk in both, attenuated in men. H-statistics revealed age, insurance/marital status, Black race, vascular comorbidities, and creatinine interactions with sex.
After AKI, CKD hazard rose with unmarried status, Black, comorbidities, and potassium, with stronger effects in men for lower pH and higher creatinine and in women for lower sodium. For death, heart failure hazard was greater in woman.
Our identified common and sex-specific risk factors enable more precise risk stratification and targeted prevention to reduce AKI and CKD health burdens.

Data Description: We obtained de-identified MIMIC-III (2001–2012) and MIMIC-IV (2008–2019) ICU EHRs from Beth Israel Deaconess Medical Center, downloadable from PhysioNet. MIMIC-III contains >50,000 adult ICU admissions across >38,000 patients; MIMIC-IV expands to >546,000 admissions for >364,000 patients with an updated schema and richer documentation. We also used the MIMIC-IV-ED module, which captures >400,000 aligned ED encounters from 2011–2019.
Outcome Definition and Subject Selection: We included adult patients aged 18 years or older. Incidental AKI was identified by KDIGO serum creatinine criteria and ICD-9/10 codes during hospital stay, excluding patients with previous kidney transplant, ESRD/dialysis dependence, and pre-existing CKD. For patients with multiple ICU admissions, we retained the first admission with AKI for cases and the last admission without AKI for controls.
Among patients with incidental AKI, CKD patients were identified with >90 days CKD diagnosis using ICD-9/10 codes; post-CKD (ESRD/dialysis/transplant) was also identified. Time to CKD or post-CKD was calculated based on admission times. Death and time to death from AKI were identified from discharge, ED records, and date of deaths. For patients without CKD or post-CKD or death, we required evidence of >90 day follow-up and censored at the last observed admission.
Predictors Selection: We asked whether AKI and post-AKI CKD risk can be predicted prospectively and whether key predictors differ by sex. To avoid information leakage, all predictors preceded the outcomes. The predictors include baseline demographics, insurance, vital signs, laboratory results, medications, procedures, and unstructured clinical notes.
For AKI, lab tests and clinical notes were restricted to 7 days before the AKI or last visit admission, physiology signs were taken within 48 hours before admissions, medication and procedures were selected from 6-month pre-admissions; For CKD, lab and physiology were taken from 0–90, 91–180, and
181–365 days before CKD onset (or censoring) to separate the short-, intermediate-, and long-term effects of laboratory and medicine effects.
Data Processing: For unstructured clinical notes, we normalized the text and embedded sentences through SentenceTransformer (SBERT). For categorical predictors, very rare categories (<1%) were collapsed into clinically similar groups to reduce sparsity. For repeated lab and physiology values, we summarized them within the pre-defined time windows using minimum, maximum, mean, standard deviation, most recent value, and measurement count, to retain most signals while reducing noise and irregular sampling effects.
Model Development and Evaluations: We developed AKI models in MIMIC-IV using a training/validation/testing split of 60%/20%/20% and externally validated in MIMIC-III. We fit Elastic Net logistic regression, Random Forests, XGBoost, Deep Neural Network (DNN), Deep & Cross Network (DCN), and a multi-head Transformer, to cover classic regression, tree-based machine learning, and advanced deep learning methods. Discrimination AUC-ROC and standard classification metrics, including sensitivity/recall, specificity, accuracy, precision, and F1, were evaluated and compared.
For CKD after AKI, we modeled time to CKD with death as a competing event using the Fine–Gray method, and examined sex-modified hazards; we also explored a deep survival model DeepSurv. Model performance was evaluated using time-dependent AUC-ROC for classification accuracy.
Risk Factor and Sex Interaction Identification:
Key risk factors were identified using penalized logistic regression, model-specific feature importance for Random Forests and XGBoost, and SHAP and Integrated Gradients for DNN, DCN, and Transformer models. Effect magnitude and direction were interpreted from regression coefficients. using regression coefficients for two-way multiplicative interaction terms and Friedman–Popescu H-statistics to capture nonlinear, non-additive, higher-order effects.
Missing Data: In the AKI models, variables with >70% missingness were excluded. For variables with <=70% missingness, we imputed values using sex- and age-stratified (within +/- 2 years) medians as the primary approach. As a sensitivity check, we performed multiple imputation (10 repeats) using a sequential multiple imputation method assuming missing at random.
Sensitivity Analysis: Because automobile accidents caused a large percentage of AKI and the subjects might have different clinical profiles from other AKI patients, we repeated AKI analyses after excluding automobile/transport accident encounters.
For CKD and mortality outcomes, we also considered 60-day windows for CKD incidences and deaths because of possibly delayed time stamp for AKIs.
Implementation: We used both R and Python.

Patient Characteristics: In MIMIC-III, AKI accounted for 20.0% of eligible admissions (6,828/34,181); in MIMIC-IV, it was 13.1% (26,184/199,822). AKI patients were older, male-dominant, and more often Black. They were more frequently widowed and divorced. Insurance shifted toward Medicare and away from private coverage.
Among AKI patients, men had a slightly higher cumulative incidence of CKD (12.3% vs. 12.0% in MIMIC-IV) and developed it earlier than women (median 1.84 vs. 1.89 years in MIMIC-IV; 0.91 vs 1.06 in MIMIC-III). By 5 years after AKI, 3–4% more men had developed CKD than women; by 10 years, the gap widened to about 5% in MIMIC-IV and 16% in MIMIC-III.
AKI Model Performance: XGBoost outperformed other models in AUC-ROC (0.927 in MIMIC-IV testing set and 0.829 in external validation MIMIC-III) and predictive diagnosis for AKI. All DL models showed reduced AUC-ROC with external validation, with logistic had the smallest decline, suggesting the generalization of simple models.
AKI Risk Factors: Significant demographic variables include age, non-married status, Medicare insurance. Risk associated biomarkers include higher WBC (OR = 1.79), potassium (OR = 1.02 per mmol/L), and BUN (OR=1.02 per mg/dL) increased AKI odds, whereas higher sodium (OR = 0.97 per mmol/L), platelets (OR = 0.70 per 1000-scale unit), and hemoglobin were protective. Comorbidities including hypertension (OR = 1.43), diabetes (OR = 1.43), coronary artery disease (OR = 1.19), COPD (OR = 1.24), cancer (OR = 1.69), heart failure (OR = 2.40), and obesity (OR = 1.34) were independently associated with higher AKI risk.
Sex-Predictor Interaction: Serum creatinine showed a stronger association with AKI in men (OR = 1.014 per mg/dL) than in women (OR = 1.003), consistent with published reports. Liver disease history was a strong risk factor in both sexes (women OR = 3.71; men OR = 3.04) with modest attenuation in men (interaction ROR = 0.82). Sex modified the effects of several predictors: bicarbonate strengthened the protective effect in men (OR = 0.41 per mmol/L) compared with women (OR = 0.49; ROR = 0.84); higher hemoglobin’s protection was slightly attenuated in men (OR = 0.93 per g/dL vs. 0.86 in women); mechanical ventilation in the prior 30 days conferred higher risk in men (OR = 3.25) than in women (OR = 2.92; ROR = 1.11); and infection was strongly associated with AKI in both sexes with a slightly weaker effect in men (women OR = 3.48; men OR = 3.36; ROR = 0.97). H-statistics from RF highlighted additional sex–predictor interactions: age, private insurance, single marital status, and Black race, along with vascular comorbidities (hypertension, coronary artery disease, cerebrovascular disease) and the 7-day mean creatinine, complementing the regression findings by capturing nonlinear, higher-order interactions.
Predictors and Sex-interactions for CKD: For CKD after AKI, the competing-risk model showed significantly increased CKD hazard with cardiovascular comorbidities and higher potassium. Higher pH was protective in men (HR = 0.66) but not in women; higher sodium increased CKD hazard in men (HR=1.01 vs 0.99 per mmol/L); and creatinine had stronger positive associations in men (HR = 1.01 per mg/dL) but not in women. In the DeepSurv model, the most recent lab values were the most important predictors, followed by age, Medicare insurance, mechanical ventilation use, infection, diabetes, hypertension, and diuretic use.
Sex modified the effect of heart failure on mortality (competing event): there was a strong association in women (HR = 1.29) but ignorable risk in men (HR = 1.00), after adjusting for other factors.
Resource Sharing:
All Python and R codes, with steps and usage instructions, for data extraction, quality control, variable definitions, model and evaluations, are published on GitHub, allowing others to replicate analyses and adapt methods for other diseases. The resulted manuscript is submitted to Intensive Care Medicine for peer review.





Contributions to the scientific disciplines
AKI affects ~13–18% of U.S. inpatients and is more common in men. Sex differences in AKI reflect variation in baseline kidney function and comorbidity burden (cardiovascular disease, hypertension), with hormonal, immune, and hemodynamic influences only partly explaining the gap. Our work advanced a sex-aware view of AKI and CKD following AKI by showing that risk differences were largely conveyed through other predictors and sex–predictor interactions rather than sex alone. Demographics, insurance, comorbidity, and blood markers jointly produced the strongest AKI prediction; CKD hazards increased with age, hypertension, diabetes, heart failure, and recent diuretics. Innovations in our analyses include: (i) a strictly pre-event feature design that mirrors prospective decision-making and avoids leakage; (ii) external validation across MIMIC-III/IV; and (iii) multiple models that quantified sex heterogeneity across model classes, showing coherent interaction patterns (creatinine, bicarbonate, hemoglobin, ventilation, infection, age, insurance/marital status, Black race, vascular comorbidities).
Implications for diagnosis, treatment, and prevention
Our resulted models enable earlier identification of high-risk patients and quantified which predictors affect AKI and CKD differently by sex, informing sex-specific surveillance (e.g., closer post-AKI follow-up in men), procedure stewardship, and risk communication. Multiple biomarker–AKI association and their sex-interaction patterns, suggests sex-specific thresholding and alert strategies. These findings also support targeted prevention and more precise ICU and post-AKI care pathways.
Methodological impact
We delivered a reproducible, multi-modal, externally validated pipeline spanning penalized logistic regression, tree-based learning models, deep neural networks, transformer, Fine–Gray competing-risks for CKD, and DeepSurv. By pairing performance metrics with SHAP/Integrated Gradients and Friedman–Popescu H-statistics, we moved beyond black-box feature lists to quantify interaction strength, enabling clinically meaningful, sex-aware interpretation of high-dimensional EHR data. We also showed that while DL improves discrimination on development data, its external performance is comparable to simpler models, with logistic regression and XGboost as strong, interpretable default for EHR data, and using DL to reveal nonlinear, higher-order, sex-dependent risk. Finally, the prediction models provide a foundation for digital-twin what-if analyses, projecting how risk might change when modifiable biomarkers are shifted within clinically plausible ranges.
Future Studies
Our publicly shared pipelines and code will enable replication, benchmarking, and AKI model development in other EHR systems, and can be extended to other diseases and risk-stratification tasks.
Project status: We extracted and processed data, developed multiple ML models for AKI and for CKD after AKI using MIMIC-IV, and externally validated in MIMIC-III. We interpreted model results and drafted a manuscript. All code for data processing and model fitting is deposited on GitHub.
Modeling updates: For CKD after AKI, we revised the analysis to Fine–Gray competing-risk models (more robust), with death as a competing event. ICU data between AKI and CKD were too sparse, so the final models used only pre-event biomarkers from the prior 90 days with sex- and age-specific imputation. For deep learning, we used DeepSurv only for the time-to-event outcomes.
Key design choices and limitations:
Outcomes and predictors were summarized and compared across MIMIC-III and MIMIC-IV; any discrepancies (coding, units, missingness) were investigated and harmonized.
All models were developed in MIMIC-IV using a 60/20/20 train/validation/test split and externally validated in MIMIC-III.
We conducted sensitivity analyses to address missingness, case mix, and timing:
Methodologically, many AKI prediction models have published and majority included post-disease markers as predictors. To minimize target leakage (look-ahead bias), we limited predictors to data available before admission and thoroughly screened candidates. Even defining the target population required multiple iterations until both team members were satisfied.
Our project paired an industry ML expert with an academic statistician, both full-time and with families. The toughest challenge wasn’t the data and models; it was the clock. We traded late nights for early mornings, squeezing meetings between code writings and school pickups. We also had to bridge cultures: the industry drive for speed and performance vs. academia’s scrutiny of procedures, justification, and interpretation. We each learned tremendously from the other, and appreciate this competition for providing us the momentum (and deadline) to make this collaboration possible.