Background:The electrocardiogram or ECG has been in use for over 100 years and remains the most widely performed diagnostic test for characterization of cardiac structure and electrical activity. Remarkably, current approaches to automated ECG interpretation originate from heuristics devised over 40 years ago. textbfObjective: 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, an attribute which remains critical to medical decisionmaking. Methods: 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 produced during the clinical workflow. We built a 725-element patient-level ECG profile using downsampled ECG 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). Results: 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, 3% for PR interval, 4% for QT interval, and 6% for QRS duration. Patient-level ECG profiles enabled quantitative estimates of left ventricular mass (MAD vs. echocardiogram of 16%) and mitral annulus e' velocity (MAD of 19%) with good discrimination in binary classification models of left ventricular hypertrophy and diastolic dysfunction [Area Under the Receiver Operating Characteristic Curve (AUROC) of 0.87 and 0.84, respectively]. Models for disease detection ranged from AUROC of 0.94 for PAH, 0.91 for HCM, 0.86 for CA, and 0.77 for MVP. Top-ranked variables for all models included known ECG characteristics along with novel predictors of these traits/diseases. Furthermore, temporal variation in model-derived disease scores coincided with visual evolution of ECG morphologies for these features. Conclusion: Modern AI methods can extend the 12-lead ECG to quantitative and diagnostic applications well beyond its current uses. Moreover, careful selection of machine learning algorithms achieves the goal of automation and accuracy without compromising the transparency that is so fundamental to clinical care and scientific discovery. electrocardiogram | machine learning | diagnosis | tracking Correspondence: