Skip to main content
Frontiers in Clinical Diabetes and Healthcare logoLink to Frontiers in Clinical Diabetes and Healthcare
. 2026 May 26;7:1785125. doi: 10.3389/fcdhc.2026.1785125

Development and internal validation of an interpretable machine-learning model for identifying comorbid atrial fibrillation in patients with diabetic kidney disease

Xiaoran Li 1, Xueying Wang 2, Shidong Wang 1,*, Xuebing Zhang 1,*
PMCID: PMC13246348  PMID: 42273408

Abstract

Background

Patients with diabetic kidney disease (DKD) are at increased risk of atrial fibrillation (AF), yet tools to support identification of comorbid AF in this high-burden population remain limited. We aimed to develop and internally validate an interpretable machine-learning (ML) model for identifying concomitant AF in patients with DKD using routinely collected clinical data.

Methods

In this retrospective two-center cohort study (January 2021 to October 2025), 787 unique records of patients with DKD were randomly divided into training (70%) and test (30%) sets. AF status was defined as documented atrial fibrillation coexisting with DKD and was ascertained using electrocardiograms, Holter monitoring when available, and ICD-10 diagnostic codes with physician adjudication. Candidate predictors were routine clinical, laboratory, and echocardiographic variables. Least absolute shrinkage and selection operator (LASSO) regression was used for feature selection in the training set. Seven supervised models were trained; performance was assessed by area under the receiver-operating characteristic curve (AUC), calibration, and decision-curve analysis. SHAP quantified feature contributions.

Results

LASSO retained 14 features, including 24-hour urine total protein (24UTP), serum creatinine (SCr), age, and atrial dimensions. In the test set, the k-nearest neighbors (KNN) model achieved an AUC of 0.927, with an accuracy of 0.886, sensitivity of 0.920, and specificity of 0.856. Calibration was satisfactory, and decision-curve analysis showed net benefit across commonly used thresholds. Five-fold cross-validation yielded mean AUC 0.90 ± 0.02. SHAP analysis identified proteinuria burden, renal dysfunction, age, and atrial size as major contributors to model output. The final model was translated into a preliminary web-based calculator based on routinely available inputs.

Conclusions

An interpretable ML model incorporating routinely collected clinical and echocardiographic variables showed stable internal performance for identifying comorbid atrial fibrillation in patients with DKD. Because the model is intended to identify concomitant AF status rather than predict incident AF and has undergone internal validation only, further external and prospective validation is required before broader clinical application.

Keywords: atrial fibrillation (AF), comorbidity identification, diabetic kidney disease (DKD), machine learning (ML), Shapley additive explanations (SHAP)

1. Introduction

Diabetic kidney disease (DKD), one of the most common microvascular complications of diabetes, is a leading cause of end-stage renal disease and renal replacement therapy (1). DKD not only markedly increases the risk of kidney failure but is also closely associated with thrombosis, stroke, myocardial infarction, and all-cause mortality (25). The rising prevalence of DKD poses a major challenge to global health systems (6). Atrial fibrillation (AF), one of the most frequent cardiac arrhythmias, has increased in prevalence by 33% over the past two decades (7). Patients with AF have a 61% higher risk of all-cause death and face greater risks of cardiovascular mortality and stroke (8). Studies have shown that individuals with type 2 diabetes have a higher prevalence of AF than the general population, and this burden further increases among patients with DKD as estimated glomerular filtration rate (eGFR) declines and urinary protein excretion rises (9, 10). DKD and AF share several risk factors, including hypertension and coronary artery disease. Both conditions are influenced by thrombosis, systemic inflammation, and activation of the renin-angiotensin system (RAS), forming a bidirectional relationship (11). On one hand, eGFR decline and proteinuria in DKD may promote atrial remodeling and the presence of AF (12, 13); on the other hand, diabetic patients with AF are more likely to develop DKD, and AF can accelerate renal function deterioration and proteinuria progression in DKD (14, 15). This bidirectional interaction may contribute to worse clinical outcomes.

In clinical practice, AF is often paroxysmal or asymptomatic, particularly in its intermittent forms. Silent AF is frequently underdiagnosed or diagnosed late (16, 17), especially in patients with DKD, who may lack overt arrhythmic symptoms. As a result, opportunities for timely recognition and appropriate rhythm evaluation may be missed. This may contribute to progression of both DKD and AF and increase the risk of serious cardiovascular and cerebrovascular events. These challenges highlight the need for improved recognition of comorbid AF in patients with DKD and for practical, interpretable approaches to support clinical evaluation. Despite the growing clinical burden, no dedicated model for identifying comorbid AF in patients with DKD has been established. Existing tools show limited accuracy in identifying AF among these patients. Previous studies have mainly focused on the general population or on AF assessment outside the specific context of DKD. For example, some investigators combined clinical expertise with artificial intelligence (AI) analysis of 24-hour Holter recordings to improve AF detection rates (18). However, such approaches are difficult to implement widely because DKD patients often lack routine Holter monitoring. Other models based on AI analysis of sinus-rhythm electrocardiograms may aid in identifying paroxysmal AF, but their performance remains limited without incorporation of clinical and laboratory data (19).

Given the increasing prevalence and clinical significance of AF in DKD and the diagnostic limitations of current methods, a reliable and interpretable model to identify comorbid AF status in this population is needed. In this study, we developed and internally validated a machine learning (ML)-based model integrating clinical, laboratory, and echocardiographic variables to identify patients with DKD who have coexisting AF. Our aim was to provide a practical and interpretable tool based on routinely collected inpatient data to support recognition of concomitant AF status in patients with DKD.

2. Materials and methods

2.1. Study design and setting

This retrospective cohort study included adult patients with DKD who were hospitalized at Dongzhimen Hospital Affiliated to Beijing University of Chinese Medicine, and Beijing Electric Power Hospital between January 2021 and October 2025. A total of 814 hospitalizations were screened, of which 787 unique records met the eligibility criteria and were included in the analysis. The dataset was randomly divided into a training set (70%) and an internal test set (30%) using stratified sampling to preserve the proportion of AF status. Data were extracted by authorized personnel from identifiable electronic medical records to ensure accurate linkage, and all records were de-identified before analysis.

Ethical approval was obtained from the institutional review board of Dongzhimen Hospital Affiliated to Beijing University of Chinese Medicine (Approval No. 2025DZMEC-607-01). The ethics approval was mutually recognized by the ethics committees of Beijing Electric Power Hospital. Given the retrospective nature of the study, the requirement for informed consent was waived by the institutional review boards. All procedures followed the principles of the Declaration of Helsinki and complied with applicable national regulations. An overview of the study workflow is shown in Figure 1.

Figure 1.

Flowchart illustrating a machine learning study pipeline for diabetic kidney disease involving case selection, data preprocessing, feature selection, hyperparameter tuning, training with seven algorithms, performance evaluation, model selection, application using Shiny web, and interpretation with the SHAP method.

Study workflow and model development framework. The image illustrates the overall process of case selection, data preprocessing, feature selection, model development and evaluation, and result interpretation. A total of 787 eligible records and 26 candidate variables were included and randomly divided into a training set (n = 550) and a test set (n = 237) in a 7:3 ratio.

2.2. Endpoint definition

The primary endpoint was documented AF coexisting with DKD. AF was identified using a combination of diagnostic sources, including standard 12-lead electrocardiograms, 24-hour Holter monitoring when available, and International Classification of Diseases, Tenth Revision (ICD-10) diagnostic codes extracted from the electronic medical record. Each case was independently reviewed and confirmed by two physicians to ensure diagnostic accuracy.

Candidate predictors were defined as variables routinely collected during standard inpatient care. For predictors with repeated measurements, the first available value recorded in the medical record was used for analysis. Because a previous diagnosis of AF was not an exclusion criterion, AF may have been present before or documented during the index hospitalization. Accordingly, these predictors were interpreted as routinely collected inpatient features associated with concomitant AF status rather than as measurements guaranteed to precede AF onset. The study objective was to identify concomitant AF status in patients with DKD rather than to predict incident AF.

2.3. Participant selection

Participants were identified according to the Chinese Clinical Guidelines for DKD (20) and the diagnostic criteria outlined in the Chinese Guidelines for the Management of AF (2025 edition) (21). Eligible patients were required to meet all of the following inclusion criteria: (1) age between 18 and 95 years (inclusive); (2) both sexes; (3) diagnosis of diabetes mellitus consistent with Chinese and World Health Organization criteria; and (4) diagnosis of diabetic kidney disease confirmed by clinical assessment and laboratory findings in accordance with guideline recommendations.

Exclusion criteria included (1) type 1 diabetes, gestational diabetes, or other specific forms of diabetes; (2) coexisting primary renal diseases such as primary glomerulonephritis, lupus nephritis, or Henoch-Schönlein purpura nephritis (3) ongoing systemic glucocorticoid or immunosuppressive therapy; (4) concomitant malignant tumors, decompensated liver cirrhosis, active tuberculosis, infectious shock, disseminated intravascular coagulation, or other critical or terminal illnesses; and (5) major limb amputation within the preceding six months.

Additional cardiac-related exclusions were (1) pacemaker or implantable cardioverter defibrillator implantation; (2) other clinically significant sustained tachyarrhythmias, such as sustained supraventricular tachycardia, excluding atrial flutter; and (3) a history of major cardiac surgery, including valve replacement or coronary artery bypass grafting. A previous diagnosis of atrial fibrillation was not an exclusion criterion because the study focused on identifying comorbid AF status rather than incident or newly diagnosed cases.

2.4. Variable collection and measurements

Information extracted from the electronic medical record comprised three domains: (1) demographics and clinical data, such as sex, age, height, weight, blood pressure, and diabetes duration; (2) laboratory tests, including complete blood count, urinalysis, biochemical profiles, arterial blood gas analysis, coagulation parameters, thyroid function, tumor markers, cardiac enzymes, and heart failure biomarkers; and (3) transthoracic echocardiographic findings.

The final predictor set used for model construction consisted of routinely available variables recorded during standard inpatient care, including HbA1c (glycated hemoglobin, %), BUN (blood urea nitrogen, mmol/L), SCr (serum creatinine, μmol/L), BNP (B-type natriuretic peptide, pg/mL), ALT (U/L), AST (U/L), CK-MB (U/L), Myo (myoglobin, ng/mL), WBC (×109/L), RBC (×10¹²/L), 24UTP (24-hour urine total protein, g/24 h), INR, APTT (s), FIB (g/L), LAAPD (left atrial anterior-posterior diameter, mm), LAMLD (left atrial medial–lateral diameter, mm), LASID (left atrial superior-inferior diameter, mm), RAMLD (right atrial medial-lateral diameter, mm), RASID (right atrial superior-inferior diameter, mm), EF (%), and FS (%), as well as sex.

Echocardiography was performed by certified sonographers following a standardized institutional protocol using the same equipment platform. LAAPD was measured in the parasternal long-axis view at end-systole. LAMLD, LASID, and their right-atrial counterparts RAMLD and RASID were obtained from orthogonal apical views in medial-lateral and superior-inferior planes. All diameters were recorded from inner edge to inner edge and averaged over three cardiac cycles. A random 10% subset was re-measured to evaluate intra- and inter-observer consistency, with observed variability below 5%.

These variables were used to characterize the clinical, laboratory, and echocardiographic profile present during routine inpatient assessment and were not intended to represent exposures that necessarily preceded AF onset.

2.5. Data preprocessing and handling of missing data

Variables with more than 20% missingness were excluded a priori. For the remaining predictors, for which overall missingness was typically less than 10%, missing values were imputed using the MissForest algorithm with default parameter settings and 100 trees. Imputation was performed on the analytic dataset before downstream model development. Categorical variable harmonization followed a unified data dictionary, and rare categories with a prevalence below 2% were merged to ensure model stability.

2.6. Feature selection, model development, and hyperparameter tuning

Feature selection was performed using the least absolute shrinkage and selection operator (LASSO) regression in the training dataset. A ten-fold cross-validation procedure was applied using the glmnet package in R to identify a parsimonious subset of variables with the strongest discriminative contribution. The optimal penalty parameter (λ) was chosen according to the minimum cross-validated deviance criterion, and the selected features were used for subsequent model construction.

Seven supervised machine learning algorithms were trained using the selected predictors: gradient boosting decision tree (GBDT), k-nearest neighbors (KNN), linear discriminant analysis (LDA), Light Gradient Boosting Machine (LightGBM), random forest (RF), artificial neural network (ANN), and extreme gradient boosting (XGBoost). Each algorithm was trained separately to capture different model structures and learning strategies.

Hyperparameters were tuned using stratified five-fold cross-validation within the training dataset through either grid search or randomized search. For the KNN classifier, hyperparameters were tuned using five-fold GridSearchCV in the training set. Specifically, n_neighbors was searched over the range of 1 to 10, the weighting scheme was evaluated as either uniform or distance, and the distance metric was defined using the Minkowski formulation with p = 1 or p = 2, corresponding to Manhattan and Euclidean distance, respectively. No additional variable standardization or normalization was applied in the implemented workflow. After missing-data handling and variable harmonization, feature selection, model training, and hyperparameter tuning were conducted using the training data only. Because the prevalence of atrial fibrillation was approximately balanced between groups, no oversampling, undersampling, or class weighting was applied. For decision-curve and clinical-impact analyses, probability thresholds were prespecified before evaluation. For classification metrics, binary class labels were generated using each fitted model’s default prediction rule, without additional manual threshold adjustment.

2.7. Model evaluation, validation, interpretability, and software

Model performance was evaluated in both the training and test datasets. Discrimination was assessed using the area under the receiver-operating characteristic curve (AUC), with accuracy, sensitivity, specificity, precision, and F1-score as complementary metrics. Calibration was evaluated by the Brier score, calibration intercept and slope, and visual inspection of calibration plots generated with LOESS smoothing. Decision-curve analysis (DCA) was applied to estimate net clinical benefit across prespecified probability thresholds ranging from 5% to 20% for identifying comorbid AF. Clinical-impact curves were used to illustrate the number of individuals classified as positive by the model and the corresponding number of true positives per 1, 000 patients at representative thresholds. Model interpretability was examined for the k-nearest neighbors classifier using KernelSHAP, which quantified the contribution of each predictor to individual model outputs. SHAP values were computed using the same model inputs as those used for KNN training, with a background set of 100 training instances selected by k-medoids sampling to approximate the empirical data distribution.

Descriptive statistical analyses were performed using SPSS version 25.0. Penalized regression for feature selection was conducted in R 4.4.1. All machine-learning models and visualizations, including receiver-operating characteristic, calibration, decision-curve, clinical-impact, and SHAP plots, were implemented in Python 3.10.4 using standard scientific libraries. The final model was further translated into a preliminary web-based calculator. This tool allows users to enter routinely available variables and obtain individualized estimates of comorbid AF likelihood in real time. At this stage, the calculator is intended for preliminary demonstration and internal assessment within the study setting rather than as a substitute for clinical judgment. Because the model has undergone internal validation only, the calculator should not be generalized to other populations or care settings without further external and prospective validation.

3. Results

3.1. Demographic and baseline characteristics

A total of 787 eligible DKD records were included and randomly divided in a 7:3 ratio into the training set (n = 550) and the test set (n = 237). Overall, 410 patients (52.10%) were in the non-AF group and 377 (47.90%) were in the AF group. In the training set, 287 patients (52.18%) were non-AF and 263 (47.82%) had AF; in the test set, 123 patients (51.90%) were non-AF and 114 (48.10%) had AF. No significant differences were observed between the two sets in age, diabetes duration, HbA1c, SCr, BNP, EF, or sex distribution (male 41.8% vs. 41.5%, P = 0.934), indicating comparable baseline characteristics (Table 1).

Table 1.

Baseline characteristics of the study population across training and test cohorts.

Variables Total (n = 787) test (n = 237) train (n = 550) P
Age, M (Q1, Q3) 70.00 (59.00, 78.50) 69.00 (59.00, 78.00) 70.00 (59.00, 78.75) 0.624
Duration Of DM, M (Q1, Q3) 17.00 (10.00, 22.00) 17.36 (10.00, 22.00) 17.00 (10.00, 22.00) 0.699
Height, M (Q1, Q3) 164.00 (154.95, 174.00) 164.00 (154.90, 173.60) 164.00 (155.00, 174.17) 0.652
Weight, M (Q1, Q3) 70.00 (62.15, 78.10) 70.00 (62.50, 77.00) 69.78 (62.10, 78.83) 0.845
Hba1c, M (Q1, Q3) 7.73 (6.62, 8.88) 7.78 (6.65, 8.84) 7.73 (6.59, 8.95) 0.989
BUN, M (Q1, Q3) 9.20 (6.45, 13.15) 9.60 (6.50, 13.70) 9.05 (6.43, 12.88) 0.366
SCr, M (Q1, Q3) 109.30 (82.10, 171.30) 107.20 (81.70, 167.60) 110.40 (82.62, 172.45) 0.927
BNP, M (Q1, Q3) 162.51 (50.08, 315.47) 162.80 (49.59, 308.62) 161.40 (50.26, 325.00) 0.783
AST, M (Q1, Q3) 19.30 (14.90, 24.45) 19.30 (15.00, 24.00) 19.25 (14.90, 24.67) 0.868
CK-MB, M (Q1, Q3) 2.80 (1.80, 4.50) 2.70 (1.80, 4.49) 2.80 (1.80, 4.50) 0.739
Myo, M (Q1, Q3) 56.85 (31.00, 111.43) 55.55 (30.10, 110.90) 57.24 (31.12, 111.51) 0.892
WBC, M (Q1, Q3) 2.00 (2.00, 6.85) 2.00 (2.00, 6.40) 2.00 (2.00, 7.42) 0.516
RBC, M (Q1, Q3) 2.00 (2.00, 2.85) 2.00 (2.00, 2.80) 2.00 (2.00, 2.88) 0.988
24UTP, M (Q1, Q3) 2501.19 (382.10, 5502.69) 1932.20 (313.10, 5495.08) 2567.73 (399.12, 5488.74) 0.478
INR, M (Q1, Q3) 0.99 (0.90, 1.10) 1.00 (0.91, 1.12) 0.99 (0.90, 1.10) 0.266
APTT, M (Q1, Q3) 31.80 (28.85, 35.20) 31.80 (28.80, 35.00) 31.80 (28.90, 35.20) 0.622
FIB, M (Q1, Q3) 3.50 (2.95, 4.20) 3.49 (2.90, 4.20) 3.50 (3.00, 4.20) 0.713
LAAPD, M (Q1, Q3) 38.20 (33.90, 42.70) 38.10 (34.00, 43.20) 38.25 (33.71, 42.50) 0.697
LAMLD, M (Q1, Q3) 38.70 (33.02, 44.00) 38.97 (33.06, 44.90) 38.51 (33.01, 43.88) 0.418
LASID, M (Q1, Q3) 53.00 (46.91, 59.95) 53.00 (46.90, 60.00) 52.95 (46.93, 59.20) 0.475
RAMLD, M (Q1, Q3) 32.40 (29.00, 37.61) 33.00 (29.30, 38.70) 32.17 (29.00, 37.00) 0.224
RASID, M (Q1, Q3) 46.10 (41.05, 50.00) 46.00 (41.00, 50.00) 46.20 (41.10, 50.00) 0.878
EF, M (Q1, Q3) 65.10 (60.31, 69.95) 64.50 (60.60, 69.30) 65.57 (60.20, 70.29) 0.217
FS, M (Q1, Q3) 36.00 (32.00, 39.20) 35.90 (32.20, 39.00) 36.00 (31.90, 39.38) 0.486
Gender, n(%) 0.934
Male 327 (41.55) 99 (41.77) 228 (41.45)
Female 460 (58.45) 138 (58.23) 322 (58.55)

Data are presented as median (Q1, Q3) or n (%). Comparisons between the training and test cohorts used the Wilcoxon rank-sum test for continuous variables and the χ² test (or Fisher’s exact test when expected counts <5) for categorical variables. Two-sided P values; α=0.05.

DM, diabetes mellitus; HbA1c, glycated hemoglobin; BUN, blood urea nitrogen; SCr, serum creatinine; BNP, B-type natriuretic peptide; ALT, alanine aminotransferase; AST, aspartate aminotransferase; CK-MB, creatine kinase-MB; Myo, myoglobin; WBC, white blood cell; RBC, red blood cell; 24UTP, 24-hour urine total protein; INR, international normalized ratio; APTT, activated partial thromboplastin time; FIB, fibrinogen; LAAPD left atrial anterior–posterior diameter; LAMLD left atrial medial-lateral diameter; LASID left atrial superior-inferior diameter; RAMLD right atrial medial-lateral diameter; RASID right atrial superior-inferior diameter; EF ejection fraction; FS fractional shortening; Units and measurement methods are described in Methods.

Within the training set, patients with comorbid AF differed significantly from those without AF (Table 2). Patients in the AF group were older (P < 0.001), had a longer duration of diabetes (P = 0.013), and higher body weight (P < 0.001). Although HbA1c levels were slightly lower in the AF group, the difference reached statistical significance (P = 0.023). Renal and cardiac biomarker levels, including BUN, SCr, CK-MB, and myoglobin, were significantly higher in patients with AF (all P < 0.01), and BNP levels were markedly elevated in the AF group (P < 0.001). Echocardiographic assessment showed that atrial dimensions (LAAPD, LAMLD, LASID, RAMLD, and RASID) were significantly larger in the AF group compared with the non-AF group (all P < 0.001), while left ventricular systolic function indices, including EF and FS, were significantly lower in patients with AF (both P < 0.001).

Table 2.

Baseline characteristics of the study population across training cohorts.

Variables Total (n = 550) No Atrial fibrillation
(n = 287)
Atrial fibrillation
(n = 263)
P
Age, M (Q1, Q3) 70.00 (59.00, 78.75) 62.00 (53.00, 72.00) 75.00 (67.00, 82.00) <.001
Duration Of Dm, M (Q1, Q3) 17.00 (10.00, 22.00) 16.00 (10.00, 22.00) 18.00 (11.00, 23.00) 0.013
Height, M (Q1, Q3) 164.00 (155.00, 174.17) 163.30 (154.62, 173.86) 165.20 (155.45, 174.85) 0.318
Weight, M (Q1, Q3) 69.78 (62.10, 78.83) 67.80 (61.55, 75.69) 72.60 (63.35, 80.95) <.001
Hba1c, M (Q1, Q3) 7.73 (6.59, 8.95) 7.79 (6.71, 9.19) 7.63 (6.54, 8.69) 0.023
BUN, M (Q1, Q3) 9.05 (6.43, 12.88) 8.60 (6.10, 11.45) 9.70 (7.05, 14.85) <.001
SCr, M (Q1, Q3) 110.40 (82.62, 172.45) 103.70 (78.95, 145.00) 121.30 (88.80, 211.70) <.001
BNP, M (Q1, Q3) 161.40 (50.26, 325.00) 94.45 (27.58, 182.22) 249.29 (125.24, 445.12) <.001
ALT, M (Q1, Q3) 14.90 (11.40, 21.55) 13.50 (10.10, 20.65) 15.60 (13.20, 22.10) <.001
AST, M (Q1, Q3) 19.25 (14.90, 24.67) 18.00 (14.00, 24.30) 20.40 (15.35, 25.10) 0.022
CK-MB, M (Q1, Q3) 2.80 (1.80, 4.50) 2.50 (1.60, 3.90) 3.20 (2.00, 5.63) <.001
Myo, M (Q1, Q3) 57.24 (31.12, 111.51) 51.00 (28.90, 95.19) 61.00 (33.90, 134.65) 0.002
WBC, M (Q1, Q3) 2.00 (2.00, 7.42) 2.00 (2.00, 9.65) 2.00 (2.00, 4.80) 0.045
RBC, M (Q1, Q3) 2.00 (2.00, 2.88) 2.00 (2.00, 2.90) 2.00 (2.00, 2.75) 0.542
24UTP, M (Q1, Q3) 2567.73 (399.12, 5488.74) 1800.61 (176.90, 4612.15) 3660.03 (855.95, 6257.25) <.001
INR, M (Q1, Q3) 0.99 (0.90, 1.10) 1.08 (0.98, 1.21) 0.91 (0.88, 1.00) <.001
APTT, M (Q1, Q3) 31.80 (28.90, 35.20) 32.20 (28.70, 36.70) 31.57 (29.00, 33.80) 0.024
FIB, M (Q1, Q3) 3.50 (3.00, 4.20) 3.50 (2.90, 4.32) 3.57 (3.00, 4.10) 0.946
LAAPD, M (Q1, Q3) 38.25 (33.71, 42.50) 35.10 (32.10, 40.20) 40.00 (36.60, 44.30) <.001
LAMLD, M (Q1, Q3) 38.51 (33.01, 43.88) 35.00 (31.41, 38.85) 42.50 (37.00, 45.95) <.001
LASID, M (Q1, Q3) 52.95 (46.93, 59.20) 49.02 (45.17, 53.58) 57.50 (50.35, 60.00) <.001
RAMLD, M (Q1, Q3) 32.17 (29.00, 37.00) 30.20 (27.85, 32.90) 35.40 (31.00, 41.20) <.001
RASID, M (Q1, Q3) 46.20 (41.10, 50.00) 43.80 (40.75, 47.30) 49.80 (42.45, 50.00) <.001
EF, M (Q1, Q3) 65.57 (60.20, 70.29) 66.76 (63.45, 71.10) 63.30 (57.00, 69.45) <.001
FS, M (Q1, Q3) 36.00 (31.90, 39.38) 36.90 (34.33, 40.00) 34.40 (29.10, 38.75) <.001
Gender, n(%) <.001
Male 228 (41.45) 147 (51.22) 81 (30.80)
Female 322 (58.55) 140 (48.78) 182 (69.20)

Data are presented as median (Q1, Q3) or n (%). Group comparisons (No AF vs AF) used the Wilcoxon rank-sum test for continuous variables and the χ² test or Fisher’s exact test for categorical variables (when expected counts <5). Two-sided P values; α=0.05. AF indicates atrial fibrillation (clinically diagnosed). Other abbreviations as in Table 1.

DM, diabetes mellitus; HbA1c, glycated hemoglobin; BUN, blood urea nitrogen; SCr, serum creatinine; BNP, B-type natriuretic peptide; ALT, alanine aminotransferase; AST, aspartate aminotransferase; CK-MB, creatine kinase-MB; Myo, myoglobin; WBC, white blood cell; RBC, red blood cell; 24UTP, 24-hour urine total protein; INR, international normalized ratio; APTT, activated partial thromboplastin time; FIB, fibrinogen; LAAPD left atrial anterior–posterior diameter; LAMLD left atrial medial-lateral diameter; LASID left atrial superior-inferior diameter; RAMLD right atrial medial-lateral diameter; RASID right atrial superior-inferior diameter; EF ejection fraction; FS fractional shortening; Units and measurement methods are described in Methods.

Bold values indicate elements with statistical significance (p<0.05).

In addition, the proportion of women was significantly higher in the AF group than in the non-AF group (69.2% vs. 48.8%, P < 0.001).

3.2. Feature selection

Feature selection was performed using the LASSO regression with tenfold cross-validation in the training set. This approach retained variables with the strongest discriminative contribution. Model performance metrics were monitored across iterations to identify the subset with the best cross-validated performance.

As shown in Figure 2A, the mean cross-validation curve indicated stable convergence, and the corresponding coefficient profiles are presented in Figure 2B. Fourteen variables with non-zero coefficients were ultimately retained: 24UTP, SCr, age, LAMLD, weight, LASID, LAAPD, RAMLD, FS, BUN, HbA1c, CK-MB, FIB, and INR. These features were subsequently used for model development.

Figure 2.

Two-panel figure. Panel A is a line chart with red dots and error bars showing binomial deviance versus log lambda, with the minimum near log lambda of negative five, and two vertical dashed lines marking relevant lambda values. Panel B is a line plot of multiple colored coefficient trajectories against log lambda, with coefficients approaching zero as log lambda decreases. Both plots have corresponding feature counts labeled above the x-axis.

LASSO feature selection. (A) The curve showing the change in binomial deviance with log(λ) under 10-fold cross-validation, with vertical dashed lines indicating λ_min and λ_1se, and the top axis showing the number of non-zero coefficients at different penalty strengths. (B) Coefficient path plot: The regression coefficients of each candidate variable gradually shrink toward zero as log(λ) increases, with the final non-zero coefficients forming the selected feature set for the model.

3.3. Model performance comparison

Seven supervised machine-learning algorithms were trained using the selected features: KNN, RF, XGBoost, LightGBM, GBDT, LDA, and ANN. In the training set, all models showed acceptable to good discrimination (Figure 3A). The KNN model achieved the highest AUC (0.933) with an accuracy of 0.8745, sensitivity of 0.9077, specificity of 0.8448, and a Brier score of 0.100. RF, XGBoost, and LightGBM performed comparably, with AUCs of 0.9200, 0.9196, and 0.9144, respectively (Table 3).

Figure 3.

Panel of six machine learning model evaluation charts, labeled A to F. Panels A and D show training and test set ROC curve comparisons, demonstrating model discrimination. Panels B and E display calibration curves for training and test sets, assessing prediction accuracy. Panels C and F illustrate decision curve analysis for training and test sets, comparing net benefit across models and treatment thresholds. Individual models including GBDT, KNN, LDA, LightGBM, Random Forest, ANN, and XGBoost are represented by distinct colors in each plot.

Comparison of model performance across multiple algorithms in the training and test sets. (A) Receiver operating characteristic (ROC) curves in the training set for the seven candidate algorithms; the dashed diagonal line indicates chance-level discrimination. (B) Calibration curves in the training set. The diagonal dashed line represents perfect agreement between predicted and observed probabilities. The Brier score, shown in the panel, quantifies the overall error of probabilistic predictions, with lower values indicating better calibration and predictive accuracy. (C) Decision-curve analysis (DCA) in the training set. Net benefit is plotted across a range of threshold probabilities, with the “treat-all” and “treat-none” strategies shown as reference lines. (D) ROC curves in the test set. (E) Calibration curves in the test set, with the Brier score annotated; lower values indicate better agreement between predicted risk and observed outcome. (F) DCA in the test set.

Table 3.

Performance of seven machine learning models in the training and test sets.

Data set Model Accuracy Sensitivity Specificity F1 AUC Brier
Train GBDT 0.8873 0.9195 0.8581 0.8856 0.9266 0.093
KNN 0.8745 0.9077 0.8448 0.8725 0.9326 0.100
LDA 0.7891 0.8022 0.7762 0.7906 0.8427 0.158
LightGBM 0.8800 0.8967 0.8638 0.8804 0.9144 0.106
RF 0.8855 0.9098 0.8627 0.8848 0.9200 0.109
ANN 0.7673 0.7508 0.7878 0.7816 0.8220 0.098
XGBoost 0.8818 0.9060 0.8592 0.8812 0.9196 0.094
Test GBDT 0.8819 0.9266 0.8438 0.8783 0.9042 0.104
KNN 0.8861 0.9196 0.8560 0.8841 0.9271 0.094
LDA 0.7806 0.8000 0.7623 0.7797 0.8164 0.176
LightGBM 0.8650 0.9009 0.8333 0.8621 0.8791 0.123
RF 0.8523 0.8981 0.8140 0.8472 0.8955 0.118
ANN 0.7468 0.7521 0.7414 0.7521 0.8012 0.194
XGBoost 0.8945 0.9444 0.8527 0.8908 0.9162 0.094

Performance is reported on the training and held-out test sets. Accuracy, Sensitivity (recall), Specificity, F1-score, AUC (area under the ROC curve), and Brier score (lower is better) are shown.

Models: GBDT, gradient boosting decision tree; KNN, k-nearest neighbors; LDA, linear discriminant analysis; LightGBM, Light Gradient Boosting Machine; RF, random forest; ANN, artificial neural network; XGBoost, extreme gradient boosting.

In the test set (Figure 3D), the KNN model maintained the best overall performance, with an AUC of 0.9271, an accuracy of 0.8861, a sensitivity of 0.9196, and a specificity of 0.8560. XGBoost achieved the lowest Brier score (0.094), while RF and LightGBM yielded AUCs of 0.8955 and 0.8791, respectively. Although LightGBM had a slightly higher Brier score (0.123), its calibration remained within an acceptable range (Table 3).

Calibration curves showed good agreement between model-estimated and observed probabilities for all models (Figures 3B, E). Decision-curve analysis indicated that KNN and XGBoost provided the greatest net clinical benefit across most threshold ranges for identifying comorbid AF (Figures 3C, F). Five-fold cross-validation further confirmed the robustness of model performance, with an average AUC of 0.90 ± 0.02 (Supplementary Figure 1). Taken together, KNN demonstrated the most favorable balance of discrimination, calibration, and generalization among the evaluated models.

In sensitivity analyses excluding INR and FIB, the KNN modeling procedure was repeated under three different stratified 7:3 random splits (random seeds 42, 123, and 2024). The resulting test-set AUCs were 0.774, 0.800, and 0.819, respectively. Accuracy, sensitivity, specificity, precision, F1-score, and Brier score also remained within a relatively narrow range across the three splits. These findings indicate that model performance decreased after exclusion of INR and FIB but remained acceptable across the three data splits (Supplementary Table 2).

3.4. Model interpretation and SHAP analysis

To explore the interpretability of the KNN model and quantify the contribution of each feature, SHAP analysis was applied (Figure 4). The mean absolute SHAP value plot (Figure 4A) identified age, SCr, LAAPD, and 24UTP as the features with the greatest contribution to model output. Among these features, 24UTP showed the highest mean SHAP value, indicating the greatest overall contribution to model output.

Figure 4.

Multi-panel figure displays SHAP feature importance analysis for a model. Panel A shows a horizontal bar chart ranking features by mean SHAP value, with 24UTP highest. Panel B presents a summary dot plot of SHAP values across features, color-coded by feature value. Panels C and D offer SHAP decision plots tracing model output for individual samples. Panels E and F present waterfall plots detailing each feature’s SHAP contribution to model predictions for two cases.

SHAP interpretability analysis of the optimal KNN model. (A) SHAP feature importance plot showing the overall contribution of variables to model output, with 24UTP, SCr, and age-related indicators ranking among the most influential features. (B) SHAP summary plot. Each point represents one individual. The horizontal position indicates the direction and magnitude of a feature’s contribution to the model output: positive SHAP values push the prediction toward atrial fibrillation, whereas negative SHAP values push it away. Color represents the relative feature value (high or low). (C, D) Decision plot and force plot for representative individuals, illustrating how multiple features cumulatively increase or decrease the model-predicted probability. Red and blue indicate positive and negative contributions, respectively, and the endpoint represents the final estimated probability. (E, F) Waterfall plots showing the stepwise contribution of each feature to the final model prediction for representative cases. Notably, SHAP analysis reflects data-driven contributions within the trained model and should be interpreted as model explanation rather than evidence of causality. For certain echocardiographic variables, including atrial dimensions, the direction of association in this cohort differs from conventional structural paradigms of atrial fibrillation, highlighting the nonlinear and context-specific nature of model-based prediction.

The SHAP summary plot (Figure 4B) illustrated the distribution of feature effects across all samples. Each point represents a single observation, with color indicating the feature value (red for high, blue for low) and position reflecting its positive or negative contribution to the model output. SHAP contributions varied across the feature value range, with both positive and negative contributions observed depending on the variable and its magnitude.

To visualize individual-level model outputs, representative force and waterfall plots were generated (Figures 4C–F). These plots demonstrated how individual features shifted the model output toward or away from the AF classification, highlighting the cumulative contribution of multiple features. Overall, proteinuria burden and renal function measures were among the major contributors to model output.

3.5. Clinical impact curve analysis

To assess the clinical utility of the model, clinical impact curves (CICs) for the KNN classifier were generated in both the training and test sets (Figures 5A, B). As the decision threshold increased, the number of patients classified as positive by the model (blue line) gradually decreased. The number of true positives (red line) closely overlapped with the number of observed AF cases (green dashed line), indicating good agreement between model classifications and observed AF status.

Figure 5.

Panel A shows a clinical impact curve for the KNN model on training data, plotting risk threshold against the number of patients, with blue for number high risk, red for high risk with event, and green for observed events. Panel B presents the same format for the KNN model on test data, similarly displaying the number high risk, number high risk with event, and observed events using the same color scheme.

Clinical impact curve analysis (CIC) of the optimal KNN model. Clinical impact curves for the training set (A) and test set (B) across different threshold probabilities. The blue line represents the number of individuals classified by the model as high risk (predicted positive) at each threshold. The red line represents the number of true-positive cases among those identified as high risk. The green dashed line represents the observed number of atrial fibrillation cases in the dataset. Together, these curves illustrate the clinical implications of using different decision thresholds.

Across commonly used decision thresholds, the KNN model consistently demonstrated favorable clinical utility and net benefit. The training and test set curves showed similar patterns, consistent with stable internal performance.

3.6. Web calculator application

The final KNN model was translated into a preliminary web-based calculator for use within the study setting (Figure 6). The interface allows users to enter 14 routinely available variables and obtain an individualized estimate of comorbid AF likelihood in real time. The output provides the model-estimated probability together with a categorical classification label to facilitate interpretation. The prototype is currently available through a web-based interface for demonstration purposes: https://endocrine-dzm-af-prediction-model.shinyapps.io/shiny/.

Figure 6.

Screenshot of a predictive model interface with sliders for medical variables such as age, weight, Hba1c, BUN, Scr, CKMB, INR, FIB, LAAPD, LAMLD, LASID, RAMLD, FS, and UTP. A donut chart on the right displays risk, with a section labeled AF in yellow occupying the majority, and a central text stating Risk sixty-seven point two percent.

User interface of the web-based calculator derived from the final KNN model. The image shows the web-based calculator developed from the final KNN model using the Shiny framework. Users can input 14 routinely available variables to obtain individualized estimates of comorbid atrial fibrillation likelihood in patients with diabetic kidney disease. The calculator is presented here as a preliminary prototype derived from the internally validated model.

4. Discussion

To our knowledge, this is the first machine learning-based clinical model developed to identify comorbid AF in patients with DKD. Using routinely collected clinical, laboratory, and echocardiographic data, we compared seven ML algorithms. In our dataset, KNN showed the best overall performance. KNN is a nonparametric supervised method that classifies a sample according to its nearest neighbors, requires relatively few hyperparameters, and is straightforward to implement (22). Prior studies have used KNN for clinical risk stratification in sleep apnea, coronary artery disease, and AF among intensive care unit patients (23, 24). To improve transparency, we applied SHAP to interpret model outputs and quantify feature contributions, consistent with earlier AF modeling studies (25, 26). Key features highlighted by SHAP were clinically plausible and readily obtainable during routine inpatient evaluation. We also implemented a web calculator as a preliminary demonstration tool based on the internally validated model. Because the required inputs are routinely available in inpatient practice, this prototype may support internal assessment within similar study settings, although broader applicability requires independent external validation. Because patients with pre-existing AF were not excluded and predictors were derived from routinely collected inpatient measurements, some variables may reflect correlates or consequences of established AF. The model should therefore be interpreted primarily as identifying DKD patients with concomitant AF-associated clinical phenotypes rather than predicting future AF onset. In clinical practice, the model may be used as a supplementary tool in hospitalized patients with DKD. It may help identify those who need closer rhythm surveillance or further ECG or Holter evaluation.

The selected features mainly reflected two domains: renal metabolic burden and cardiac structural and functional remodeling. Together, these patterns were biologically relevant to comorbid AF in DKD. Indicators of renal impairment and proteinuria emerged as dominant signals. Higher SCr and greater 24UTP were consistent with prior studies showing that kidney dysfunction and protein loss are associated with AF occurrence, often in a dose-response pattern (12, 13, 27). BUN showed similar associations and has also been retained in critical care AF modeling studies (25, 28). From a pathophysiological perspective, these findings support the concept of cardiorenal interaction in DKD. Impaired renal function, persistent proteinuria, systemic inflammation, activation of the renin-angiotensin-aldosterone system, and sodium-water retention may jointly contribute to volume overload, atrial stretch, and progressive atrial remodeling, all of which are relevant to AF-associated clinical phenotypes (29). In parallel, aging and obesity were strong clinical correlates. The risk of AF increases steadily with advancing age, likely because of atrial remodeling, reduced conduction velocity, and sinoatrial node dysfunction (3033). Excess body weight is also associated with incident AF and with progression from paroxysmal to persistent AF through mechanisms such as hemodynamic overload, hypertension, inflammation, and oxidative stress (3437). Obesity is also strongly linked to the onset and progression of DKD, highlighting a shared metabolic and structural risk pathway (3840).

Cardiac structural and functional variables further complemented these metabolic indicators. Enlarged atrial dimensions on echocardiography correlated with declining eGFR and adverse cardiovascular profiles among DKD patients (4144). Left atrial volume index was independently associated with new-onset AF and adverse outcomes regardless of ejection fraction or chamber geometry, consistent with chronic volume load, inflammation, and neurohormonal activation (4548). For the right atrium, genetic evidence from Mendelian randomization has suggested a link between reduced eGFR and atrial enlargement, although DKD-specific clinical studies remain limited (49). Reduced systolic performance, reflected by fractional shortening, was also consistent with the interlinked pathophysiology of AF, heart failure, and DKD (5054). Importantly, model-derived associations do not necessarily mirror conventional structural paradigms on a one-to-one basis. SHAP reflects the contribution of each variable within a multivariable, nonlinear prediction framework rather than an isolated causal effect. Accordingly, the direction or relative importance of certain echocardiographic features may differ from expectations derived from single-parameter or univariable analyses. Other variables, including HbA1c, CK-MB, fibrinogen, and INR, may provide additional clinical context by reflecting glycemic exposure, myocardial injury, coagulation activity, and anticoagulation status (8, 5561). In addition, sensitivity analyses excluding INR and FIB showed that KNN performance decreased but remained acceptable across different stratified 7:3 random splits, suggesting that the main findings were not solely driven by these two coagulation-related variables. However, these coagulation-related variables should be interpreted cautiously, as they may partly reflect treatment-related factors, particularly anticoagulation exposure, rather than underlying disease biology alone.

Overall, we developed an interpretable ML-based model to identify comorbid AF in patients with DKD using routinely available clinical, laboratory, and echocardiographic data. In our dataset, the model showed good discrimination and calibration, and we implemented a web calculator as a preliminary prototype based on the internally validated model. However, this study also has the following limitations. First, the retrospective design introduces risks of selection and information bias, and reliance on existing records may lead to missing or misclassified data. Second, although the dataset was derived from two hospitals, all participants were recruited in China. Both the model and the accompanying web calculator were internally validated only, and their performance in other ethnic, geographic, and clinical settings remains uncertain. In addition, AF prevalence was relatively balanced in both the training and test sets. Although this may have facilitated model development and internal validation, AF prevalence may differ substantially across real-world populations and care settings. Because predictive values depend on disease prevalence, the PPV of the model may decrease and the NPV may increase in lower-prevalence settings. Therefore, the clinical interpretation and transportability of model performance may vary, underscoring the need for external validation in cohorts with different case mixes. Third, the model included coagulation indices such as FIB and INR, and we did not exclude patients receiving anticoagulants; although these features contributed modestly, we cannot determine whether anticoagulation affected calibration. Fourth, the sample size was moderate, which may limit statistical power and the precision of subgroup effects. Future studies should include larger cohorts, additional centers, and external as well as prospective validation.

5. Conclusions

This study developed and internally validated an interpretable machine-learning model to identify comorbid atrial fibrillation among patients with diabetic kidney disease using routinely collected inpatient clinical, laboratory, and echocardiographic variables. The model showed good discrimination and calibration within the study cohort, and SHAP analysis improved interpretability by highlighting cardiorenal and atrial structural features relevant to AF classification. A web-based calculator was implemented as a preliminary prototype to support internal assessment of the model. However, because the model is intended to identify concomitant AF rather than predict incident AF, and because both the model and calculator have undergone internal validation only, further external and prospective validation in independent cohorts is required before broader clinical application.

Funding Statement

The author(s) declared that financial support was received for this work and/or its publication. This research was supported by Funding for Clinical and Scientific Research Business Expenses of High-level Central Traditional Chinese Medicine Hospitals [DZMG-QNZX-24018].

Edited by: Vinoi David, Christian Medical College and Hospital, India

Reviewed by: Min Kyoung Kang, Ewha Womans University Seoul Hospital, Republic of Korea

Kuotzu Sung, Mackay Memorial Hospital, Taiwan

DKD, Diabetic kidney disease; AF, Atrial fibrillation; ML, Machine learning; eGFR, Estimated glomerular filtration rate; SCr, Serum creatinine; BUN, Blood urea nitrogen; 24UTP, 24-hour urine total protein; HbA1c, Glycated hemoglobin; CK-MB, Creatine kinase-MB; Myo, Myoglobin; WBC, White blood cell; RBC, Red blood cell; INR, International normalized ratio; APTT, Activated partial thromboplastin time; FIB, Fibrinogen; LAAPD, Left atrial anterior-posterior diameter; LAMLD, Left atrial medial-lateral diameter; LASID, Left atrial superior-inferior diameter; RAMLD, Right atrial medial-lateral diameter; RASID, Right atrial superior-inferior diameter; EF, Ejection fraction; FS, Fractional shortening; KNN, K-nearest neighbors; RF, Random forest; XGBoost, Extreme gradient boosting; LightGBM, Light gradient boosting machine; GBDT, Gradient boosting decision tree; LDA, Linear discriminant analysis; ANN, Artificial neural network; LASSO, Least absolute shrinkage and selection operator; SHAP, Shapley additive explanations; DCA, Decision-curve analysis; AUC, Area under the curve; ICD-10, International Classification of Diseases, 10th Revision; RAAS, Renin-angiotensin-aldosterone system; ROC, Receiver operating characteristic.

Data availability statement

The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

Ethics statement

The ethics committee/institutional review board waived the requirement of written informed consent for participation from the participants or the participants’ legal guardians/next of kin because this is a retrospective study.

Author contributions

XL: Funding acquisition, Investigation, Methodology, Resources, Writing – original draft. XW: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Software, Visualization, Writing – original draft. SW: Conceptualization, Project administration, Supervision, Validation, Writing – review & editing. XZ: Conceptualization, Project administration, Supervision, Validation, Visualization, Writing – review & editing.

Conflict of interest

The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declared that generative AI was not used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Supplementary material

The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fcdhc.2026.1785125/full#supplementary-material

Supplementary Figure 1

ROC curve and average AUC under five-fold cross-validation. ROC curves from five-fold cross-validation of the final model. Lighter-colored curves represent the individual folds, and the dark blue curve represents the average ROC curve. The mean AUC is approximately 0.90 ± 0.02, indicating consistent discriminatory performance during internal cross-validation.

Image1.pdf (14.8KB, pdf)
Table1.docx (29.3KB, docx)
Table2.docx (29.3KB, docx)

References

  • 1. USRDS . The United States renal data system. Am J Kidney Dis. (2003) 42:1–230. [PubMed] [Google Scholar]
  • 2. Afkarian M, Sachs MC, Kestenbaum B, Hirsch IB, Tuttle KR, Himmelfarb J, et al. Kidney disease and increased mortality risk in type 2 diabetes. J Am Soc Nephrol. (2013) 24:302–8. doi:  10.1681/ASN.2012070718. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3. Christiansen CF, Schmidt M, Lamberg AL, Horvath-Puho E, Baron JA, Jespersen B, et al. Kidney disease and risk of venous thromboembolism: a nationwide population-based case-control study. J Thromb Haemost. (2014) 12:1449–54. doi:  10.1111/jth.12652. PMID: [DOI] [PubMed] [Google Scholar]
  • 4. Wang CY, Chen JF, Tu ST, Lee CC, Ou HY. Microvascular disease burden and macrovascular outcomes in type 2 diabetes: risk calculator in Taiwan. Prim Care Diabetes. (2025) 19:678–80. doi:  10.1016/j.pcd.2025.09.004. PMID: [DOI] [PubMed] [Google Scholar]
  • 5. Kaze AD, Jaar BG, Fonarow GC, Echouffo-Tcheugui JB. Diabetic kidney disease and risk of incident stroke among adults with type 2 diabetes. BMC Med. (2022) 20:127. doi:  10.1186/s12916-022-02317-0. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6. Corwin TR, Ozieh MN, Garacci E, Palatnik A, Egede LE. The relationship between financial hardship and incident diabetic kidney disease in older US adults - a longitudinal study. BMC Nephrol. (2021) 22:167. doi:  10.1186/s12882-021-02373-3. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Lippi G, Sanchis-Gomar F, Cervellin G. Global epidemiology of atrial fibrillation: an increasing epidemic and public health challenge. Int J Stroke. (2021) 16:217–21. doi:  10.1177/1747493019897870. PMID: [DOI] [PubMed] [Google Scholar]
  • 8. Du X, Ninomiya T, de Galan B, Abadir E, Chalmers J, Pillai A, et al. Risks of cardiovascular events and effects of routine blood pressure lowering among patients with type 2 diabetes and atrial fibrillation: results of the ADVANCE study. Eur Heart J. (2009) 30:1128–35. doi:  10.1093/eurheartj/ehp055. PMID: [DOI] [PubMed] [Google Scholar]
  • 9. Seyed Ahmadi S, Svensson AM, Pivodic A, Rosengren A, Lind M. Risk of atrial fibrillation in persons with type 2 diabetes and the excess risk in relation to glycaemic control and renal function: a Swedish cohort study. Cardiovasc Diabetol. (2020) 19:9. doi:  10.1186/s12933-019-0983-1. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10. Kaze AD, Yuyun MF, Fonarow GC, Echouffo-Tcheugui JB. Burden of microvascular disease and risk of atrial fibrillation in adults with type 2 diabetes. Am J Med. (2022) 135:1093–100.e2. doi:  10.1016/j.amjmed.2022.04.012. PMID: [DOI] [PubMed] [Google Scholar]
  • 11. Gadde S, Kalluru R, Cherukuri SP, Chikatimalla R, Dasaradhan T, Koneti J. Atrial fibrillation in chronic kidney disease: an overview. Cureus. (2022) 14:e27753. doi:  10.7759/cureus.27753. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12. Carrero JJ, Trevisan M, Sood MM, Barany P, Xu H, Evans M, et al. Incident atrial fibrillation and the risk of stroke in adults with chronic kidney disease: the Stockholm CREAtinine Measurements (SCREAM) Project. Clin J Am Soc Nephrol. (2018) 13:1314–20. doi:  10.2215/CJN.04060318. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13. Alonso A, Lopez FL, Matsushita K, Loehr LR, Agarwal SK, Chen LY, et al. Chronic kidney disease is associated with the incidence of atrial fibrillation: the Atherosclerosis Risk in Communities (ARIC) study. Circulation. (2011) 123:2946–53. doi:  10.1161/CIRCULATIONAHA.111.020982. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Watanabe H, Watanabe T, Sasaki S, Nagai K, Roden DM, Aizawa Y. Close bidirectional relationship between chronic kidney disease and atrial fibrillation: the Niigata preventive medicine study. Am Heart J. (2009) 158:629–36. doi:  10.1016/j.ahj.2009.06.031. PMID: [DOI] [PubMed] [Google Scholar]
  • 15. Kwon S, Lee SR, Choi EK, Ahn HJ, Lee SW, Jung JH, et al. Association between atrial fibrillation and diabetes-related complications: a nationwide cohort study. Diabetes Care. (2023) 46:2240–8. doi:  10.2337/dc23-0931. PMID: [DOI] [PubMed] [Google Scholar]
  • 16. Richard Espiga F, Almendro Delia M, Caballero Martinez F, Monge Martin D, Neria Serrano F, Quiros Lopez R. Delayed diagnosis and missed opportunities in the early detection of atrial fibrillation: a cross-sectional study. Rev Clin Esp (Barc). (2024) 224:560–8. doi:  10.1016/j.rceng.2024.08.002. PMID: [DOI] [PubMed] [Google Scholar]
  • 17. Kaufman ES, Waldo AL. The impact of asymptomatic atrial fibrillation. J Am Coll Cardiol. (2004) 43:53–4. doi:  10.1016/j.jacc.2003.10.013. PMID: [DOI] [PubMed] [Google Scholar]
  • 18. Zhang P, Lin F, Ma F, Chen Y, Liu Y, Feng X, et al. Clinician-artificial intelligence collaboration: a win-win solution for efficiency and reliability in atrial fibrillation diagnosis. Med. (2025) 6:100668. doi:  10.1016/j.medj.2025.100668. PMID: [DOI] [PubMed] [Google Scholar]
  • 19. Hygrell T, Viberg F, Dahlberg E, Charlton PH, Kemp Gudmundsdottir K, Mant J, et al. An artificial intelligence-based model for prediction of atrial fibrillation from single-lead sinus rhythm electrocardiograms facilitating screening. Europace. (2023) 25:1332–8. doi:  10.1093/europace/euad036. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Nephrology EGoCSo . Chinese guidelines for diagnosis and treatment of diabetic kidney disease. Chin J Nephrol. (2021) 37:255–304. [Google Scholar]
  • 21. Huang CX, Electrophysiology and Pacing Branch of the Chinese Medical Association CRPCotCMDA . Chinese guidelines for the management of atrial fibrillation(2025). Chin J Cardiac Pacing Electrophysiology. (2025) 39:273–343. [Google Scholar]
  • 22. Jeng FC, Jeng YS. Implementation of machine learning on human frequency-following responses: a tutorial. Semin Hear. (2022) 43:251–74. doi:  10.1055/s-0042-1756219. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Silva CAO, Morillo CA, Leite-Castro C, Gonzalez-Otero R, Bessani M, Gonzalez R, et al. Machine learning for atrial fibrillation risk prediction in patients with sleep apnea and coronary artery disease. Front Cardiovasc Med. (2022) 9:1050409. doi:  10.3389/fcvm.2022.1050409. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24. Bashar SK, Ding E, Albuquerque D, Winter M, Binici S, Walkey AJ, et al. Atrial fibrillation detection in ICU patients: a pilot study on MIMIC III data(). Annu Int Conf IEEE Eng Med Biol Soc. (2019) 2019:298–301. doi:  10.1109/EMBC.2019.8856496. PMID: [DOI] [PubMed] [Google Scholar]
  • 25. Guan C, Gong A, Zhao Y, Yin C, Geng L, Liu L, et al. Interpretable machine learning model for new-onset atrial fibrillation prediction in critically ill patients: a multi-center study. Crit Care. (2024) 28:349. doi:  10.1186/s13054-024-05138-0. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26. Papadopoulou A, Harding D, Slabaugh G, Marouli E, Deloukas P. Prediction of atrial fibrillation and stroke using machine learning models in UK Biobank. Heliyon. (2024) 10:e28034. doi:  10.1016/j.heliyon.2024.e28034. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27. Laukkanen JA, Zaccardi F, Karppi J, Ronkainen K, Kurl S. Reduced kidney function is a risk factor for atrial fibrillation. Nephrol (Carlton). (2016) 21:717–20. doi:  10.1111/nep.12727. PMID: [DOI] [PubMed] [Google Scholar]
  • 28. Lan Q, Zheng L, Zhou X, Wu H, Buys N, Liu Z, et al. The value of blood urea nitrogen in the prediction of risks of cardiovascular disease in an older population. Front Cardiovasc Med. (2021) 8:614117. doi:  10.3389/fcvm.2021.614117. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Ding WY, Gupta D, Wong CF, Lip GYH. Pathophysiology of atrial fibrillation and chronic kidney disease. Cardiovasc Res. (2021) 117:1046–59. doi:  10.1093/cvr/cvaa258. PMID: [DOI] [PubMed] [Google Scholar]
  • 30. Schnabel RB, Yin X, Gona P, Larson MG, Beiser AS, McManus DD, et al. 50 year trends in atrial fibrillation prevalence, incidence, risk factors, and mortality in the Framingham Heart Study: a cohort study. Lancet. (2015) 386:154–62. doi:  10.1016/S0140-6736(14)61774-8. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31. Kistler PM, Sanders P, Fynn SP, Stevenson IH, Spence SJ, Vohra JK, et al. Electrophysiologic and electroanatomic changes in the human atrium associated with age. J Am Coll Cardiol. (2004) 44:109–16. doi:  10.1016/j.jacc.2004.03.044. PMID: [DOI] [PubMed] [Google Scholar]
  • 32. Morillo CA. Age and atrial fibrillation outcomes: myth or muzak, Scandinavian lessons. JACC Clin Electrophysiol. (2025) 11:95–7. doi:  10.1016/j.jacep.2024.12.005. PMID: [DOI] [PubMed] [Google Scholar]
  • 33. Gao P, Gao X, Xie B, Tse G, Liu T. Aging and atrial fibrillation: a vicious circle. Int J Cardiol. (2024) 395:131445. doi:  10.1016/j.ijcard.2023.131445. PMID: [DOI] [PubMed] [Google Scholar]
  • 34. Wong CX, Sullivan T, Sun MT, Mahajan R, Pathak RK, Middeldorp M, et al. Obesity and the risk of incident, post-operative, and post-ablation atrial fibrillation: a meta-analysis of 626,603 individuals in 51 studies. JACC Clin Electrophysiol. (2015) 1:139–52. doi:  10.1016/j.jacep.2015.04.004. PMID: [DOI] [PubMed] [Google Scholar]
  • 35. Jones NR, Taylor KS, Taylor CJ, Aveyard P. Weight change and the risk of incident atrial fibrillation: a systematic review and meta-analysis. Heart. (2019) 105:1799–805. doi:  10.1136/heartjnl-2019-314931. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36. Vyas V, Lambiase P. Obesity and atrial fibrillation: epidemiology, pathophysiology and novel therapeutic opportunities. Arrhythm Electrophysiol Rev. (2019) 8:28–36. doi:  10.15420/aer.2018.76.2. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37. Shu H, Cheng J, Li N, Zhang Z, Nie J, Peng Y, et al. Obesity and atrial fibrillation: a narrative review from arrhythmogenic mechanisms to clinical significance. Cardiovasc Diabetol. (2023) 22:192. doi:  10.1186/s12933-023-01913-5. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38. Jiang W, Wang J, Shen X, Lu W, Wang Y, Li W, et al. Establishment and validation of a risk prediction model for early diabetic kidney disease based on a systematic review and meta-analysis of 20 cohorts. Diabetes Care. (2020) 43:925–33. doi:  10.2337/dc19-1897. PMID: [DOI] [PubMed] [Google Scholar]
  • 39. Man REK, Gan ATL, Fenwick EK, Gupta P, Wong MYZ, Wong TY, et al. The relationship between generalized and abdominal obesity with diabetic kidney disease in type 2 diabetes: a multiethnic Asian study and meta-analysis. Nutrients. (2018) 10:1685. doi:  10.3390/nu10111685. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40. Keane WF, Brenner BM, de Zeeuw D, Grunfeld JP, McGill J, Mitch WE, et al. The risk of developing end-stage renal disease in patients with type 2 diabetes and nephropathy: the RENAAL study. Kidney Int. (2003) 63:1499–507. doi:  10.1046/j.1523-1755.2003.00885.x. PMID: [DOI] [PubMed] [Google Scholar]
  • 41. Gong M, Xu M, Pan S, Jiang S, Jiang X. Association of left atrium remodeling with major adverse cardiovascular events in asymptomatic type 2 diabetes patients with early chronic kidney disease. Rev Cardiovasc Med. (2025) 26:27247. doi:  10.31083/RCM27247. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42. Kadappu KK, Abhayaratna K, Boyd A, French JK, Xuan W, Abhayaratna W, et al. Independent echocardiographic markers of cardiovascular involvement in chronic kidney disease: the value of left atrial function and volume. J Am Soc Echocardiogr. (2016) 29:359–67. doi:  10.1016/j.echo.2015.11.019. PMID: [DOI] [PubMed] [Google Scholar]
  • 43. Gong M, Xu M, Pan S, Jiang X. Association between left atrial remodeling and early renal impairment in asymptomatic patients with type 2 diabetes. BMC Cardiovasc Disord. (2025) 25:436. doi:  10.1186/s12872-025-04900-8. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44. Li X, Dong Y, Zheng C, Wang P, Xu M, Zou C, et al. Assessment of real-time three-dimensional echocardiography as a tool for evaluating left atrial volume and function in patients with type 2 diabetes mellitus. Aging (Albany NY). (2020) 13:991–1000. doi:  10.18632/aging.202218. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45. Tripepi G, Benedetto FA, Mallamaci F, Tripepi R, Malatino L, Zoccali C. Left atrial volume in end-stage renal disease: a prospective cohort study. J Hypertens. (2006) 24:1173–80. doi:  10.1097/01.hjh.0000226208.11184.bb. PMID: [DOI] [PubMed] [Google Scholar]
  • 46. Tripepi G, Benedetto FA, Mallamaci F, Tripepi R, Malatino L, Zoccali C. Left atrial volume monitoring and cardiovascular risk in patients with end-stage renal disease: a prospective cohort study. J Am Soc Nephrol. (2007) 18:1316–22. doi:  10.1681/ASN.2006080881. PMID: [DOI] [PubMed] [Google Scholar]
  • 47. Paoletti E, Zoccali C. A look at the upper heart chamber: the left atrium in chronic kidney disease. Nephrol Dial Transplant. (2014) 29:1847–53. doi:  10.1093/ndt/gft482. PMID: [DOI] [PubMed] [Google Scholar]
  • 48. Hakamaki M, Hellman T, Lankinen R, Koivuviita N, Parkka J, Kallio P, et al. Elevated troponin T and enlarged left atrium are associated with the incidence of atrial fibrillation in patients with CKD stage 4-5. Nephron. (2021) 145:71–7. doi:  10.1159/000511451. PMID: [DOI] [PubMed] [Google Scholar]
  • 49. Zhou X, Ruan W, Zhao L, Lin K, Li J, Liu H, et al. Causal links between renal function and cardiac structure, function, and disease risk. Glob Heart. (2024) 19:83. doi:  10.5334/gh.1366. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50. Santhanakrishnan R, Wang N, Larson MG, Magnani JW, McManus DD, Lubitz SA, et al. Atrial fibrillation begets heart failure and vice versa: temporal associations and differences in preserved versus reduced ejection fraction. Circulation. (2016) 133:484–92. doi:  10.1161/CIRCULATIONAHA.115.018614. PMID: [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 51. Bell DSH, McGill JB, Jerkins T. Management of the 'wicked' combination of heart failure and chronic kidney disease in the patient with diabetes. Diabetes Obes Metab. (2023) 25:2795–804. doi:  10.1111/dom.15181. PMID: . Cited in: Pubmed; PMID 37409564. [DOI] [PubMed] [Google Scholar]
  • 52. Bell DS. Heart failure: the frequent, forgotten, and often fatal complication of diabetes. Diabetes Care. (2003) 26:2433–41. doi:  10.2337/diacare.26.8.2433. PMID: . Cited in: Pubmed; PMID 12882875. [DOI] [PubMed] [Google Scholar]
  • 53. Vaziri SM, Larson MG, Benjamin EJ, Levy D. Echocardiographic predictors of nonrheumatic atrial fibrillation. The Framingham Heart Study. Circulation. (1994) 89:724–30. doi:  10.1161/01.cir.89.2.724. PMID: . Cited in: Pubmed; PMID 8313561. [DOI] [PubMed] [Google Scholar]
  • 54. Des A, Leclercq JF, Halimi F, Fiorello P, Bertrand C, Attuel P. Evaluation of time course and predicting factors of progression of paroxysmal or persistent atrial fibrillation to permanent atrial fibrillation. Pacing Clin Electrophysiol. (2014) 37:345–55. doi:  10.1111/pace.12264. PMID: . Cited in: Pubmed; PMID 24236932. [DOI] [PubMed] [Google Scholar]
  • 55. Qi W, Zhang N, Korantzopoulos P, Letsas KP, Cheng M, Di F, et al. Serum glycated hemoglobin level as a predictor of atrial fibrillation: a systematic review with meta-analysis and meta-regression. PloS One. (2017) 12:e0170955. doi:  10.1371/journal.pone.0170955. PMID: . Competing Interests: The authors have declared that no competing interests exist. Cited in: Pubmed; PMID 28267752. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56. Berton G, Cordiano R, Cucchini F, Cavuto F, Pellegrinet M, Palatini P. Atrial fibrillation during acute myocardial infarction: association with all-cause mortality and sudden death after 7-year of follow-up. Int J Clin Pract. (2009) 63:712–21. doi:  10.1111/j.1742-1241.2009.02023.x. PMID: . Cited in: Pubmed; PMID 19392921. [DOI] [PubMed] [Google Scholar]
  • 57. Mukamal KJ, Tolstrup JS, Friberg J, Gronbaek M, Jensen G. Fibrinogen and albumin levels and risk of atrial fibrillation in men and women (the Copenhagen City Heart Study). Am J Cardiol. (2006) 98:75–81. doi:  10.1016/j.amjcard.2006.01.067. PMID: . Cited in: Pubmed; PMID 16784925. [DOI] [PubMed] [Google Scholar]
  • 58. Pisters R, Lane DA, Nieuwlaat R, de Vos CB, Crijns HJ, Lip GY. A novel user-friendly score (HAS-BLED) to assess 1-year risk of major bleeding in patients with atrial fibrillation: the Euro Heart Survey. Chest. (2010) 138:1093–100. doi:  10.1378/chest.10-0134. PMID: . Cited in: Pubmed; PMID 20299623. [DOI] [PubMed] [Google Scholar]
  • 59. Li-Saw-Hee FL, Blann AD, Gurney D, Lip GY. Plasma von Willebrand factor, fibrinogen and soluble P-selectin levels in paroxysmal, persistent and permanent atrial fibrillation. Effects of cardioversion and return of left atrial function. Eur Heart J. (2001) 22:1741–7. doi:  10.1053/euhj.2000.2531. PMID: . Cited in: Pubmed; PMID 11511124. [DOI] [PubMed] [Google Scholar]
  • 60. Li Z, Pang M, Li Y, Yu Y, Peng T, Hu Z, et al. Development and validation of a predictive model for new-onset atrial fibrillation in sepsis based on clinical risk factors. Front Cardiovasc Med. (2022) 9:968615. doi:  10.3389/fcvm.2022.968615. PMID: . The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. Cited in: Pubmed; PMID 36082114. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 61. Kannel WB, Wolf PA, Benjamin EJ, Levy D. Prevalence, incidence, prognosis, and predisposing conditions for atrial fibrillation: population-based estimates. Am J Cardiol. (1998) 82:2N–9N. doi:  10.1016/s0002-9149(98)00583-9. PMID: . Cited in: Pubmed; PMID 9809895. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary Figure 1

ROC curve and average AUC under five-fold cross-validation. ROC curves from five-fold cross-validation of the final model. Lighter-colored curves represent the individual folds, and the dark blue curve represents the average ROC curve. The mean AUC is approximately 0.90 ± 0.02, indicating consistent discriminatory performance during internal cross-validation.

Image1.pdf (14.8KB, pdf)
Table1.docx (29.3KB, docx)
Table2.docx (29.3KB, docx)

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.


Articles from Frontiers in Clinical Diabetes and Healthcare are provided here courtesy of Frontiers Media SA

RESOURCES