ECG-SDI: Single-lead Electrocardiogram Enables Continuous Sleep Depth Index Profiling and Scalable Digital Biomarkers for Sleep Health
Analyze & explore related research in Conceptio
Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.
ECG-SDI: Single-lead Electrocardiogram Enables Continuous Sleep Depth Index Profiling and Scalable Digital Biomarkers for Sleep Health Donglin Xie1,2,#, , Qingshuo Zhao3,# , Songchi Zhou4,# , Haoyu Wang5 , Jingyu Wang6 , Yuxi Zhou3,7 , Thomas Penzel8,* , and Shenda Hong1,2,9,*, 1
Institute of Medical Technology, Peking University Health Science Center, Beijing, China National Institute of Health Data Science, Peking University, Beijing, China 3 Department of Computer Science, Tianjin University of Technology, Tianjin, China 4 Department of Statistics and Data Science, Tsinghua University, Beijing, China 5 University of Chinese Academy of Sciences, China 6 Department of Respiratory and Critical Care Medicine, Binzhou Medical University Hospital, Binzhou, China 7 Department of Respiratory, The Second Hospital of Tianjin Medical University, Tianjin, China 8 Interdisciplinary Center of Sleep Medicine, Charité - Universitätsmedizin Berlin, Berlin, Germany 9 Institute for Artificial Intelligence, Peking University, Beijing, China # These authors contributed equally * Correspondence: hongshenda@pku.edu.cn, thomas.penzel@charite.de
arXiv:2610.23727v1 [eess.SP] 16 Oct 2026
2
ABSTRACT Traditional sleep staging provides a discrete and coarse-grained representation of sleep, limiting both the characterization of within-stage depth variation and the scalability of continuous sleep phenotyping to lightweight and home-based settings. Here we propose ECG-SDI, a single-lead Electrocardiogram (ECG) framework for continuous sleep-depth profiling and digital biomarker extraction. Using 12,392 overnight PSG recordings across multiple cohorts, we trained and validated a two-stage deep learning model to learn a continuous sleep depth index ranging from 0 to 1 under supervision from conventional discrete sleep-stage labels. In the pooled internal test set, ECG-SDI achieved a correlation of 0.828 with ordered sleep stages excluding REM and a REM classification AUROC of 0.954, and demonstrated a robust performance in an external CFS cohort with a correlation of 0.848 and an AUROC of 0.977. ECG-SDI preserved whole-night sleep organization and revealed intra-stage physiological heterogeneity that was not apparent from conventional sleep stages alone. Biomarker-based phenotyping identified a disturbed sleep subtype associated with poorer subjective sleep quality and higher all-cause mortality in the SHHS (adjusted hazard ratio, 1.20; 95% confidence interval, 1.05–1.38). In 507 participants with paired recordings before and after continuous positive airway pressure (CPAP), normalized sleep-depth area increased by 6.1% and shallow-sleep burden below 0.3 decreased by 16.0%. Exploratory analyses linked reductions in approximate entropy and depth variability to reduced oxygen desaturation and increased sleep efficiency, respectively (Spearman ρ = 0.24 and 0.12); both associations remained positive after covariate adjustment. Mean ECG-SDI within N2 increased by 0.017 (95% confidence interval, 0.004–0.030). A wearable proof-of-concept illustrated the acquisition-to-report workflow. These findings extend continuous sleep-depth phenotyping to single-lead electrocardiography and provide evidence of responsiveness to CPAP-associated changes, supporting prospective evaluation for repeated home-based assessment.
KEYWORDS Single-lead ECG, Continuous sleep depth, Digital biomarkers, CPAP response
1
Introduction Sleep health is a fundamental pillar of cardiovascular, metabolic, cognitive, and neuropsychiatric homeostasis. REM sleep contributes to memory processing, while persistent sleep disturbance is closely linked to obesity, depression, neurodegenerative disease, and a broader spectrum of objectively measured disease phenotypes 1–7 . At the same time, sleep fragmentation, obstructive sleep apnea (OSA), and poor subjective sleep quality impose substantial daytime functional, cognitive, and emotional burden and contribute to long-term adverse health outcomes 8–10 . Polysomnography (PSG) remains the clinical gold standard for sleep assessment, yet its acquisition and scoring are resource-intensive, and manual staging still shows inter-scorer variability 11–13 . More fundamentally, conventional sleep staging based on fixed 30-s epochs is a coarse-grained representation that does not adequately capture progressive within-stage variation in sleep depth, nor does it directly quantify sleep fragmentation and recovery dynamics 14 . Against this background, digital biomarkers and continuous sleep depth offer a compelling alternative framework for sleep characterization. A biomarker is an objectively measurable characteristic that reflects physiological processes, pathological processes, or responses to intervention; when such characteristics are enabled by digital health technologies for repeated, remote, and continuous acquisition, they gain the practical value of digital biomarkers 15–18 . Sleep is particularly well suited to this paradigm because nocturnal physiological activity is relatively stable and tightly linked to a broad range of health outcomes 7 . Along the axis of continuous sleep depth, studies of the Odds Ratio Product (ORP), reproducibility of Electroencephalogram (EEG) sleep biomarkers, calls for higher-resolution hypnograms, and more recent data-driven ordinal sleep depth measures all suggest that continuous representations align more naturally with arousal propensity and sleep instability than discrete stage labels, and may be especially useful for tracking treatment response 19–23 . Our prior PSG-based SDI study further demonstrated that continuous sleep depth and its derived time-series features can yield new digital biomarkers for sleep health 24 . However, if continuous sleep-depth phenotyping still depends on EEG or full PSG, its scalability in home-based, lightweight, and real-world settings remains limited. Single-lead ECG is one of the most widely available physiological signals, is well suited to long-term wear, and is naturally compatible with home deployment; meanwhile, portable and wearable devices have achieved increasingly practical ECG/HRV acquisition, and home sleep monitoring technologies are rapidly maturing 25–28 . From a physiological perspective, stage transitions, REM/NREM reorganization, and arousal are all accompanied by changes in autonomic and cardiovascular regulation, making ECG and HRV intrinsically informative about sleep 14,29 . Prior work has already established the feasibility of reduced-sensor sleep analysis: from deep-learning sleep staging with singlechannel EEG to heart-rate/HRV-based staging, cardiorespiratory sleep detection, pulse-oximetryderived sleep-wake classification, EEG+ECG multimodal staging, and single-lead ECG for sleep apnea detection 30–35 . In parallel, rapid progress in AI-enabled ECG phenotyping suggests that limited-lead ECG can encode clinically meaningful information far beyond conventional heart-rate summaries 36 . Nevertheless, most existing ECG-based studies still focus on discrete sleep staging or event detection rather than continuous sleep depth itself, and the reliability of wearable-based sleep staging remains imperfect 37 . Accordingly, what is currently missing is not simply another ECG sleep-staging model, but a single-lead ECG-derived, continuous, interpretable, and treatment-responsive sleep-depth biomarker framework. Such a framework could move continuous sleep-depth phenotyping beyond the PSG laboratory into more accessible real-world monitoring settings, while also offering a more sensitive means of quantifying treatment-related restoration of sleep continuity—particularly in the context of continuous positive airway pressure (CPAP), which is recommended for adult OSA
2
but still lacks sufficiently refined objective markers for evaluating benefit 20,38,39 . Fig. 1 summarizes the overall study framework, and our contributions are as follows: 1. We propose ECG-SDI, a scalable single-lead ECG framework for continuous sleep-depth profiling, and validate it in large public sleep cohorts together with an external clinical CPAP cohort. 2. We show that ECG-SDI preserves whole-night sleep organization while revealing intra-stage physiological heterogeneity that is not visible from conventional stage labels alone. 3. We derive multidimensional time-series digital biomarkers from overnight ECG-SDI trajectories and show that their clustering identifies sleep phenotypes associated with adverse sleep-health profiles and increased all-cause mortality. 4. We demonstrate in the Binzhou Longitudinal CPAP (BZ-CPAP) cohort that these digital biomarkers are sensitive to treatment-related sleep improvement, thereby supporting ECGSDI not only as a static sleep descriptor but also as a treatment-responsive digital biomarker for longitudinal follow-up and home-based monitoring.
RESULTS Data curation and deep learning model development A total of 12,392 overnight PSG recordings were included in the multi-cohort analysis. Of these, 10,652 recordings from SHHS, MESA, and MrOS were divided at the participant level into training, validation, and internal test sets in a 6:2:2 ratio. The independent CFS and BZ-CPAP cohorts contributed 1,740 external recordings and were not used for neural-network training or model selection. CFS contributed 726 recordings, whereas BZ-CPAP comprised 507 participants with recordings obtained before and after CPAP, yielding 1,014 recordings. Detailed demographic information for the various cohorts is provided in the Appendix A. We adapted a two-stage single-lead ECG sleep-staging framework to produce a continuousvalued sleep depth index, ECG-SDI, on a scale from 0 to 1, together with REM-related predictions. The pretrained convolutional and Transformer-based backbone was retained as a frozen feature extractor, and two task-specific output heads were trained using conventional sleep-stage labels. The model generated an ECG-SDI value for each 30-s epoch while incorporating neighboringepoch context. After model development, the network parameters were fixed for subsequent evaluation of sleep-stage ordering, overnight trajectories, clinical phenotypes, and paired CPAPassociated changes. The architecture and implementation details are provided in Appendix D.
Single-lead ECG robustly recovers continuous sleep depth and REM structure across internal and external cohorts As shown in Table 1, in the pooled internal test set, ECG-SDI demonstrated a correlation of 0.828 with ordered sleep stages excluding REM and achieved a REM classification AUROC of 0.954. At the cohort level, the corresponding sleep-depth correlations in the internal SHHS, MESA, and MrOS test sets were 0.730, 0.797, and 0.882, with REM classification AUROCs of 0.908, 0.934, and 0.987, respectively. In the fully independent external validation cohorts, performance remained high in CFS, with a correlation of 0.848 and a REM classification AUROC of 0.977. In the BZ-CPAP cohort, the corresponding correlations were 0.456 before CPAP and 0.546 after CPAP, 3
Figure 1: Overall study framework and analytical pipeline. a, Single-lead ECG was extracted from multi-cohort PSG recordings to construct internal datasets for model development (SHHS, MESA, and MrOS) and fully independent external validation datasets (CFS and BZ-CPAP). b, A two-stage neural network was used to learn a continuous sleep depth index (ECG-SDI) from raw ECG under supervision from conventional discrete sleep-stage labels, thereby transforming coarse-grained sleep staging into a continuous representation of sleep depth. c, Digital biomarkers were then derived from whole-night ECG-SDI trajectories and used for sleep-phenotype clustering, clinical risk stratification, and tracking CPAP treatment effects, enabling systematic evaluation of the physiological relevance, clinical utility, and treatment responsiveness of ECG-SDI.
4
Table 1: Performance of ECG-SDI for sleep-depth ordering and REM classification in internal and external cohorts. Corr. SS (excl. REM), correlation between ECG-SDI and ordered sleep stages excluding REM; REM class. AUROC, area under the receiver operating characteristic curve for REM classification. Values are reported as point estimates with corresponding uncertainty intervals. Cohort Pooled internal test Internal SHHS Internal MESA Internal MrOS External CFS External BZ-CPAP (pre-CPAP) External BZ-CPAP (post-CPAP)
Corr. SS (excl. REM)↑
REM class. AUROC↑
0.828 (0.827–0.828) 0.730 (0.729–0.732) 0.797 (0.796–0.798) 0.882 (0.882–0.883) 0.848 (0.847–0.849) 0.456 (0.453–0.459) 0.546 (0.544–0.549)
0.954 (0.953–0.954) 0.908 (0.907–0.909) 0.934 (0.933–0.935) 0.987 (0.987–0.988) 0.977 (0.976–0.977) 0.803 (0.802–0.805) 0.830 (0.829–0.832)
with REM classification AUROCs of 0.803 and 0.830, respectively. Taken together, these findings indicate that ECG-SDI achieved good overall performance, with robust REM discrimination and preserved sleep-depth ordering across heterogeneous cohorts and acquisition settings. ECG-SDI displayed an expected stage-wise distribution across all four cohorts, which is shown in Fig. 7 of Appendix B. Wake epochs were concentrated at the lowest depth range, values increased progressively from N1 to N3, and N3 consistently exhibited the highest sleep depth, whereas REM occupied an intermediate range distinct from both wakefulness and deep NREM sleep. This overall pattern indicates that single-lead ECG alone is sufficient to recover a physiologically meaningful continuum of sleep depth across conventional sleep stages. Notably, the wake distributions in SHHS and MESA were broader than expected and showed an upper tail extending to relatively high depth values. This deviation may partly reflect the cardiovascular burden and related alterations in nocturnal cardiac dynamics in these cohorts; we therefore note this observation here and revisit it in the Discussion.
Whole-night ECG-SDI trajectories reveal continuous variation within conventional sleep stages Representative recordings from the external CFS cohort illustrate how ECG-SDI describes both whole-night sleep organization and variation within conventional sleep stages (Fig. 2A,B). In the lower-AHI example, ECG-SDI repeatedly approached the upper end of its range during N3 sleep, occupied an intermediate range during REM, and decreased during wakefulness. The trajectory continued to fluctuate within intervals assigned the same stage label. This recording had a total sleep time of 406.0 min, sleep efficiency of 81%, and an apnea–hypopnea index (AHI) of 4.88 h−1 (Fig. 2A). The OSA example showed more sustained low-SDI intervals and recurrent interruptions of higher-SDI periods, together with shorter total sleep time (303.0 min), lower sleep efficiency (53%), and higher AHI (40.19 h−1 ; Fig. 2B). The corresponding AP values were 0.59 and 0.38, respectively. To examine variation at the epoch level, we jointly displayed the ECG waveform, ECG-SDI value, and heart rate for selected 30-s epochs from REM, N1, and N2 sleep (Fig. 2C–E). Each stage-specific triplet comprised epochs from the same participant with the same conventional stage label. Within N1, ECG-SDI values of 0.08, 0.36, and 0.46 corresponded to heart rates of 98, 86, and 79 beats min−1 , respectively. Within N2, ECG-SDI values of 0.30, 0.59, and 0.80 corresponded to heart rates of 91, 75, and 69 beats min−1 . Thus, higher ECG-SDI values were 5
Figure 2: Whole-night ECG-SDI trajectories and within-stage ECG examples in the external CFS cohort. A,B, Conventional hypnograms (upper panels) and corresponding ECG-SDI trajectories (lower panels) for a lower-AHI recording (A; cfs-visit5-802076) and an OSA recording (B; cfs-visit5-801193). REM epochs are highlighted in red, and wake/NREM epochs are shown in blue. Insets report total sleep time (TST), sleep efficiency (SE), apnea–hypopnea index (AHI), normalized area under the depth curve (AP), and area under the depth curve (AUC). C–E, Representative 30-s ECG segments from REM (C; cfs-visit5-800129), N1 (D; cfs-visit5-802137), and N2 (E; cfs-visit5-801622). Within each row, three epochs from the same participant and conventional sleep stage are arranged in ascending order of ECG-SDI. Each segment is annotated with its epoch identifier, stage, SDI value, and heart rate (HR; beats min−1 ). The labels shallow, medium, and deep indicate relative positions on the ECG-SDI scale within the illustrated stage and do not represent additional conventional sleep stages. accompanied by lower heart rates in these selected NREM examples. The REM examples had ECG-SDI values of 0.32, 0.46, and 0.56 and heart rates of 64, 73, and 58 beats min−1 , respectively, showing that heart rate did not vary monotonically with ECG-SDI across all illustrated stages. Together, these examples relate the continuous model output to the underlying ECG and show cardiac variation within identical stage labels.
ECG-SDI-derived sleep phenotypes show distinct clinical profiles and an association with all-cause mortality Gaussian mixture modelling of whole-night ECG-SDI-derived biomarkers identified two sleep phenotypes in SHHS, CFS, and MrOS, designated the normal sleep and disturbed sleep subtypes. Their biomarker profiles differed across cohorts (Fig. 3A). In SHHS, the disturbed subtype had higher shallow-sleep burden and overnight variability (RB and CV; Cohen’s d = 2.00 and 2.05, respectively) and lower cumulative sleep depth (AP; d = −1.15). In CFS, the largest separation was observed for approximate entropy (APPe; d = 1.71); APPe was also higher in the disturbed subtype in MrOS. These profiles describe the cohort-specific combinations of ECG-SDI features underlying the two clusters. The disturbed subtype had lower sleep efficiency across all three cohorts. After adjustment for age, body mass index, sex, sleep efficiency, and sleep latency, where applicable, this subtype was associated with poor subjective sleep quality in each cohort (Fig. 3A). The adjusted odds 6
ratios were 1.33 (95% confidence interval [CI], 1.18–1.52) in SHHS and 1.81 (95% CI, 1.16–3.07) in CFS, with a positive association also observed in MrOS. Associations with insomnia symptoms were evident in SHHS and MrOS, while the disturbed subtype in SHHS also had greater odds of sleep apnea and hypertension. Thus, although the biomarker profiles varied across cohorts, the two phenotypes consistently differed in subjective sleep quality. In the SHHS survival analysis, including 4,319 participants in the normal subtype and 1,472 in the disturbed subtype, Kaplan–Meier curves showed lower survival in the disturbed subtype (log-rank P < 0.001; Fig. 3B). The hazard ratio for all-cause mortality was 1.39 (95% CI, 1.24–1.56) in Model 1 and 1.34 (95% CI, 1.19–1.51) in Model 2 (both P < 0.001). The association persisted in the fully adjusted model, which additionally included AHI and total sleep time (Model 3: hazard ratio, 1.20; 95% CI, 1.05–1.38; P = 0.007). These findings associate ECG-SDI-derived phenotypes with adverse sleep-health profiles and with long-term all-cause mortality in SHHS.
ECG-SDI biomarkers are treatment-responsive and track CPAP-associated restoration of sleep continuity In the 507 paired pre- and post-treatment PSG recordings from the BZ-CPAP cohort, ECG-SDIderived biomarkers showed a coherent post-CPAP shift consistent with improved overnight sleep continuity, which is shown in Fig. 4. Compared with pre-CPAP values, AP, reflecting cumulative overnight sleep-depth burden, increased from 0.5909 to 0.6269, corresponding to a 6.1% increase (p < 0.001). In contrast, shallow-sleep burden decreased after treatment, with RB falling from 0.0926 to 0.0820 (−11.4%, p = 0.0368) and RB0.3 declining from 0.1580 to 0.1327 (−16.0%, p < 0.001). The overall variability of the overnight depth profile also decreased, as CV was reduced from 0.5277 to 0.5021 (−4.9%, p < 0.001). Meanwhile, the proportion of REM sleep (PR) increased from 0.1811 to 0.2615 (+44.4%, p < 0.001). DETRf also showed a modest increase, from 1.2219 to 1.2673 (+3.7%, p < 0.001), whereas the change in MDR was not statistically significant (0.5880 vs. 0.5744, p = 0.168). Detailed paired comparisons for the remaining complexity-related metrics are provided in Table 4 of Appendix C. Taken together, these findings indicate that ECG-SDI-derived biomarkers shift after CPAP toward a sleep pattern that is deeper, less shallow-dominated, and less fragmented, supporting their utility as treatment-responsive digital biomarkers for tracking restoration of sleep continuity.
Exploratory analyses link CPAP-associated ECG-SDI changes to PSG improvement and within-stage variation We next examined whether CPAP-associated changes in ECG-SDI-derived biomarkers were related to changes in conventional PSG measures in the independent BZ-CPAP cohort. A greater reduction in approximate entropy (APPe) was associated with a greater reduction in the PSGderived oxygen desaturation index (ODI3 ; Spearman ρ = 0.24, 95% CI, 0.16–0.32; P < 0.001; Fig. 5A). A greater reduction in the coefficient of variation (CV) was also associated with a greater increase in PSG-derived sleep efficiency, although the association was weaker (ρ = 0.12, 95% CI, 0.03–0.21; P = 0.007; Fig. 5B). Reductions in biomarkers and ODI3 were calculated as pre-CPAP minus post-CPAP values, whereas the increase in sleep efficiency was calculated as post-CPAP minus pre-CPAP values. Both associations remained positive in covariate-adjusted analyses comprising 395 paired participants per model (Fig. 5C). After adjustment for age, sex, BMI, baseline AHI, and the corresponding baseline PSG outcome (M0), the standardized coefficients were β = 0.037 (95% CI, 0.006–0.069) for APPe reduction in relation to ODI3 reduction and β = 0.148 (95% CI, 0.062– 0.234) for CV reduction in relation to increased sleep efficiency. Additional adjustment for the 7
Figure 3: Clinical profiles and all-cause mortality associated with ECG-SDI-derived sleep phenotypes. A, Comparisons between the normal sleep and disturbed sleep subtypes in SHHS, CFS, and MrOS. Upper panels show Cohen’s d for demographic characteristics, conventional sleep measures, and ECG-SDI-derived biomarkers; positive values indicate higher values in the disturbed subtype. Lower panels show odds ratios for binary characteristics and clinical outcomes. Points and horizontal bars denote estimates and 95% confidence intervals, respectively. Clinical outcome models were adjusted for age, body mass index, sex, sleep efficiency, and sleep latency, where applicable. Biomarker comparisons describe variables used for clustering. B, Kaplan–Meier curves for all-cause mortality in SHHS, with shaded 95% confidence intervals and numbers at risk below. Blue and red indicate the normal sleep and disturbed sleep subtypes, respectively. The inset reports the log-rank test and Cox proportional hazards estimates. Model 1 adjusts for age, sex, and race; Model 2 additionally adjusts for body mass index, smoking status, hypertension, and diabetes mellitus; Model 3 additionally adjusts for apnea–hypopnea index and total sleep time.
8
Figure 4: Paired distributions of key ECG-SDI-derived biomarkers before and after CPAP treatment in the BZ-CPAP cohort. Violin plots with embedded boxplots compare the distributions of AP, RB, RB0.3 , CV, SK, APPe, DETRf, MDR, and PR between pre-CPAP and post-CPAP recordings. Red horizontal lines indicate medians, boxes denote interquartile ranges, and violin contours represent the full distribution of each biomarker. Across multiple metrics, postCPAP values shifted toward higher accumulated sleep depth and reduced shallow-sleep burden, consistent with improved sleep continuity after treatment. baseline value of the corresponding ECG-SDI biomarker (M1) yielded coefficients of 0.068 (95% CI, 0.028–0.108) and 0.190 (95% CI, 0.079–0.301), respectively. We additionally examined ECG-SDI within PSG-defined N2 among participants with at least 10 min of N2 at each visit (Fig. 5D). Mean N2 ECG-SDI increased after CPAP by 0.017 (95% CI, 0.004–0.030; paired t-test, P = 0.013), indicating a small shift within a fixed conventional sleep stage. These exploratory analyses therefore identified modest associations between ECGSDI-derived changes and PSG-defined improvement, together with a within-N2 increase in the model-derived sleep-depth index.
A wearable single-lead ECG workflow enables proof-of-concept home sleepdepth reporting We implemented a proof-of-concept workflow integrating wearable single-lead ECG acquisition, automated ECG-SDI analysis, and sleep-depth reporting (Fig. 6). A chest-worn device in a 9
Figure 5: Exploratory associations of CPAP-associated ECG-SDI changes with PSG outcomes and within-stage sleep depth. A, Association between reductions in APPe and PSGderived ODI3 , both calculated as pre-CPAP minus post-CPAP values. B, Association between the reduction in CV (pre-CPAP minus post-CPAP) and the increase in PSG-derived sleep efficiency (post-CPAP minus pre-CPAP, in percentage points). Points represent paired participant-level changes; solid lines illustrate fitted trends. Spearman correlations, 95% confidence intervals (CIs), and P values are reported in each panel. C, Adjusted standardized regression coefficients and 95% CIs for the associations shown in A and B, with 395 paired participants included in each model. M0 adjusts for age, sex, BMI, baseline AHI, and the corresponding baseline PSG outcome; M1 additionally adjusts for the baseline value of the corresponding ECG-SDI biomarker. Open circles denote M0 and filled diamonds denote M1. D, Paired mean ECG-SDI values within PSG-defined N2 before and after CPAP, restricted to participants with at least 10 min of N2 at each visit. Lines connect paired observations. The mean paired change, its 95% CI, and the paired t-test P value are shown. APPe, approximate entropy; CV, coefficient of variation; ODI3 , oxygen desaturation index.
10
Figure 6: Proof-of-concept wearable workflow for home ECG-SDI reporting. A, Illustration of overnight single-lead ECG acquisition using a chest-worn device in a modified Lead II configuration. B, Smartphone connection interface and automated analysis workflow comprising ECG-SDI inference and biomarker extraction. C, Illustrative report displaying an overnight ECGSDI trajectory and summary values for AP, PR, RB, and CV. Interface elements, trajectories, and numerical values illustrate the workflow and do not constitute a home-validation dataset or validated normal/abnormal classifications. modified Lead II configuration was linked to a smartphone interface for overnight recording (Fig. 6A,B). The acquired ECG was processed by the trained ECG-SDI model and biomarkerextraction module to generate an overnight depth trajectory and summary fields for AP, PR, RB, and CV (Fig. 6C). This implementation demonstrates the technical feasibility of an acquisitionto-report workflow for home monitoring. The displayed trajectory and biomarker values are illustrative; home-based estimation accuracy and individual treatment-monitoring performance were not evaluated.
DISCUSSION This study extends continuous sleep-depth phenotyping to single-lead ECG and evaluates its relevance to clinical sleep profiles, long-term outcomes, and treatment-associated changes. Across 12,392 overnight recordings, ECG-SDI recovered sleep-depth ordering and REM structure, characterized variation within conventional stages, and yielded biomarkers associated with subjective sleep quality and all-cause mortality. A central extension beyond our previous PSGbased work 24 is the evaluation of 507 participants before and after CPAP, providing evidence of treatment responsiveness alongside cross-sectional phenotyping. Together with a wearable acquisition-to-report proof of concept, these findings establish a basis for developing continuous sleep-depth assessment for repeated, lower-burden monitoring. Continuous measures such as the EEG-derived odds ratio product and our previous SDI framework have shown that sleep depth contains information not fully represented by categorical stage labels. 19,24 The present study extends this approach to a single cardiac signal, building on evidence that temporal patterns in cardiac activity support automated sleep staging. 32 Correlations with ordered sleep stages (excluding REM) of 0.828 in the pooled internal test set and 0.848 in external CFS, together with REM AUROCs of 0.954 and 0.977, respectively, demonstrate that substantial sleep-related structure can be recovered without EEG input at inference. This 11
reduction in sensor requirements is the main translational advantage: continuous phenotyping becomes compatible with an ECG recording modality that can be incorporated into lightweight wearable systems. The whole-night and within-stage examples clarify what this continuous representation contributes. Overnight trajectories retain recognizable sleep architecture while displaying variation within periods assigned the same stage. Joint visualization of the ECG waveform, ECG-SDI, and heart rate makes these differences interpretable in relation to the recorded signal. Higher ECG-SDI accompanied lower heart rates in the selected N1 and N2 examples, whereas the REM examples showed no monotonic relationship. These observations are compatible with the stagedependent cardiac autonomic patterns described in physiological studies, 14 while underscoring that ECG-SDI should not be interpreted as a simple inverse heart-rate scale. They illustrate variation within stage categories and motivate quantitative analyses of this heterogeneity. The phenotype analyses extend this representation to clinically relevant differences between individuals. Despite differences in the biomarkers separating clusters across SHHS, CFS, and MrOS, the disturbed subtype consistently had poorer subjective sleep quality. Such heterogeneity is compatible with previous evidence that sleep-depth-related EEG biomarkers vary with demographic and clinical characteristics. 21 In SHHS, the association with all-cause mortality remained after adjustment including AHI and total sleep time (hazard ratio, 1.20; 95% confidence interval, 1.05–1.38). This finding supports the clinical relevance of the derived phenotype and motivates evaluation of whether continuous sleep-depth profiles add useful information to established sleep-health assessments. The cohort-specific biomarker patterns also favour interpreting these phenotypes as multidimensional profiles of sleep health. The paired CPAP cohort provides a particularly valuable assessment of the responsiveness of ECG-SDI-derived biomarkers. CPAP is an established treatment for OSA, 38 and previous EEG-based work has demonstrated changes in continuous sleep depth following treatment. 20 Here, comparing the same participants before and after CPAP reduced the influence of stable between-person differences and enabled evaluation of an ECG-based representation under clinically relevant treatment conditions. Increases in cumulative sleep depth and REM proportion, accompanied by reductions in shallow-sleep burden and overnight variability, formed a coherent pattern consistent with improved sleep continuity. The paired design thus extends the evidence for ECG-SDI from differences between individuals to changes within individuals, a necessary property for a candidate treatment-monitoring biomarker. The exploratory analyses further relate these changes to conventional PSG outcomes. Reductions in APPe and CV were associated with improvements in ODI3 and sleep efficiency, respectively, and the positive associations persisted after covariate adjustment. Their modest magnitudes (Spearman ρ = 0.24 and 0.12) support physiological relevance without implying that these measures are interchangeable. The small increase in mean ECG-SDI within PSG-defined N2 (0.017) additionally indicates sensitivity to changes within a fixed stage category. This observation is relevant to prior ORP research showing that intervention-related changes within N2 contribute to overall NREM sleep-depth changes that stage durations alone incompletely describe. 40 CPAP can also alter cardiac autonomic regulation, 41 so ECG-SDI changes may integrate sleep-related variation with accompanying cardiorespiratory responses. These findings support further evaluation of ECG-SDI alongside respiratory and conventional sleep measures when characterizing treatment response.
12
METHODS Study design, cohorts, and split strategy This was a retrospective multi-cohort study including 12,392 overnight PSG recordings. Among them, 10,652 recordings from the public SHHS 42 , MESA 43 , and MrOS 44 cohorts available through the National Sleep Research Resource (NSRR) 45 were used for model development and were split at the participant level into training, validation, and internal test sets in a 60%/20%/20% ratio. The CFS cohort 46 and the BZ-CPAP cohort contributed 1,740 PSG recordings for external evaluation and were not used for neural-network training or parameter selection. CFS contributed 726 recordings. Within BZ-CPAP, 507 participants underwent PSG before and after CPAP treatment, yielding 1,014 recordings for paired treatment-response analyses. The overall aim was to learn a continuous representation of sleep depth from single-lead ECG and to evaluate its stage ordering, clinical phenotyping value, and responsiveness to CPAP-associated changes. Cohort characteristics are provided in Appendix A.
ECG preprocessing and PSG-derived labels Single-lead ECG preprocessing followed the pipeline developed for our previous sleep-phenotyping framework 47 . In the public-cohort implementation, ECG signals were resampled to 100 Hz and band-pass filtered at 0.5–40 Hz. First-order polynomial detrending, robust standardization, and amplitude normalization were applied at the recording level, with the resulting signal scaled to [−1, 1]. Signals were segmented into 30-s epochs and aligned with PSG sleep-stage annotations. Stages were encoded as Wake, N1, N2, N3, and REM; legacy stages 3 and 4 were combined as N3. In addition to the waveform, 39 frequency- and time–frequency-domain features were computed for each epoch. Both REM classification and depth ranking were supervised using discrete sleep-stage labels; manually annotated continuous depth targets were not required. Cohort-specific trimming, label handling, and feature construction are detailed in Appendix F.
ECG-SDI framework and model development ECG-SDI used the sleep-staging backbone of our previously proposed two-stage single-lead ECG architecture 47 ; the sleep-event detection branch was not used. In Stage 1, a Net1D-based convolutional encoder extracted time-domain representations from each 30-s ECG epoch 48 . These representations were concatenated with an embedding of the 39 handcrafted features. In Stage 2, overlapping windows of 15 epoch embeddings were projected into tokens and processed as a sequence by a Transformer to incorporate temporal context 49 . Each token corresponded to the central epoch of its window. After sleep-staging pretraining, the convolutional feature extractor and Transformer weights were frozen, and the staging classifier was replaced by two trainable heads for REM classification and continuous depth estimation. The joint objective adapted the ranking-based SDI framework established in our previous work 24 . REM cross-entropy was combined with a weighted pair-margin ranking loss over Wake and NREM stages. The depth head produced an unconstrained scalar. For trajectory visualization and biomarker extraction, depth scores were normalized within each recording using the 5th and 95th percentiles among reference Wake/NREM epochs and clipped to [0, 1]. Thus, this research normalization used reference sleep-stage labels in addition to the ECG-derived model output. The unsmoothed normalized sequence was used for the reported public-cohort trajectory and biomarker analyses. Architecture, loss definitions, normalization, and implementation settings are specified in Appendix G; the existing architecture diagram is provided in Fig. 8. 13
ECG-SDI-derived biomarkers and phenotype discovery Following the digital biomarker framework established in our prior study 24 , each overnight ECGSDI trajectory was summarized using time-domain, distributional, complexity, and REM-related descriptors. The coefficient of variation (CV) and skewness (SK) characterized the depth distribution. RB was the fraction of retained epochs with ECG-SDI below 0.2; RB0.3 used a threshold of 0.3. AP was the trapezoidal area under the normalized ECG-SDI sequence divided by the number of retained epochs, including Wake. Approximate entropy (APPe) and detrended fluctuation analysis (DETRf) characterized temporal regularity and scaling behaviour 50,51 . In the public-cohort implementation, mean REM depth (MDR) and REM proportion (PR) were calculated using reference PSG stage labels: MDR was the mean normalized depth during REM, and PR was the number of REM epochs divided by the number of non-Wake epochs. Mathematical definitions and computational conventions are provided in Appendix H. Eight biomarkers—AP, RB, CV, SK, APPe, DETRf, MDR, and PR—were standardized and entered into a two-component Gaussian mixture model separately within SHHS, CFS, and MrOS. After clustering, the component with higher mean AHI was designated the disturbed sleep subtype and the other component the normal sleep subtype. The two subtypes were compared in terms of biomarker profiles, clinical characteristics, and all-cause mortality. Clustering settings and clinical variable definitions are provided in Appendix I.
Clinical definitions and statistical analysis Sleep apnea was defined as AHI ≥ 5 events h−1 . Questionnaire-based sleep outcomes were derived from morning-after-PSG items. These included diffa10, ltdp10, and rest10 in SHHS; easlp, difbak, slpqua, and desslp in CFS; and poxfall, poxqual1, and poxqual3 in MrOS. The operational thresholds and combinations are specified in Appendix I. Model performance was evaluated using Spearman correlation between raw depth scores and ordered Wake/NREM stage labels, excluding REM, and the AUROC for REM classification. Publiccohort performance was calculated from pooled eligible epochs, with 95% percentile confidence intervals estimated using 200 bootstrap resamples of epochs. Representative CFS recordings and within-stage examples were used for descriptive visualization. Within each stage-specific triplet, epochs were selected from the same participant and arranged by ECG-SDI. Heart rate was estimated from intervals between detected ECG peaks within the displayed 30-s segment, as described in Appendix F. Continuous subtype differences were summarized using Cohen’s d. Binary clinical associations were estimated using regularized logistic regression adjusted for age, BMI, and sex when available; sex was omitted when it was the outcome. Odds ratios were exponentiated subtype coefficients, and 95% percentile confidence intervals were estimated using 500 bootstrap resamples. All-cause mortality in SHHS was assessed using Kaplan–Meier curves, log-rank tests, and Cox proportional hazards models based on NSRR follow-up records 52 . Model 1 included age, sex, and race; Model 2 additionally included BMI, smoking, hypertension, and diabetes; Model 3 additionally included AHI and total sleep time. Estimation, coding, and censoring procedures are detailed in Appendix I.
CPAP treatment-response and exploratory analyses Treatment-associated changes were evaluated using paired pre- and post-CPAP recordings from the BZ-CPAP cohort, with the participant as the analysis unit. Night-level biomarkers were compared using two-sided paired tests. Relative changes in the reported cohort means
14
were expressed as 100(x̄post − x̄pre )/x̄pre ; absolute changes were distinguished from percentage changes. Exploratory analyses examined whether changes in ECG-SDI biomarkers were associated with changes in PSG outcomes. Reductions in APPe, CV, and ODI3 were defined as pre-CPAP minus post-CPAP values, whereas increased sleep efficiency was defined as post-CPAP minus pre-CPAP values and expressed in percentage points. Spearman correlations were calculated for APPe reduction versus ODI3 reduction and CV reduction versus increased sleep efficiency. Covariate-adjusted regression analyses included 395 paired participants per model. M0 adjusted for age, sex, BMI, baseline AHI, and the corresponding baseline PSG outcome; M1 additionally adjusted for the baseline value of the corresponding ECG-SDI biomarker. Associations were summarized by standardized coefficients and 95% confidence intervals. Within-stage changes were evaluated among participants with at least 10 min of PSG-defined N2 at both visits. Mean ECG-SDI was calculated within N2 for each participant at each visit, and the paired post-minus-pre difference was assessed using a two-sided paired t-test and a 95% confidence interval. Statistical significance was evaluated at P < 0.05, and the additional association and within-N2 analyses were interpreted as exploratory. The definitions and adjustment sets are consolidated in Appendix J.
Wearable proof-of-concept implementation The proof-of-concept workflow linked chest-worn single-lead ECG acquisition in a modified Lead II configuration to a smartphone recording interface and ECG-SDI analysis and reporting components. ECG acquisition was performed using the Wen-Xin-Wu-Yang device (Anhui Heart Voice, China). The illustrated report comprised an overnight depth trajectory and summary fields for AP, PR, RB, and CV. This component demonstrated the proposed acquisition-to-report workflow; its displayed interface, trajectory, and numerical values were illustrative. No homebased accuracy analysis or individual treatment-benefit classification was performed. The PSGreferenced processing used for the research analyses is specified above and in the supplementary implementation details.
15
RESOURCE AVAILABILITY Data availability The public sleep cohorts analyzed during the current study are available in the National Sleep Research Resource (NSRR) repository at https://sleepdata.org/. The BZ-CPAP dataset is not currently publicly available; inquiries regarding data access may be directed to the corresponding authors.
Code availability Code for public-cohort ECG preprocessing, sleep-staging backbone training, ECG-SDI adaptation and evaluation, biomarker extraction, phenotype clustering, survival analysis, and figure generation is available at https://github.com/xdl1216/ecg-sdi
ACKNOWLEDGMENTS This work was supported by the National Natural Science Foundation of China (62102008, 62172018), CCF-Tencent Rhino-Bird Open Research Fund (CCF-Tencent RAGR20250108), CCF-Zhipu Large Model Innovation Fund (CCF-Zhipu202414), PKU-OPPO Fund (BO202301, BO202503), Research Project of Peking University in the State Key Laboratory of Vascular Homeostasis and Remodeling (2025-SKLVHR-YCTS-02), Beijing Municipal Science and Technology Commission (Z251100000725008). The Cleveland Family Study (CFS) was supported by grants from the National Institutes of Health (HL46380, M01 RR00080-39, T32-HL07567, RO1-46380). The National Sleep Research Resource was supported by the National Heart, Lung, and Blood Institute (R24 HL114473, 75N92019R002). The Multi-Ethnic Study of Atherosclerosis (MESA) Sleep Ancillary study was funded by NIH-NHLBI Association of Sleep Disorders with Cardiovascular Health Across Ethnic Groups (RO1 HL098433). MESA is supported by NHLBI funded contracts HHSN268201500003I, N01HC-95159, N01-HC-95160, N01-HC-95161, N01-HC-95162, N01-HC-95163, N01-HC-95164, N01-HC-95165, N01-HC-95166, N01-HC-95167, N01-HC-95168 and N01-HC-95169 from the National Heart, Lung, and Blood Institute, and by cooperative agreements UL1-TR-000040, UL1TR-001079, and UL1-TR-001420 funded by NCATS. The National Sleep Research Resource was supported by the National Heart, Lung, and Blood Institute (R24 HL114473, 75N92019R002). The National Heart, Lung, and Blood Institute provided funding for the ancillary MrOS Sleep Study, "Outcomes of Sleep Disorders in Older Men," under the following grant numbers: R01 HL071194, R01 HL070848, R01 HL070847, R01 HL070842, R01 HL070841, R01 HL070837, R01 HL070838, and R01 HL070839. The National Sleep Research Resource was supported by the National Heart, Lung, and Blood Institute (R24 HL114473, 75N92019R002). The Sleep Heart Health Study (SHHS) was supported by National Heart, Lung, and Blood Institute cooperative agreements U01HL53916 (University of California, Davis), U01HL53931 (New York University), U01HL53934 (University of Minnesota), U01HL53937 and U01HL64360 (Johns Hopkins University), U01HL53938 (University of Arizona), U01HL53940 (University of Washington), U01HL53941 (Boston University), and U01HL63463 (Case Western Reserve University). The National Sleep Research Resource was supported by the National Heart, Lung, and Blood Institute (R24 HL114473, 75N92019R002).
16
AUTHOR CONTRIBUTIONS Donglin Xie conceived and designed the study, implemented the algorithms, analyzed the results, and drafted the manuscript. Qingshuo Zhao and Songchi Zhou contributed to data curation, preprocessing, and related supporting analyses. Haoyu Wang assisted with figure preparation and manuscript revision. Jingyu Wang provided the BZ-CPAP cohort data and offered clinical support. Yuxi Zhou contributed to methodological discussions and manuscript revision. Thomas Penzel and Shenda Hong supervised the project, provided overall technical guidance, and critically reviewed and revised the manuscript. All authors reviewed and approved the final manuscript.
DECLARATION OF INTERESTS The authors declare no competing interests.
17
References 1. Boyce, R., Williams, S., and Adamantidis, A. (2017). Rem sleep and memory. Current Opinion in Neurobiology 44, 167–177. 2. Baranwal, N., Phoebe, K.Y., and Siegel, N.S. (2023). Sleep physiology, pathophysiology, and sleep hygiene. Progress in cardiovascular diseases 77, 59–69. 3. Ogilvie, R.P., and Patel, S.R. (2017). The epidemiology of sleep and obesity. Sleep health 3, 383–388. 4. Riemann, D., Krone, L.B., Wulff, K., and Nissen, C. (2020). Sleep, insomnia, and depression. Neuropsychopharmacology 45, 74–89. 5. Hu, M.T. (2020). Rem sleep behavior disorder (rbd). Neurobiology of Disease 143, 104996. 6. Pagano, G., De Micco, R., Yousaf, T., Wilson, H., Chandra, A., and Politis, M. (2018). Rem behavior disorder predicts motor progression and cognitive decline in parkinson disease. Neurology 91, e894–e905. 7. Wang, Y., Wen, Q., Luo, S., Tang, L., Zhan, S., Cao, J., Wang, S., and Chen, Q. (2025). Phenome-wide analysis of diseases in relation to objectively measured sleep traits and comparison with subjective sleep traits in 88,461 adults. Health data science 5, 0161. 8. Martin, S.E., Engleman, H.M., Deary, I.J., and Douglas, N.J. (1996). The effect of sleep fragmentation on daytime function. American journal of respiratory and critical care medicine 153, 1328–1332. 9. Benkirane, O., Delwiche, B., Mairesse, O., and Peigneux, P. (2022). Impact of sleep fragmentation on cognition and fatigue. International journal of environmental research and public health 19, 15485. 10. Boon, M.E., Van Hooff, M., Vink, J., and Geurts, S. (2023). The effect of fragmented sleep on emotion regulation ability and usage. Cognition and emotion 37, 1132–1143. 11. Fallmann, S., and Chen, L. (2019). Computational sleep behavior analysis: A survey. IEEE Access 7, 142421–142440. 12. Magalang, U.J., Chen, N.H., Cistulli, P.A., Fedson, A.C., Gíslason, T., Hillman, D., Penzel, T., Tamisier, R., Tufik, S., Phillips, G. et al. (2013). Agreement in the scoring of respiratory events and sleep among international sleep centers. Sleep 36, 591–596. 13. Younes, M., Raneri, J., and Hanly, P. (2016). Staging sleep in polysomnograms: analysis of inter-scorer variability. Journal of Clinical Sleep Medicine 12, 885–894. 14. Bonnet, M., and Arand, D. (1997). Heart rate variability: sleep stage, time of night, and arousal influences. Electroencephalography and clinical neurophysiology 102, 390–396. 15. Meskó, B., Drobni, Z., Bényei, É., Gergely, B., and Győrffy, Z. (2017). Digital health is a cultural transformation of traditional healthcare. Mhealth 3, 38. 16. Senbekov, M., Saliev, T., Bukeyeva, Z., Almabayeva, A., Zhanaliyeva, M., Aitenova, N., Toishibekov, Y., and Fakhradiyev, I. (2020). The recent progress and applications of digital technologies in healthcare: a review. International journal of telemedicine and applications 2020, 8830200. 18
17. Coravos, A., Khozin, S., and Mandl, K.D. (2019). Developing and adopting safe and effective digital biomarkers to improve patient outcomes. NPJ digital medicine 2, 14. 18. Vasudevan, S., Saha, A., Tarver, M.E., and Patel, B. (2022). Digital biomarkers: convergence of digital health technologies and biomarkers. NPJ digital medicine 5, 36. 19. Younes, M., Ostrowski, M., Soiferman, M., Younes, H., Younes, M., Raneri, J., and Hanly, P. (2015). Odds ratio product of sleep eeg as a continuous measure of sleep state. Sleep 38, 641–654. 20. Penner, C.G., Gerardy, B., Ryan, R., and Williams, M. (2019). The odds ratio product (an objective sleep depth measure): normal values, repeatability, and change with cpap in patients with osa: the odds ratio product. Journal of Clinical Sleep Medicine 15, 1155–1163. 21. Younes, M., Azarbarzin, A., Reid, M., Mazzotti, D.R., and Redline, S. (2021). Characteristics and reproducibility of novel sleep eeg biomarkers and their variation with sleep apnea and insomnia in a large community-based cohort. Sleep 44, zsab145. 22. Gratton, M.K., and Mazzotti, D.R. (2025). Toward higher resolution hypnograms for improved precision sleep medicine: the role of measures of sleep depth. Oxford University Press. 23. Meulenbrugge, E.J., Sun, H., Ganglberger, W., Nasiri, S., Thomas, R.J., and Westover, M.B. (2026). Ordinal sleep depth: A data-driven continuous measurement of sleep depth. Journal of Sleep Research 35, e70074. 24. Zhou, S., Song, G., Sun, H., Zhang, D., Leng, Y., Westover, M.B., and Hong, S. (2025). Continuous sleep depth index annotation with deep learning yields novel digital biomarkers for sleep health. NPJ Digital Medicine 8, 203. 25. Dobbs, W.C., Fedewa, M.V., MacDonald, H.V., Holmes, C.J., Cicone, Z.S., Plews, D.J., and Esco, M.R. (2019). The accuracy of acquiring heart rate variability from portable devices: a systematic review and meta-analysis. Sports Medicine 49, 417–435. 26. Ozkan, H., Ozhan, O., Karadana, Y., Gulcu, M., Macit, S., and Husain, F. (2019). A portable wearable tele-ecg monitoring system. IEEE Transactions on Instrumentation and Measurement 69, 173–182. 27. Yoon, H., and Choi, S.H. (2023). Technologies for sleep monitoring at home: Wearables and nearables. Biomedical Engineering Letters 13, 313–327. 28. Mathunjwa, B.M., Kor, R.Y.J., Ngarnkuekool, W., and Hsu, Y.L. (2025). A comprehensive review of home sleep monitoring technologies: Smartphone apps, smartwatches, and smart mattresses. Sensors 25, 1771. 29. da Estrela, C., McGrath, J., Booij, L., and Gouin, J.P. (2021). Heart rate variability, sleep quality, and depression in the context of chronic stress. Annals of Behavioral Medicine 55, 155–164. 30. Supratak, A., Dong, H., Wu, C., and Guo, Y. (2017). Deepsleepnet: A model for automatic sleep stage scoring based on raw single-channel eeg. IEEE transactions on neural systems and rehabilitation engineering 25, 1998–2008. 31. Fonseca, P., Den Teuling, N., Long, X., and Aarts, R.M. (2016). Cardiorespiratory sleep stage detection using conditional random fields. IEEE journal of biomedical and health informatics 21, 956–966. 19
32. Radha, M., Fonseca, P., Moreau, A., Ross, M., Cerny, A., Anderer, P., Long, X., and Aarts, R.M. (2019). Sleep stage classification from heart-rate variability using long short-term memory neural networks. Scientific reports 9, 14149. 33. Casal, R., Di Persia, L.E., and Schlotthauer, G. (2019). Sleep-wake stages classification using heart rate signals from pulse oximetry. Heliyon 5. 34. Lyu, J., Shi, W., Zhang, C., and Yeh, C.H. (2023). A novel sleep staging method based on eeg and ecg multimodal features combination. IEEE Transactions on Neural Systems and Rehabilitation Engineering 31, 4073–4084. 35. Akter, S., Masud, M.A., Promi, M.S.I., Sultana, N., Ahmed, M., Rahman, M.M., Yousuf, M.A., Aloteibi, S., and Moni, M.A. (2026). Dream: A novel explainable neural network for detecting sleep apnea using single-lead ecg signals. Biomedical Signal Processing and Control 114, 109291. 36. Zhu, H., Luo, Q., Wang, Y., Maimaiti, M., Zhang, H., Xiong, Y., Ruan, C., Wang, J., Liu, Y., Zhou, M. et al. (2026). Artificial intelligence-enabled 8-channel ecg diagnosing of abnormalities with wide qrs complexes: a cohort study. Health Data Science. 37. Birrer, V., Elgendi, M., Lambercy, O., and Menon, C. (2024). Evaluating reliability in wearable devices for sleep staging. NPJ Digital Medicine 7, 74. 38. Patil, S.P., Ayappa, I.A., Caples, S.M., Kimoff, R.J., Patel, S.R., and Harrod, C.G. (2019). Treatment of adult obstructive sleep apnea with positive airway pressure: an american academy of sleep medicine clinical practice guideline. Journal of Clinical Sleep Medicine 15, 335–343. 39. Batool-Anwar, S., Goodwin, J.L., Kushida, C.A., Walsh, J.A., Simon, R.D., Nichols, D.A., and Quan, S.F. (2016). Impact of continuous positive airway pressure (cpap) on quality of life in patients with obstructive sleep apnea (osa). Journal of sleep research 25, 731–738. 40. Qanash, S., Giannouli, E., and Younes, M. (2017). Assessment of intervention-related changes in non-rapid-eye-movement sleep depth: importance of sleep depth changes within stage 2. Sleep Medicine 40, 84–93. doi: 10.1016/j.sleep.2017.09.022. 41. Nelesen, R.A., Yu, H., Ziegler, M.G., Mills, P.J., Clausen, J.L., and Dimsdale, J.E. (2001). Continuous positive airway pressure normalizes cardiac autonomic and hemodynamic responses to a laboratory stressor in apneic patients. Chest 119, 1092–1101. doi: 10.1378/chest.119.4.1092. 42. Quan, S.F., Howard, B.V., Iber, C., Kiley, J.P., Nieto, F.J., O’Connor, G.T., Rapoport, D.M., Redline, S., Robbins, J., Samet, J.M. et al. (1997). The sleep heart health study: design, rationale, and methods. Sleep 20, 1077–1085. 43. Chen, X., Wang, R., Zee, P., Lutsey, P.L., Javaheri, S., Alcántara, C., Jackson, C.L., Williams, M.A., and Redline, S. (2015). Racial/ethnic differences in sleep disturbances: the multi-ethnic study of atherosclerosis (mesa). Sleep 38, 877–888. 44. Blackwell, T., Yaffe, K., Ancoli-Israel, S., Redline, S., Ensrud, K.E., Stefanick, M.L., Laffan, A., Stone, K.L., and in Men Study Group, O.F. (2011). Associations between sleep architecture and sleep-disordered breathing and cognition in older community-dwelling men: the osteoporotic fractures in men sleep study. Journal of the American Geriatrics Society 59, 2217–2225. 20
45. Zhang, G.Q., Cui, L., Mueller, R., Tao, S., Kim, M., Rueschman, M., Mariani, S., Mobley, D., and Redline, S. (2018). The national sleep research resource: towards a sleep data commons. Journal of the American Medical Informatics Association 25, 1351–1358. 46. Redline, S., Tishler, P.V., Tosteson, T.D., Williamson, J., Kump, K., Browner, I., Ferrette, V., and Krejci, P. (1995). The familial aggregation of obstructive sleep apnea. American journal of respiratory and critical care medicine 151, 682–687. 47. Xie, D., Zhao, Q., Wang, J., Geng, S., Jin, J., Li, J., Guo, R., Nie, G., Tang, G., Zhou, Y., Penzel, T., and Hong, S. (2026). Holter-to-sleep: Ai-enabled repurposing of single-lead ecg for sleep phenotyping. . URL: https://arxiv.org/abs/2603.18714. arXiv:2603.18714. 48. Hong, S., Xu, Y., Khare, A., Priambada, S., Maher, K., Aljiffry, A., Sun, J., and Tumanov, A. (2020). Holmes: Health online model ensemble serving for deep learning models in intensive care units. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. pp. 1614–1624. 49. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. Advances in neural information processing systems 30. 50. Richman, J.S., and Moorman, J.R. (2000). Physiological time-series analysis using approximate entropy and sample entropy. American journal of physiology-heart and circulatory physiology 278, H2039–H2049. 51. Hardstone, R., Poil, S.S., Schiavone, G., Jansen, R., Nikulin, V.V., Mansvelder, H.D., and Linkenkaer-Hansen, K. (2012). Detrended fluctuation analysis: a scale-free view on neuronal oscillations. Frontiers in physiology 3, 23105. 52. Punjabi, N.M., Caffo, B.S., Goodwin, J.L., Gottlieb, D.J., Newman, A.B., O’Connor, G.T., Rapoport, D.M., Redline, S., Resnick, H.E., Robbins, J.A. et al. (2009). Sleep-disordered breathing and mortality: a prospective cohort study. PLoS medicine 6, e1000132.
21
Appendix A
Baseline characteristics of the study cohorts
Appendix Table 2 summarizes the baseline characteristics of the cohorts included in this study, including sample size, age, female proportion, BMI, AHI, and acquisition timeframe. Except for female proportion, continuous variables are reported as mean ± standard deviation; in the BZ-CPAP cohort, pre and post in the AHI column denote measurements obtained before and after CPAP treatment, respectively. Table 2: Baseline characteristics of the study cohorts included in this work. Continuous variables are reported as mean ± standard deviation unless otherwise specified. In the BZ-CPAP cohort, pre and post in the AHI column denote measurements obtained before and after CPAP treatment, respectively. Cohort
Number
Age (years)
Female (%)
BMI (kg/m2 )
AHI
Timeframe
CFS MrOS MESA SHHS
726 2,806 2,055 5,791
41.4 ± 19.4 76.4 ± 5.5 69.4 ± 9.1 63.1 ± 11.2
55% 0% 54% 52%
32.4 ± 9.5 27.2 ± 3.8 28.7 ± 5.5 28.2 ± 5.1
2001–2006 2003–2012 2010–2013 1995–2010
BZ-CPAP
507
47.0 ± 11.8
9%
30.7 ± 4.8
10.2 ± 18.5 13.7 ± 14.4 14.8 ± 16.7 10.2 ± 13.6 pre: 52.38 ± 25.04 post: 5.68 ± 7.28
22
2019–2025
Appendix B
Box plot of stage-wise distribution of ECG-SDI
Figure 7: Stage-wise distribution of ECG-SDI across conventional sleep stages in the SHHS, CFS, MESA, and MrOS cohorts. Boxplots show the distributions of ECG-SDI for wake (W), N1, N2, N3, and REM sleep. The center line denotes the median, the box denotes the interquartile range, and the whiskers indicate the distribution spread.
23
24
Clinical outcomes Sleep apnea 2156 / 2139 (No / Yes) Poor sleep quality 3486 / 809 (No / Yes) Insomnia 3100 / 1195 (No / Yes) Diabetes 4010 / 285 (No / Yes) CVD 3437 / 858 (No / Yes) Hypertension 2568 / 1727 (No / Yes)
0.20±0.08 0.58±0.10 0.54±0.07 -0.29±0.41 0.53±0.27 0.16±0.09 0.73±0.20 1.31±0.09
SDI-derived biomarkers RB 0.11±0.03 CV 0.44±0.05 AP 0.61±0.05 SK -0.69±0.40 MDR 0.61±0.12 PR 0.21±0.06 APPe 0.78±0.15 DETRf 1.30±0.08
1.26 (1.15, 1.40) 1.33 (1.18, 1.52) 1.42 (1.29, 1.58) 1.15 (0.94, 1.39) 1.04 (0.92, 1.20) 1.38 (1.26, 1.60)
642 / 813
1120 / 335
936 / 519
1335 / 120
1119 / 336
728 / 727
2.00 (1.93, 2.08) 2.05 (1.98, 2.12) -1.15 (-1.21, -1.08) 1.00 (0.95, 1.06) -0.48 (-0.57, -0.42) -0.68 (-0.76, -0.62) -0.28 (-0.34, -0.22) 0.17 (0.11, 0.22)
0.23 (0.16, 0.30)
1.15 (1.02, 1.30)
17.55±26.54
809 / 663
2222 / 2097
0.03 (-0.03, 0.08)
-0.57 (-0.63, -0.51)
28.26±5.49
28.13±4.95
0.15 (0.10, 0.21)
ES (95% CI)
78.39±14.22
64.43±11.81
D
62.70±10.99
N
Traditional sleep metrics Sleep efficiency 84.26±8.45 (%) Sleep latency 12.90±17.70 (min)
Demographics Age (years) BMI (kg/m2 ) Sex (Female / Male)
Variable
SHHS N
79.65±10.98
297 / 239
31.93±8.76
< 0.001
0.013
0.044
< 0.001
< 0.001
< 0.001
< 0.001 < 0.001 < 0.001 < 0.001 < 0.001 < 0.001 < 0.001 < 0.001
363 / 173
480 / 56
467 / 67
503 / 33
501 / 35
341 / 195
0.28±0.10 0.68±0.13 0.47±0.06 -0.07±0.32 0.47±0.07 0.18±0.06 0.55±0.13 1.32±0.08
< 0.001 20.77±28.27
< 0.001
0.021
0.420
< 0.001 40.99±19.01
P
117 / 73
157 / 33
158 / 31
172 / 18
167 / 23
107 / 83
0.23±0.12 0.62±0.16 0.49±0.09 0.02±0.53 0.40±0.23 0.14±0.09 0.86±0.27 1.25±0.13
18.94±47.77
75.82±17.06
102 / 88
33.65±11.35
42.42±20.45
D
ES (95% CI)
1.12 (0.83, 1.61)
1.49 (0.90, 2.26)
1.16 (0.61, 1.97)
1.53 (0.95, 2.59)
1.81 (1.16, 3.07)
1.16 (0.70, 1.57)
-0.53 (-0.74, -0.33) -0.40 (-0.62, -0.22) 0.26 (0.06, 0.45) 0.22 (0.02, 0.41) -0.53 (-0.75, -0.32) -0.53 (-0.70, -0.33) 1.71 (1.53, 1.91) -0.70 (-0.88, -0.54)
-0.05 (-0.29, 0.19)
-0.30 (-0.46, -0.12)
0.93 (0.67, 1.30)
0.18 (0.01, 0.37)
0.07 (-0.08, 0.23)
CFS
0.147
0.018
0.397
0.170
0.023
0.091
< 0.001 < 0.001 0.009 0.035 < 0.001 < 0.001 < 0.001 < 0.001
0.619
0.004
0.744
0.059
0.401
P
1214 / 1172
NA
2084 / 302
1960 / 426
2054 / 332
426 / 1960
0.30±0.10 0.70±0.13 0.45±0.06 0.00±0.30 0.47±0.07 0.20±0.06 0.60±0.13 1.33±0.07
21.13±20.30
77.80±10.20
NA
27.09±3.73
76.80±5.39
N
199 / 221
NA
353 / 67
277 / 143
295 / 125
59 / 361
0.35±0.16 0.78±0.22 0.44±0.10 0.20±0.58 0.53±0.21 0.14±0.08 0.75±0.23 1.28±0.10
37.55±50.71
66.03±16.12
NA
27.54±4.30
78.01±5.77
D
ES (95% CI)
NA
0.043
< 0.001
P
1.07 (0.87, 1.24)
NA
1.22 (0.88, 1.61)
2.29 (1.91, 2.73)
2.71 (2.13, 3.27)
1.22 (0.93, 1.97)
0.51 (0.37, 0.67) 0.51 (0.36, 0.65) -0.21 (-0.33, -0.06) 0.54 (0.38, 0.67) 0.50 (0.29, 0.73) -0.94 (-1.06, -0.81) 1.02 (0.88, 1.15) -0.81 (-0.94, -0.69)
0.60 (0.40, 0.73)
0.204
NA
0.078
< 0.001
< 0.001
0.067
< 0.001 < 0.001 < 0.001 < 0.001 < 0.001 < 0.001 < 0.001 < 0.001
< 0.001
-1.04 (-1.19, -0.95) < 0.001
NA
0.12 (-0.01, 0.22)
0.35 (0.26, 0.49)
MrOS
Table 3: Detailed demographic, sleep, biomarker, and clinical characteristics of the two sleep phenotypes identified by clustering of sleep-depth-derived digital biomarkers. For continuous variables, N and D denote mean ± standard deviation values in the normal sleep subtype and disturbed sleep subtype, respectively, and ES denotes effect size with 95% confidence intervals, calculated as Cohen’s d. For binary clinical outcomes, the table reports the number of participants in each category for the two subtypes, and ES denotes adjusted odds ratios (ORs) with 95% confidence intervals after controlling for age, BMI, sex, sleep efficiency, and sleep latency. In the sex row, the OR corresponds to female versus male; for the remaining clinical outcomes, ORs compare the prevalence of the outcome in the disturbed sleep subtype relative to the normal sleep subtype. MrOS was not included in the sex analysis because it is a male-only cohort, and CVD outcome data were not available in MrOS. This table provides the complete numerical counterpart of the effect-size and odds-ratio visualizations shown in Fig. 5 of the main text.
Appendix C Detailed paired comparison of ECG-SDI-derived biomarkers before and after CPAP treatment To complement the main-text results on CPAP responsiveness, this table summarizes the detailed paired statistics of ECG-SDI-derived biomarkers in the 507 pre- and post-treatment PSG pairs from the BZ-CPAP cohort, including mean values before treatment, mean values after treatment, mean changes, significance levels, and statistical test results. Overall, AP, DETRf, and PR increased after treatment, whereas RB, RB0.3 , CV, SK and APPe decreased, indicating greater cumulative sleep-depth burden, reduced shallow-sleep dominance, attenuated overnight variability, and systematic shifts in complexity-related features. In contrast, MDR did not show a statistically significant pre–post change. This table provides the full numerical support for the distributional differences illustrated in Fig. 4 of the main text. Table 4: Detailed paired comparison of ECG-SDI-derived biomarkers before and after CPAP treatment in the BZ-CPAP cohort. pre-CPAP, before treatment; post-CPAP, after treatment; Change, post-CPAP minus pre-CPAP. P values were obtained from two-sided paired tests. Sig indicates significance level: * P < 0.05, ** P < 0.01, *** P < 0.001, ns not significant. Metric
pre-CPAP
post-CPAP
Change
P value
Sig
AP RB RB0.3 CV SK APPe DETRf MDR PR
0.5909 0.0926 0.1580 0.5277 -0.2192 1.1257 1.2219 0.5880 0.1811
0.6269 0.0820 0.1327 0.5021 -0.4483 0.9243 1.2673 0.5744 0.2615
+6.10% -11.45% -16.01% -4.85% -104.5% -17.89% +3.72% -2.31% +44.40%
< 0.001 0.0368 < 0.001 < 0.001 < 0.001 < 0.001 < 0.001 0.1680 < 0.001
*** * *** *** *** *** *** ns ***
25
Appendix D
Detailed architecture of the ECG-SDI framework
Figure 8: Detailed architecture of the proposed ECG-SDI framework. The proposed ECGSDI framework is built upon a pretrained and frozen two-stage single-lead ECG sleep-staging backbone. In Stage 1, each 30-s ECG epoch is preprocessed and passed through a CNN-based time-domain encoder together with a handcrafted-feature branch, where 39 frequency- and time–frequency-domain features are projected through two fully connected layers and fused with the CNN representation to form an epoch-level sleep embedding. In Stage 2, the frozen Stage-1 encoder generates sequential multi-epoch representations, which are further processed by a Transformer-based temporal module to capture inter-epoch contextual dependencies and refine sleep representations. During ECG-SDI adaptation, the original refined sleep-staging head is replaced with two lightweight task-specific heads: one for REM-related binary classification and the other for continuous sleep-depth estimation, producing REM-related outputs and the continuous ECG-SDI score, respectively. This design repurposes a pretrained sleep-staging backbone for continuous sleep-depth biomarker learning while preserving multi-epoch temporal modeling.
26
Appendix E Brief description of ECG-SDI-derived digital biomarkers Appendix Table 5 summarizes the ECG-SDI-derived digital biomarkers used in this study together with brief interpretive descriptions. To improve readability, the descriptions emphasize the intuitive physiological meaning of each metric rather than its formal mathematical definition; among them, RB0.3 and SampEn were primarily included as supplementary descriptors in the paired pre–post CPAP analyses. Table 5: Brief description of ECG-SDI-derived digital biomarkers used in clustering and treatment-response analyses. Descriptions are intended to provide intuitive physiological interpretation rather than formal mathematical definitions. RB0.3 was additionally used in the CPAP treatment-response analysis. Metric
Category
Brief description
AP
Depth burden
RB
Shallow-sleep burden Shallow-sleep burden
Normalized area under the whole-night ECG-SDI curve. Higher values indicate greater cumulative sleep-depth burden across the night. Proportion of epochs with ECG-SDI values below 0.2, reflecting the overall dominance of shallow sleep. Proportion of epochs with ECG-SDI values below 0.3. This is a less stringent shallow-sleep index used mainly for treatment-response analysis. Coefficient of variation of the overnight ECG-SDI trajectory, describing the relative extent of night-long fluctuation. Skewness of the ECG-SDI distribution, reflecting whether the depth profile is shifted toward shallower or deeper values. Approximate entropy, used to characterize the regularity and predictability of the ECG-SDI time series. Lower values indicate a more regular trajectory. Detrended fluctuation analysis index, describing scale-free self-affinity and long-range structure in the ECG-SDI trajectory. Mean ECG-SDI value during REM epochs, reflecting the average depth characteristics within REM sleep. Proportion of REM sleep relative to total sleep time, reflecting REMstage contribution to the whole-night sleep structure.
RB0.3
CV
Variability
SK
Distribution shape Complexity
APPe
DETRf MDR PR
Scale-free structure REM organization REM organization
27
Appendix F ECG preprocessing, handcrafted features, and illustrative cases For the public-cohort EDF recordings, one ECG channel was extracted using the cohort-specific channel names: ECG for SHHS; ECG2, ECG1, or EKG for MESA; ECG2 or ECG1 for CFS; and ECGR, ECG R, or ECG for MrOS. Signals were resampled to 100 Hz, band-pass filtered at 0.5–40 Hz, and detrended by subtracting a first-order polynomial fitted over the recording. Standardization used the mean and population standard deviation of samples between the recording’s 2.5th and 97.5th amplitude percentiles. The standardized signal was subsequently mapped to [−1, 1] using its recording-level minimum and maximum. Thus, the waveform supplied to the model and displayed in the within-stage examples had normalized amplitude rather than calibrated voltage. The signal was divided into 30-s epochs containing 3,000 samples. Reference annotations were encoded as W, N1, N2, N3, and REM, with legacy stage 3 and stage 4 annotations combined as N3. Epochs without valid stage labels were excluded. The first and last 60 epochs were also excluded; the MrOS implementation applied this boundary exclusion only when more than 120 epochs were available. Feature extraction omitted recordings containing more than 1,680 retained epochs. A 15-epoch sliding context, advanced by one epoch, was centered on each prediction, leaving the first and last seven retained input epochs without predictions. Prediction indices therefore refer to the cropped, retained sequence; waveform displays were aligned to their corresponding preprocessed input epochs by adding the seven-epoch center offset. Each epoch additionally contributed 39 handcrafted features. Nine spectral features were computed from the Welch power spectral density (PSD), using a segment length equal to the 3,000-sample epoch: integrated power over 0.5–4, 4–8, and 8–13 Hz; the sum of PSD values; peak frequency; spectral centroid; spectral bandwidth; spectral flatness; and Shannon entropy of the normalized PSD. Thirty wavelet features were derived using a four-level Daubechies4 decomposition. For each of the five coefficient arrays, the squared-coefficient sum, mean, standard deviation, variance, maximum, and minimum were calculated. Whole-night examples used unsmoothed normalized SDI values together with reference hypnograms; REM highlighting was determined by the reference annotations. Displayed total sleep time and sleep efficiency were calculated from the retained prediction epochs, and the displayed area under the curve was obtained by trapezoidal integration at unit epoch spacing. Within-stage examples comprised manually selected 30-s epochs from the same participant and reference stage, arranged by increasing SDI. Heart rate was estimated from the displayed waveform using local-maximum detection with a minimum peak separation of 0.4 s and a minimum prominence of 1.2 times the epoch’s amplitude standard deviation. The reciprocal of the mean interpeak interval was multiplied by 60 and rounded to the nearest integer in beats min−1 ; no estimate was returned when fewer than two peaks were detected. These examples were used for descriptive visualization rather than population-level inference.
28
Appendix G Reproducible model specification and evaluation procedures G.1
Epoch representations and temporal context
The released implementation uses 30-s ECG epochs sampled at 100 Hz. The CNN has seven stages with channel widths of 64, 160, 160, 400, 400, 1024, and 1024, comprising 2, 3, 3, 4, 4, 5, and 5 blocks, respectively; the kernel size is 16 and the downsampling stride is 2. Global average pooling, feature attention, and a fully connected transformation yield a 1024-dimensional waveform representation. The 39 handcrafted descriptors comprise nine spectral descriptors and 30 wavelet descriptors. Spectral descriptors include power in the 0.5–4, 4–8, and 8–13 Hz bands, summed spectral power, peak frequency, spectral centroid, bandwidth, flatness, and entropy. Fourlevel Daubechies-4 decomposition provides five coefficient arrays, each summarized by energy, mean, standard deviation, variance, maximum, and minimum. A 39–64–128 multilayer perceptron with ReLU activations and a feature-attention module yields a 128-dimensional embedding, concatenated with the waveform representation to produce 1152 features per epoch. Each temporal input comprises 15 successive retained epochs centered on the target epoch, with stride 1. The resulting 15 × 1152 feature window is flattened and projected to 512 dimensions. Learned positional embeddings and three Transformer encoder layers, each with eight attention heads, a feedforward width of 2048, and dropout of 0.1, model the sequence of windows within each recording. Thus, attention operates across the recording-level sequence, beyond the local 15-epoch input window. The positional-embedding capacity is 2048 windows. The first and last seven retained input epochs have no centered-window predictions. Prediction indices refer to the retained input sequence; correspondence with the original recording additionally requires accounting for preprocessing exclusions.
G.2
Training stages and task-specific outputs
The CNN is first trained for five-class sleep staging. Its fixed representations are then used to train the staging Transformer. For ECG-SDI adaptation, the staging classifier is removed, the pretrained temporal backbone is frozen, and separate REM and depth branches are optimized. Each branch applies layer normalization, a 512–2048–512 multilayer perceptron with a GELU activation, and a residual connection, followed by layer normalization and a final linear output. The REM branch produces two logits, whereas the depth branch produces one unrestricted real-valued score. REM probability is obtained by softmax, with a threshold of 0.5 for binary classification; the negative class includes wake and all NREM stages. No sigmoid transformation is applied to the depth output in the released evaluation pipeline. Let yi ∈ {0, 1, 2, 3, 4} denote wake, N1, N2, N3, and REM, respectively, and let di be the raw depth score. For N valid epochs in a training batch, the implemented ranking objective is Lrank =
1 X 1(yi < 4, yj < 4, yi ̸= yj ) myi ,yj − sgn(yi − yj )(di − dj ) + ,
N 2
(1)
i<j
where [a]+ = max(a, 0). Margins for wake–N1, wake–N2, wake–N3, N1–N2, N1–N3, and N2–N3 are 1.0, 1.5, 3.0, 0.5, 2.0, and 1.5, respectively. All pairs involving REM are excluded from the numerator, including wake–REM pairs. Equal-stage and REM-containing pairs contribute zero but remain in the denominator. The ranking loss is zero when fewer than two valid epochs are available. The joint objective is L = LREM + 0.5Lrank , (2) 29
where LREM is unweighted binary cross-entropy implemented through two-class softmax crossentropy. Padding labels are ignored in both losses. Backbone parameters are frozen during adaptation, although Transformer dropout remains active in training mode. No padding attention mask is supplied to the Transformer. Table 6: Training settings in the released research scripts. Setting Optimizer Initial learning rate Weight decay Maximum training epochs Early-stopping patience Batch size Random seed
CNN staging Adam 10−3 10−5 50 5 256 ECG epochs 666 + rank
Transformer staging Adam 10−4 0 100 5 64 recordingsa 42
ECG-SDI heads Adam 10−3 0 100 5 1 recording 42
a
The Transformer source-script default is 64 recordings; the accompanying example JSON configuration sets this value to 1. CNN training additionally uses ReduceLROnPlateau with a reduction factor of 0.3 and patience of 10. Checkpoints are selected by minimum validation loss.
G.3
Depth normalization and performance evaluation
For each recording, q5 and q95 are the fifth and 95th percentiles of raw depth scores among reference wake/NREM epochs. Normalized ECG-SDI is di − q5 si = min 1, max 0, . (3) q95 − q5 All epochs are used to estimate these percentiles if no reference wake/NREM epochs are present; when q95 ≤ q5 , the implementation clips di − q5 to [0, 1]. This retrospective normalization uses reference PSG staging. The network itself receives ECG-derived features, but the released normalized-SDI evaluation is not a label-free deployment pipeline. Unsmoothed normalized scores are used by the stage-distribution, within-stage, and biomarker scripts and are the preferred input to the overnight plot. A separate five-point moving average is exported using same-length convolution with zero-padded boundaries. Depth–stage Spearman correlation and pairwise concordance are calculated from pooled raw scores for reference wake/NREM epochs. REM metrics pool epoch-level probabilities across recordings. Percentile 95% confidence intervals use 200 bootstrap resamples of pooled epochs with seed 42; they do not resample participants. The concordance routine retains same-stage pairs, counts concordant ordered pairs and exact joint ties, and evaluates all pairs when their number is at most 50,000. Otherwise, 50,000 index pairs are generated with seed 42 by first sampling the earlier index uniformly and then sampling a later index uniformly. CFS is evaluated separately using the same pipeline.
30
Appendix H
Operational definitions of ECG-SDI biomarkers
Biomarkers were calculated from the unsmoothed, normalized depth sequence exported as depth_score_norm. Let si P denote its value at retained prediction epoch i, N the number of P retained epochs, s̄ = N −1 i si , and mk = N −1 i (si − s̄)k . Unless otherwise specified, the calculations included all retained epochs, including wake and REM; no additional sleep-only restriction was applied. The operational definitions were N −1
1 X si + si+1 , AP = N i=1 2
(4)
N
1 X I(si < q), q ∈ {0.2, 0.3}, RBq = N i=1 √ m2 m3 CV = , SK = 3/2 . −6 s̄ + 10 m2
(5) (6)
Here, RB = RB0.2 , and I(·) is the indicator function. AP used trapezoidal integration with unit epoch spacing and normalization by N , rather than by PSG total sleep time. SK followed the default moment-based estimator in scipy.stats.skew, without finite-sample bias correction. Approximate entropy (APPe) was computed using antropy.app_entropy (AntroPy 0.1.9), with √ embedding dimension m = 2, delay one epoch, Chebyshev distance, tolerance r = 0.2 m2 , and self-matches included. Specifically, APPe = Φ2 (r) − Φ3 (r), where Φm (r) is the mean natural logarithm of the proportion of length-m embedded vectors within distance r of each template. DETRf was computed using antropy.detrended_fluctuation. The mean-centered sequence was cumulatively summed, partitioned into non-overlapping windows, and linearly detrended within each window. Integer window sizes increased approximately geometrically from four epochs to N/10, with a factor of 1.2; incomplete final windows were discarded at each scale. DETRf was the slope of log root-mean-square fluctuation against log window size, excluding scales with zero fluctuation. Let R and S denote retained epochs labelled REM and non-wake, respectively, by the reference PSG annotations. The REM summaries were MDR =
1 X si , |R| i∈R
PR =
|R| . |S|
(7)
These calculations used the exported reference depth_label, rather than the predicted REM class. MDR was assigned zero when no REM epoch was present, and PR was assigned zero when no sleep epoch was present. Both were missing if reference staging was unavailable. Consequently, MDR combined ECG-derived depth with PSG-defined REM intervals, whereas PR was a reference-stage summary included alongside the depth-derived features.
31
Appendix I Clinical coding, phenotype estimation, and survival analysis The phenotype analyses linked biomarker records to cohort clinical tables by participant identifier. SHHS analyses used visit 1; CFS used visit 5; MrOS biomarkers were linked to the visit-1 clinical table. The input tables were SHHS baseline version 0.20.0, SHHS cardiovascular follow-up summary version 0.19.0 (with version 0.20.0 accepted as a fallback), CFS version 0.7.0, and MrOS version 0.6.0. Eight features—AP, RB, CV, SK, APPe, DETRf, MDR, and PR—were standardized to zero mean and unit population standard deviation separately within each cohort. Records missing any selected feature were excluded. A two-component Gaussian mixture model was fitted independently in each cohort using scikit-learn 1.7.2 defaults, including full covariance matrices, one k-means initialization, and random seed 42. The component count was fixed at two. After fitting, the component with higher mean AHI was labelled the disturbed sleep subtype and the other the normal sleep subtype; AHI was used for label orientation, not as a clustering input. Questionnaire indicators were operational binary definitions of symptoms or perceived sleep quality, not clinical diagnoses. Their coding is summarized in Table 7. Sleep apnea was defined by AHI ≥ 5 h−1 , using ahi_a0h4 in SHHS and CFS and poahi3 in MrOS. Hypertension and diabetes used htnderv_s1 and parrptdiab in SHHS, htn and diadiag in CFS, and mhbp and mhdiab in MrOS. The CVD indicator used any_cvd in SHHS, denoting CVD recorded since baseline, and cvd in CFS. Table 7: Operational definitions of questionnaire-derived binary outcomes. Cohort Poor sleep quality
Insomnia symptoms
SHHS ltdp10 ≤ 2 and rest10 ≤ 2 CFS slpqua ≥ 5 and desslp ≥ 4 MrOS poxqual1 ≤ 2 and poxqual3 ≤ 2
diffa10 ≥ 1 easlp > 4 and difbak = 1 poxfall > 40 min
Continuous differences were expressed as Cohen’s d, calculated as disturbed-minus-normal mean difference divided by the pooled within-group sample standard deviation. Its 95% confidence interval used the 2.5th and 97.5th percentiles of 500 bootstrap replicates, resampling records independently within each subtype. Binary associations used logistic regression with age, BMI, subtype, and sex when available; sex was omitted when it was the outcome. Models used an intercept and scikit-learn’s default L2 penalty (C = 1), with a maximum of 1,000 iterations. ORs were exponentiated subtype coefficients; percentile confidence intervals used 500 bootstrap resamples of the model-specific analytic records. Subtype assignments were held fixed during bootstrapping, and seed 42 was used. Missing continuous observations were omitted for each comparison. The implementation encoded missing binary clinical fields as zero and comparisons with missing questionnaire or AHI values as false; remaining missing covariates were excluded per regression. No multiplicity adjustment was applied to these intervals. All-cause mortality in SHHS was defined by vital=0. Follow-up ran from the baseline PSG to death or last contact, using censdate/365.25 years. Participants without recorded death were censored at last contact. Kaplan–Meier estimates and two-sided log-rank tests compared subtypes. Cox models included age, sex, and numeric race code in model 1; BMI, hypertension, diabetes, and the available smoking variable were added in model 2; AHI and available total sleep time were added in model 3. Total sleep time was the sum of available timest1, timest2, timest34, and timerem fields. Smoking was selected as the first field whose name contained smok, pack, or cigar in the merged table. Missing hypertension, diabetes, AHI, race, and smoking values were coded zero; remaining missing model values were excluded, and constant covariates 32
were removed. Cox fitting used lifelines 0.30.0 with an L2 penalizer of 10−4 ; model-based 95% confidence intervals and P values were obtained for the subtype coefficient.
33
Appendix J J.1
Definitions for exploratory CPAP analyses
Participant-level changes and association models
For participant i, reductions in each biomarker X ∈ {APPe, CV} and in ODI3 were defined as ∆Xi = Xi,pre − Xi,post ,
∆ODI3,i = ODI3,i,pre − ODI3,i,post .
The increase in sleep efficiency was defined as ∆SEi = SEi,post − SEi,pre , with SE expressed as a percentage and its change therefore expressed in percentage points. Positive values indicated a reduction in APPe, CV, or ODI3 , or an increase in SE, respectively. The two reported change associations were (∆APPe, ∆ODI3 ) and (∆CV, ∆SE). Unadjusted associations were summarized by Spearman correlations and 95% confidence intervals. The adjusted analyses treated the change in the PSG measure as the outcome and the corresponding ECG-SDI biomarker change as the predictor of interest. For the APPe–ODI3 association, M0 included age, sex, BMI, baseline AHI, and baseline ODI3 ; M1 additionally included baseline APPe. For the CV–SE association, M0 included age, sex, BMI, baseline AHI, and baseline SE; M1 additionally included baseline CV. Each reported adjusted model included 395 paired participants. Regression associations were presented as standardized coefficients with 95% confidence intervals. These analyses characterized associations between paired changes rather than individual treatment-response predictions.
J.2
Mean depth within PSG-defined N2
Let Ni,v denote the N2 epochs contributing ECG-SDI values for participant i at visit v ∈ {pre, post}. The participant-level N2 mean and paired change were s̄N2 i,v =
1 X si,v,t , |Ni,v | t∈N
N2 δi = s̄N2 i,post − s̄i,pre .
i,v
Eligibility required at least 10 min of PSG-defined N2 at each visit. The analysis compared participant-level means using a two-sided paired t-test, with the mean paired difference and its 95% confidence interval reported. Epochs were aggregated within each participant and visit before the paired comparison.
34
Related documents
- SleepEffFormer: Efficient CNN-Transformer with Transition-Aware Smoothing for Single-Channel EEG Sleep Stage Classification#1036831
- Open science requires trust and rigour: a framework for responsible evaluation of shared AI-ECG tools.#29694
- SparrowSNN: A Hardware/software Co-design for Energy Efficient ECG Classification#152990
- The impact of stress on sleep architecture: A seven-day study leveraging a psychophysiological stress detection algorithm and wearable EEG#294720
- Feasibility Considerations of 24-Hour Heart Rate Variability as a Wellness-Focused Biomarker.#196856
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive