Early Prediction and Prognosis in Acute Kidney Injury Using a Biomarker-Aware Transformer: Retrospective Multicenter Study
Open Access
- 26 October 2026
- journal article
- Published by JMIR Publications Inc. in JMIR Medical Informatics
- Vol. 14, e90687
Abstract
Background: Acute kidney injury (AKI) is a common, life-threatening complication among hospitalized patients. Timely prediction is crucial for prevention, while accurate prognosis following onset is essential for guiding care. Although electronic health records (EHRs) provide rich longitudinal data, their high dimensionality, heterogeneity, and temporal complexity pose challenges for traditional machine learning. Objective: The aim of this study was to develop and evaluate a transformer-based model for generalizable AKI prediction and prognosis by modeling long-range temporal dependencies and complex relationships in heterogeneous EHR data and to examine its interpretability. Methods: We developed the Biomarker-Aware Transformer for AKI (BAT-AKI), which integrates multidimensional embeddings capturing temporal dynamics, textual descriptions, hierarchical ontology structures, and semantic relationships in EHRs. To enhance sensitivity to AKI-related biomarker fluctuations, BAT-AKI combines masked language modeling with a novel biomarker abnormality-aware pretraining task. The model was pretrained and fine-tuned for 4 tasks: AKI onset, early reversal, recovery at discharge, and 90-day post-AKI mortality. Pretraining and internal validation used data from the National Patient-Centered Clinical Research Network (PCORnet) site, with external validation across 3 additional sites. Results: BAT-AKI achieved the strongest overall discrimination, outperforming baseline models in area under the receiver operating characteristic curve (AUROC) and area under the precision-recall curve (AUPRC) on most tasks. For AKI onset prediction, it achieved an AUROC of 0.8549 (95% CI 0.8433-0.8658) and an AUPRC of 0.6041 (95% CI 0.5786-0.6292), exceeding the second-best baseline by 2.8% in AUROC and 8.1% in AUPRC. Across prognostic tasks, BAT-AKI achieved AUROCs of 0.6006 (95% CI 0.5703-0.6318), 0.6080 (95% CI 0.5745-0.6397), and 0.8017 (95% CI 0.7708-0.8311) and AUPRCs of 0.7036 (95% CI 0.6690-0.7388), 0.7417 (95% CI 0.7082-0.7765), and 0.5063 (95% CI 0.4422-0.5684) for early reversal, recovery at discharge, and 90-day post-AKI mortality, respectively, corresponding to relative gains of 2.4% to 6% in AUROC and 3.7% to 4.1% in AUPRC over the second-best baseline. Performance remained stable across external cohorts, with AKI onset AUROCs ranging from 0.7754 (95% CI 0.7677-0.7827) to 0.7989 (95% CI 0.7885-0.8092) and AUPRCs ranging from 0.4777 (95% CI 0.4631-0.4924) to 0.5687 (95% CI 0.5495-0.5871), corresponding to relative improvements of 3.7% to 5.3% in AUROC and 16.8% to 25.3% in AUPRC over the transformer baseline. In a low-resource setting using only 2% of the fine-tuning data, BAT-AKI achieved an AUROC of 0.7898 (95% CI 0.7759-0.8036) and an AUPRC of 0.4903 (95% CI 0.4640-0.5178) for AKI onset prediction, exceeding the second-best baseline by 4.2% in AUROC and 10.9% in AUPRC. Visualization of embeddings, attention patterns, and integrated-gradient feature attributions highlighted clinically meaningful relationships and patient-specific trajectories. Conclusions: BAT-AKI provides generalizable AKI prediction and prognosis with consistent discrimination across institutions, while offering interpretability insights into its predictions, supporting its potential for early warning and AKI care optimization.Keywords
All Related Versions
This publication has 32 references indexed in Scilit:
- HEART: Learning better representation of EHR data with a heterogeneous relation-aware transformerJournal of Biomedical Informatics, 2024
- Predicting Nephrotoxic Acute Kidney Injury in Hospitalized Adults: A Machine Learning AlgorithmKidney Medicine, 2024
- Characterization of Risk Prediction Models for Acute Kidney InjuryJAMA Network Open, 2023
- Estimating Baseline Serum Creatinine for Assessing Acute Kidney Injury: Not a One Size Fits All ApproachKidney International Reports, 2021
- Cross-site transportability of an explainable artificial intelligence model for acute kidney injury predictionNature Communications, 2020
- Internal and External Validation of a Machine Learning Risk Score for Acute Kidney InjuryJAMA Network Open, 2020
- BEHRT: Transformer for Electronic Health RecordsScientific Reports, 2020
- A clinically applicable approach to continuous prediction of future acute kidney injuryNature, 2019
- Global epidemiology and outcomes of acute kidney injuryNature Reviews Nephrology, 2018
- A Note on the Calculation of Empirical P Values from Monte Carlo ProceduresThe American Journal of Human Genetics, 2002