Transformer-based model for EHR data-derived development for prediction of kidney function trajectories in diabetic kidney disease
Abstract We aimed to develop a transformer-based model to predict kidney outcomes from longitudinal electronic health records (EHR) of patients with diabetes and normal kidney function, and compared it with. logistic regression (LR), support vector machine (SVM), LightGBM, and XGBoost. Using EHR data from 8,772 patients (Seoul National University Bundang Hospital, 2003–2014), we predicted ≥ 30% estimated Glomerular filtration rate (eGFR) decline and advanced chronic kidney disease (CKD) stage at 1, 3, 5, and 10 years (event 1.2–8.4%). ForeGFR decline, LightGBM and XGBoost both outperformed the transformer at every horizon (AUROC 0.68–0.80 vs. 0.56–0.75), for advanced CKD, the transformer-based model achieved AUROC of 0.77–0.85, comparable to the trees. At a matched operating point (recall 0.8), F1 scores were comparable across models. The transformer was overconfident and, unlike the trees, did not exceed treat-all net benefit in decision-curve analysis. It was, however, more robust to input degradation: retaining only 25% of laboratory values reduced AUROC by 0.03 versus 0.23–0.30 for the trees. Under temporal validation (training ≤ 2009, testing 2009–2016), AUROC fell by an average of 0.09. These findings support the technical feasibility of sequence models for EHR data while highlighting the need for recalibration and external validation before clinical use.
Authors
- Seong-Eun Moon (ORCID: https://orcid.org/0000-0001-7891-6930)
- Jinyeong Yi (ORCID: https://orcid.org/0000-0003-1478-1605)
- Sejoong Kim (ORCID: https://orcid.org/0000-0002-7238-9962)
- Hyung‐Jin Yoon (ORCID: https://orcid.org/0000-0003-4432-4894)
- Jiwon Ryu (ORCID: https://orcid.org/0000-0002-2372-8948)
- Haanju Yoo (ORCID: https://orcid.org/0000-0002-2306-8097)
Institutions
- Seoul National University (KR)
- Samsung (South Korea) (KR)
- Seoul National University Hospital (KR)
- Seoul National University Bundang Hospital (KR)
- Samsung Electronics (South Korea) (KR)
- Naver (South Korea) (KR)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-11-11
- DOI
- https://doi.org/10.1038/s41598-026-76546-1
- Primary Topic
- Machine Learning in Healthcare
- Type
- article
- Field-Weighted Citation Impact
- 0.00