Source-linked AI summary
Automated and Interpretable Patient ECG Profiles for Disease Detection, Tracking, and Discovery
Geoffrey H. Tison, Jeffrey Zhang, Francesca N. Delling, Rahul C. Deo
TL;DR
Conventional ECG interpretation is largely rule-based and does not provide scalable, detailed longitudinal tracking while many machine-learning models remain difficult to interpret. The paper develops an automated framework combining CNN-HMM segmentation with 725-element patient-level ECG profiles for cardiac trait estimation and disease detection. Segmentation agreed with clinical interval estimates, and disease models achieved AUROCs from 0.94 for PAH to 0.77 for MVP.
Problem
Existing ECG analysis is largely rule-based, lacks scalable detailed longitudinal tracking, and many machine-learning models are difficult to interpret in medicine.
Method
The framework combines CNN-HMM ECG segmentation with 725-element patient-level ECG profiles and interpretable machine-learning models for cardiac traits and disease.
Results
Disease detection models achieved AUROC=0.94 for PAH, AUROC=0.91 for HCM, AUROC=0.86 for CA, and AUROC=0.77 for MVP.
Takeaways & Limitations
The framework supports automated ECG-based estimation, disease detection, tracking, and discovery while retaining interpretable ECG representations.
Takeaways & Limitations
The study used ECGs interpreted as normal sinus rhythm and included machine-learning models whose interpretability remains important for medical adoption.
Abstract
from arXiv · showhide
The electrocardiogram or ECG has been in use for over 100 years and remains the most widely performed diagnostic test to characterize cardiac structure and electrical activity. We hypothesized that parallel advances in computing power, innovations in machine learning algorithms, and availability of large-scale digitized ECG data would enable extending the utility of the ECG beyond its current limitations, while at the same time preserving interpretability, which is fundamental to medical decision-making. We identified 36,186 ECGs from the UCSF database that were 1) in normal sinus rhythm and 2) would enable training of specific models for estimation of cardiac structure or function or detection of disease. We derived a novel model for ECG segmentation using convolutional neural networks (CNN) and Hidden Markov Models (HMM) and evaluated its output by comparing electrical interval estimates to 141,864 measurements from the clinical workflow. We built a 725-element patient-level ECG profile using downsampled segmentation data and trained machine learning models to estimate left ventricular mass, left atrial volume, mitral annulus e' and to detect and track four diseases: pulmonary arterial hypertension (PAH), hypertrophic cardiomyopathy (HCM), cardiac amyloid (CA), and mitral valve prolapse (MVP). CNN-HMM derived ECG segmentation agreed with clinical estimates, with median absolute deviations (MAD) as a fraction of observed value of 0.6% for heart rate and 4% for QT interval. Patient-level ECG profiles enabled quantitative estimates of left ventricular and mitral annulus e' velocity with good discrimination in binary classification models of left ventricular hypertrophy and diastolic function. Models for disease detection ranged from AUROC of 0.94 to 0.77 for MVP. Top-ranked variables for all models included known ECG characteristics along with novel predictors of these traits/diseases.
Introduction
ECG interpretation has remained largely rule-based despite the tracing containing richer physiologic information. The study proposes scalable machine-learning analysis that estimates quantitative traits, detects disease, tracks serial changes, and preserves interpretability.
- Conventional interpretation applies empiric rules to selected ECG features, limiting access to the signal’s broader information.
- Subtle, visually imperceptible signal changes may contain informative evidence, particularly in early disease stages.
- No automated, scalable method currently performs detailed longitudinal ECG tracking and comparison.
- Uninterpretable machine-learning models limit understanding of successes and failures in high-stakes medical use.
- The proposed framework targets quantitative cardiac estimates, disease detection, longitudinal tracking, and disease monitoring while preserving interpretable parallels to physiology.
B. Overview: Automated and interpretable ECG profiling for disease detection, tracking and discovery.
ecgAI uses patient-specific ECG profiles to characterize cardiac structure and diastolic function and to detect and track disease. The approach is designed as an automated, scalable, and interpretable analysis method.
- ecgAI uses patient-specific ECG profiles to characterize cardiac structure, diastolic function, and disease.
- The pipeline is automated, scalable, and interpretable, with tasks spanning cardiac characterization, disease detection, and disease tracking.
- The framework is intended to support analysis of ECG data while retaining parallels to cardiac physiology.
C. ECG Data.
The study used standard 12-lead ECG data from the UCSF clinical database and restricted model-development analyses to ECGs interpreted as normal sinus rhythm.
- 60% of ECG data were sampled at 500Hz and 40% at 250Hz.
- Clinical ECGs received initial GE software analysis followed by confirmation or revision by a UCSF cardiologist.
- Model-development analyses were restricted to ECGs with normal sinus rhythm interpretations.
D. Selection of studies for model development.
The study selected paired ECG and echocardiographic data, developed CNN-HMM segmentation, and converted segmented signals into interpretable 725-component patient profiles for downstream models.
- Study selection: 10,082 studies provided left ventricular mass measurements, 8,289 provided left atrial volume, and 4,205 provided mitral annulus medial e’ values paired with ECGs within 30 days.
- Study selection: The disease demonstration included pulmonary arterial hypertension, hypertrophic cardiomyopathy, cardiac amyloidosis, and mitral valve prolapse.
- ECG segmentation: CNN-based segmentation was explored as an alternative to heuristic rules that require enumerating exceptions and adding new rules.
- ECG segmentation: The neural network classified ECG segments from manually labeled one-millisecond blocks covering six waveform components.
- ECG segmentation: The HMM refined U-Net output by modeling the obligate ordering and transition probabilities of ECG segments.
- Patient-level ECG profiles: The 725-component ECG vector preserved meaningful ECG representations while reducing the feature space for interpretable machine learning and longitudinal tracking.
H. Disease detection and tracking: Training Gradient Boosted Models to Quantify Diseases.
Gradient boosted machine models used patient-level ECG profiles to estimate disease probabilities and track longitudinal changes across PAH, HCM, CA, and MVP.
- Separate GBM models output a probability for each of four diseases from an input ECG vector.The diseases were pulmonary arterial hypertension, hypertrophic cardiomyopathy, cardiac amyloid, and mitral valve prolapse.
- Patients with ECGs spanning at least two years were selected to demonstrate longitudinal disease tracking.The median disease score was calculated for each patient in each year.
- Year-specific median disease scores were plotted as a function of year to visualize changes over time.
I. Statistical Methods.
The statistical methods used TensorFlow for convolutional neural network development and scikit-image for signal manipulation, including resizing by linear interpolation.
- Convolutional neural networks were developed using the TensorFlow Python package.
- Signal manipulation was performed using scikit-image.
- Linear interpolation was used for resizing signals.
J. Validation of ecgAI Machine Learning-based ECG Segmentation.
The ecgAI pipeline combined CNN-based segmentation with an HMM and produced ECG interval measurements that agreed well with clinical reference values.
- The ecgAI pipeline was trained on 170 manually segmented ECGs and deployed on 36,186 sinus-rhythm ECGs.
- Each ECG time-step was classified into one of six segments by the ecgAI model.Figure 2 illustrates the classified segments with separate colors.
- 91, 85, 94, 88, 91, and 92 were the IoU metrics for the P wave, PR segment, QRS complex, ST segment, T wave, and TP segment, respectively.
- 0.6%, 3.0%, 5.6%, and 4.4% were the median absolute deviations for heart rate, PR, QRS, and QT intervals versus MUSE values, respectively.The intervals showed strong correlation with MUSE measurements, with ρ=0.77-0.98.
- The CNN architecture performed initial segmentation, while the HMM represented ECG states traversed in sequence.The HMM transitions could remain within a state or move to the next state.
K. ecgAI Performance to Quantify Cardiac Structure.
Patient-level ECG profiles supported estimation of cardiac structural and functional measurements, with stronger discrimination for left ventricular hypertrophy and diastolic dysfunction than left atrial enlargement.
- 16.5%, 19.1%, and 22.9% were the median absolute deviations for LVMi, medial mitral annulus e’, and LAVOLi predictions, respectively.The deviation was lowest for LVMi and greatest for LAVOLi.
- 0.87 and 0.84 were the AUROCs for left ventricular hypertrophy and diastolic dysfunction, respectively.The 95% confidence intervals were 0.86-0.89 and 0.82-0.86, respectively.
- 0.62 was the AUROC for left atrial enlargement.The 95% confidence interval was 0.60-0.64.
- QRS duration was the strongest predictor of LVMi, with a variable score of 4.0.P wave duration, QT duration, and selected QRS and ST-T segments were also among the top predictors.
- PR duration, QT duration, and P wave duration were the strongest predictors of medial e’, while QT duration and P wave duration led for LAVOLi.QRS and PR duration also ranked among the top predictors for LAVOLi.
L. ecgAI Performance for Cardiac Disease Detection.
ecgAI detected four cardiac diseases with AUROCs from 0.94 for PAH to 0.77 for MVP, while identifying disease-associated ECG features. Discrimination was strongest for PAH and HCM and weakest for MVP.
- Disease detection: AUROC was 0.94 for PAH, the strongest discrimination among the evaluated diseases.The leading predictors included QRS features in lead V1 and early P-PR features in leads V3 and aVR.
- Disease detection: AUROC was 0.91 for HCM, with ST-T, P-wave, QT, PR, and QRS features among its strongest predictors.The latter ST-T portion in lead V1 had the highest variable score.
- Disease detection: AUROC was 0.86 for CA, whose strongest predictor was blunted early-QRS voltage in lead aVR.Additional predictors included QRS duration and QRS portions from leads I and V1.
- Disease detection: AUROC was 0.77 for MVP, the weakest discrimination, consistent with its limited known impact on ECG morphology.Top predictors included PR duration, P-wave duration, QT duration, and early-QRS portions in leads V2 and V3.
M. Serial ECGs Analysis with ecgAI to Perform Within-Patient Disease Tracking.
Serial ecgAI scores tracked changing ECG morphology in PAH patients over time. In one highlighted trajectory, increasingly abnormal ECGs from 2010 to 2017 accompanied rising PAH scores, while other patients showed nonmonotonic score changes.
- Serial PAH tracking: PAH scores increased from 2010 to 2017 as ECG tracings developed prominent R and T-wave changes in lead V1 and additional QRS and P-wave abnormalities.The dashed threshold identified PAH with 80% sensitivity and 90% specificity.
- Serial PAH tracking: The GBM PAH score tracked visible morphological change in the ECG.This conclusion follows the correspondence between score trajectories and serial tracing appearances.
- Serial PAH tracking: Two other patients showed precipitous PAH-score decreases followed by subsequent increases.High-score ECGs appeared abnormal, whereas subsequent low-score tracings appeared more normal, for unclear reasons.
- Measurement comparison: Fig. 3 compares 35,466 ecgAI HMM+CNN measurements with MUSE/UCSF values using scatterplots and a y=x reference line.Heart rate is reported in beats per minute; the other three measurements use milliseconds.
Discussion
The discussion presents ecgAI as a scalable, interpretable framework for extracting clinically meaningful ECG features, estimating cardiac traits, detecting disease, and tracking longitudinal change. Its models showed strong discrimination for several diseases while retaining interpretable predictors, but application was limited to normal-sinus ECGs from one medical center.
- Framework: ecgAI extends ECG analysis beyond binary interpretation to estimate cardiac structure and function, classify disease, and identify interpretable signal features.The framework emphasizes clinically meaningful features that can justify automated outputs and support physiological discovery.
- Framework: The patient-level ECG profile uses down-sampled raw signal segments to preserve interpretability while supporting machine-learning models.Feature extraction delineates portions of the ECG with clinical meaning rather than reducing signals only to simple abstractions.
- Disease detection: Disease models achieved AUROCs of 0.94 for PAH, 0.91 for HCM, 0.86 for CA, and 0.77 for MVP using ECG inputs alone.The authors note that direct comparison with prior studies is limited because earlier work often emphasized individual feature associations rather than global discrimination.
- Longitudinal tracking: The framework supports longitudinal PAH tracking through model scores and learned continuous feature weights rather than only predefined ECG features.Serial ECG trajectories can reflect changing ECG patterns over time, including changes in QRS axis, P-wave height, and R’ amplitude.
- Limitations: Models were optimized for ECGs in normal sinus rhythm, and the data came from a single medical center.More complex rhythms would require expanded training data and additional HMM states.
- Interpretability: The approach is designed to remain transparent to physicians, patients, and researchers by linking predictions to informative ECG intervals and lead-specific segments.This interpretability is presented as important for clinical decision-making and knowledge discovery.