Search for a command to run...
Abstract Background Heart rate variability (HRV) derived from electrocardiogram (ECG) signals offers a promising non-invasive window into glycemic status; however, existing studies frequently combine distinct glucose measurements and employ validation strategies susceptible to data leakage. Because HRV declines by approximately 3–5% per decade due to age-related autonomic degeneration, absolute HRV values conflate the effects of aging with diabetes-specific autonomic dysfunction. We hypothesised that normalising HRV features using an age-dependent scaling factor would isolate the diabetes-specific component and improve glycemic status estimation. Methods We analysed ECG-derived features from 43 male type 2 diabetes patients with strictly separated glycated hemoglobin (HbA1c; n = 29; 3-month glycemic average) and fasting blood glucose (FBG; n = 38; acute status). Leave-one-subject-out (LOSO) cross-validation (CV) with within-fold feature selection and standardisation prevented information leakage. Twenty machine learning algorithms and six age-adjustment methods were compared, with normalisation sensitivity tested across 20 parameter combinations. Statistical validation employed permutation testing ( n = 500) and bootstrap 95% confidence intervals. Results Extra trees regression achieved the best performance: R² = 0.222 ( r = 0.476, p = 0.009) for HbA1c and R² = 0.086 ( r = 0.344, p = 0.034) for FBG, corresponding to mean absolute errors of 1.18% points and 2.27 mmol/L respectively. Permutation testing confirmed that both associations exceeded the chance level ( p = 0.002). Contrary to our hypothesis, none of the six age-adjustment methods nor any of the 20 sensitivity parameter combinations improved performance, indicating that age-related HRV decline did not confound glycemic estimation in this cohort. CV hygiene differentially affected model families: tree-based ensembles maintained positive performance, whereas linear models collapsed to negative R² values, revealing substantial bias from conventional practices. Neural networks with minimally configured hyperparameters failed for these sample sizes (R² ranging from − 8.2 to − 10,879). Conclusions Strict within-fold preprocessing fundamentally alters conclusions in HRV-based glycemic status estimation, exposing inflated performance to conventional CV practices. Bootstrap confidence intervals excluding zero (HbA1c R²: [0.13, 0.82]; FBG R²: [0.10, 0.72]) provided statistical evidence for genuine HRV–glycemic associations, but performance remained insufficient for standalone clinical use. This study establishes methodological standards for separating glycemic targets, subject-independent validation with within-fold preprocessing, and comprehensive baselines to advance non-invasive glycemic monitoring research. Clinical trial number Not Applicable.