Skip to content
AI.info

Research

Reconstructing 12-Lead ECG from 3-Lead ECG using Variational Autoencoder to Improve Cardiac Disease Detection of Wearable ECG Devices

Overview Research area: Machine learning for biomedical signals — generative reconstruction of electrocardiograms, combined with downstream clinical classification. Technical level: Advanced. The pape

arXiv
2510.11442
Published
2025-10-13
Authors
Xinyan Guan, Yongfan Lai, Jiarui Jin, Jun Li, Haoyu Wang, Qinghao Zhao, Deyun Zhang, Shijia Geng, Shenda Hong

AI summary

Overview

Research area: Machine learning for biomedical signals — generative reconstruction of electrocardiograms, combined with downstream clinical classification.

Technical level: Advanced. The paper assumes familiarity with variational autoencoders, the ELBO objective, reparameterization, Fréchet Inception Distance, and multi-label AUROC evaluation.

Scope: The paper proposes and evaluates a VAE ("WearECG") that reconstructs a full 12-lead ECG from three input leads (II, V1, V5), validating it with signal-level metrics, expert cardiologist review, and downstream disease classification on the MIMIC dataset with additional evaluation on PTB-XL.

What This Paper Is About

The 12-lead ECG is the clinical gold standard for diagnosing heart conditions such as myocardial infarction, but it requires bulky equipment and cannot be worn continuously. Wearable devices typically record only a few leads, so pathologies localized in unmeasured regions of the heart can be missed. The authors build a generative model that takes just three leads — II, V1, and V5 — and reconstructs the missing nine leads, aiming to give wearable ECG devices diagnostic capability closer to a full 12-lead recording.

Key Contributions

  1. A VAE-based reconstruction model for 3-lead to 12-lead ECG. WearECG is trained on leads II, V1, and V5, chosen because their spatial positions form an orthogonal triad covering the inferior, right ventricular/septal, and lateral left ventricular regions. The architecture adds multi-scale residual blocks, attention-enhanced bottlenecks, group normalization, and a KL-regularized structured latent distribution to a standard VAE.

  2. Signal-level fidelity measured with MSE, MAE, and FID. The main experiment reports an overall MSE of 0.00100, MAE of 0.01783, and FID of 11.34 in Table 1, while the abstract and contributions list state an MAE of 0.01782 and an FID of 12.64 — the paper reports these differing values in different places.

  3. Downstream diagnostic validation with a frozen foundation model. ECGFounder, pretrained on over 10 million clinical ECG records, was frozen and paired with a lightweight classification head trained on generated signals for a multi-label task covering approximately 40 cardiovascular conditions, including 6 different myocardial infarction locations.

  4. Expert cardiologist assessment. A blinded Turing test with three board-certified cardiologists and a model-assisted MI recognition evaluation, including a confusion matrix and case studies of infarct localization.

Main Findings

  • Reconstruction quality favors leads II, V1, V5. Main experiment overall metrics: MSE 0.00100, MAE 0.01783, FID 11.34 (Table 1). Per-lead MSE in this setup ranged from 0.00061 (aVR) to 0.00140 (V6), and per-lead MAE from 0.01425 (aVR) to 0.02051 (V2).

  • Comparative lead configurations performed slightly worse. Input leads I, II, V3 gave overall MSE 0.00113, MAE 0.01856, FID 11.58. Single-lead I gave overall MSE 0.00131, MAE 0.01939, FID 12.52. The running text also cites overall scores of "0.00112/0.01863" for the single-lead setup, which does not match Table 1's 0.00131/0.01939.

  • Downstream classification on MIMIC (Table 2). WearECG-generated signals achieved a macro-AUC of 0.8333, compared with 0.8465 for original 12-lead, 0.7837 for 3-lead only, and 0.7545 for 1-lead only. Examples: sinus bradycardia AUROC 0.9882, atrial fibrillation 0.9751, premature ventricular complexes 0.9551, acute MI/STEMI 0.8427.

  • Large gains over 1-lead input on axis-related and infarct labels. Left axis deviation: 0.8609 for WearECG versus 0.2827 for 1-lead only. LAFB: 0.9065 versus 0.5420. Acute MI/STEMI: 0.8427 versus 0.6870. In a few conditions the 3-lead-only or 1-lead-only setups scored higher than WearECG (for example LAXIS DEV 0.9269 for 3-lead only, RAE 0.8165 for 1-lead only).

  • Regional MI localization on MIMIC (Table 3). WearECG reached a macro-AUC of 0.8764 across six infarct regions (anterior, anterolateral, anteroseptal, inferior, lateral, septal), versus 0.8817 for original 12-lead, 0.8233 for 3-lead only, and 0.7759 for 1-lead only. Best region: anteroseptal at 0.9378; weakest: inferior at 0.8067.

  • Cross-dataset evaluation on PTB-XL (Tables 4 and 5). WearECG macro-AUC was 0.8470 versus 0.8931 for original 12-lead and 0.8328 for 3-lead only. Regional MI macro-AUC was 0.7885 versus 0.8758 for original 12-lead and 0.6979 for 3-lead only. Some individual conditions favored WearECG over the original 12-lead, such as AFIB (0.9883 versus 0.9770) and aflutters (0.9589 versus 0.9068), while ACUTE MI/STEMI fell to 0.6473 versus 0.8734.

  • Cardiologists could not reliably distinguish generated from real ECGs. In a blinded Turing test with 50 balanced samples, the three experts scored 52%, 44%, and 44% accuracy — close to the 50% random-guessing level.

  • Model-assisted MI recognition. Across 55 samples, the evaluation reported 26 true positives, 13 true negatives, 16 false positives, and 0 false negatives, corresponding to accuracy 70.9%, sensitivity 100%, specificity 44.8%, precision 61.9%, and F1-score 76.5%.

  • Case-study localization matched physicians. In the reported representative cases, the model predicted anteroseptal and inferior, aligning with the three cardiologists' assessments (septal/anteroseptal and inferior/inferior-septal).

Methodology in Plain English

The authors frame reconstruction as a generative task. Starting from a 12-lead recording of length T (for example T = 1000, corresponding to 2 seconds at 500 Hz), they mask out nine leads and keep only II, V1, and V5, then train the model to reproduce the full 12-lead signal.

The model is a modified variational autoencoder. An encoder built from 1D convolutional layers expands the 12 input channels to 128, then applies residual blocks and downsampling while increasing channel depth to 512, producing a compressed representation. Two separate convolutional layers output the mean and log-variance of the latent distribution, and a latent vector is drawn using the reparameterization trick. The latent dimension is small — d = 4. The decoder mirrors this process, using residual blocks with multi-head self-attention to model long-range temporal dependencies, upsampling back to the original length and reducing channels back to 12.

Training optimizes the evidence lower bound: a mean squared error reconstruction term plus a KL divergence term between the approximate posterior and a standard normal prior, with an optional perceptual loss based on a pretrained ECG encoder to preserve clinically meaningful features.

Data came from the MIMIC-IV-ECG matched subset: approximately 800,000 ten-second 12-lead diagnostic recordings from approximately 160,000 unique patients at Beth Israel Deaconess Medical Center, collected between 2008 and 2019, sampled at 500 Hz and stored in WFDB format. Preprocessing reordered leads to a standardized layout, resampled signals to 500 Hz using Fourier-based interpolation, replaced missing values by averaging neighboring points, optionally applied per-lead Z-score normalization, and split train and test sets by patient identifier to avoid leakage.

For diagnostic evaluation, the authors froze the ECGFounder encoder (pretrained on over 10 million clinical ECG records) and trained only a lightweight classification head on generated signals for multi-label prediction. They also compared against 3-lead-only and 1-lead-only baselines, and ran the blinded cardiologist Turing test plus a clinical case review of infarct localization.

Why This Matters

Reconstruction from fewer leads could let cheap, wearable hardware carry much of the diagnostic information of a hospital-grade 12-lead ECG. The paper's comparison against 1-lead and 3-lead baselines quantifies that gap: on MIMIC, macro-AUC rose from 0.7545 (1-lead) and 0.7837 (3-lead) to 0.8333 with reconstruction. The blinded Turing test result and the 100% sensitivity in the model-assisted MI review point to clinical plausibility, not just numerical similarity.

Real-world applications:

  • Continuous ambulatory monitoring with patch-type, smartwatch, or armband devices that capture only a few leads.
  • Pre-hospital and chest-pain-center triage, where a full ECG setup may be unavailable or impractical.
  • Remote and low-resource screening, including community diagnostic services in underserved regions.
  • Data augmentation and model pretraining in privacy-sensitive settings where real 12-lead ECG data are scarce or hard to share.

Industry relevance: Wearable and remote-monitoring manufacturers could use this approach to upgrade device diagnostic scope without new sensors; the fact that the pipeline works with a frozen pretrained backbone (ECGFounder) makes it modular and easier to slot into existing AI-ECG product stacks.

Future Directions

  • External validation across populations and devices. The authors state that MIMIC reflects a specific patient population and device setting, so generalization to different demographics, ethnic groups, device types, and noise conditions remains unverified.
  • Multimodal integration. The paper notes the framework uses only raw waveforms and does not exploit cardiologist text reports or structured clinical notes, which could improve fidelity and interpretability.
  • Broader downstream condition coverage. The authors plan to extend evaluation beyond myocardial infarction to a wider range of arrhythmias and conduction abnormalities.
  • Physiological priors and real-time deployment. They propose incorporating heart vector models or lead field theory to improve biological plausibility, and eventually adapting the framework for real-time use on portable and wearable devices.

Target Audience

Researchers and engineers working on generative models for physiological signals, wearable ECG and remote-monitoring product teams, and clinical AI groups interested in downstream validation using pretrained ECG foundation models. Cardiologists and clinical informaticists evaluating whether reconstructed signals are trustworthy for triage or screening will find the Turing test, confusion matrix, and case studies most directly relevant. Readers without a background in variational inference or generative modeling will need supporting material to follow the methods section.

Authors’ abstract

Twelve-lead electrocardiograms (ECGs) are the clinical gold standard for cardiac diagnosis, providing comprehensive spatial coverage of the heart necessary to detect conditions such as myocardial infarction (MI). However, their lack of portability limits continuous and large-scale use. Three-lead ECG systems are widely used in wearable devices due to their simplicity and mobility, but they often fail to capture pathologies in unmeasured regions. To address this, we propose WearECG, a Variational Autoencoder (VAE) method that reconstructs twelve-lead ECGs from three leads: II, V1, and V5. Our model includes architectural improvements to better capture temporal and spatial dependencies in ECG signals. We evaluate generation quality using MSE, MAE, and Frechet Inception Distance (FID), and assess clinical validity via a Turing test with expert cardiologists. To further validate diagnostic utility, we fine-tune ECGFounder, a large-scale pretrained ECG model, on a multi-label classification task involving over 40 cardiac conditions, including six different myocardial infarction locations, using both real and generated signals. Experiments on the MIMIC dataset show that our method produces physiologically realistic and diagnostically informative signals, with robust performance in downstream tasks. This work demonstrates the potential of generative modeling for ECG reconstruction and its implications for scalable, low-cost cardiac screening.

Read the original paper