BiMa-ECGSR: reconstructing the 12-lead ECG from reduced lead sets with bidirectional state-space models

Ugo Lomoio, Pierangelo Veltri, Pietro Hiram GuzziarXiv 2026 · arXiv

This paper introduces BiMa-ECGSR, a deep-learning framework designed to bridge the gap between the limited data captured by wearables and the 12-lead standard required for clinical diagnosis. By leveraging bidirectional Mamba state-space models, the authors demonstrate that a full 12-lead electrocardiogram (ECG) can be reconstructed from as few as one or two leads with high fidelity and remarkable speed.

TL;DR

BiMa-ECGSR uses bidirectional Mamba state-space models to reconstruct 12-lead ECGs from reduced lead sets (like those from smartwatches or bedside monitors). The model significantly outperforms linear filters and produces reconstructions that are "diagnostically readable" by standard 12-lead AI classifiers, all while maintaining high computational efficiency.

What Problem Does This Paper Address?

The "gold standard" for cardiac diagnosis is the 12-lead ECG. However, modern healthcare increasingly relies on reduced lead sets: smartwatches typically record only Lead I, bedside monitors often show only Lead II, and hospital telemetry might use just three or four leads.

Most existing diagnostic software and high-performance AI models are trained exclusively on 12-lead data. This creates a compatibility gap. While previous attempts at "lead reconstruction" used linear transforms or older neural network architectures (like CNNs or LSTMs), they often struggled with accuracy on chest leads or failed to generalize across different patient populations. BiMa-ECGSR aims to provide a robust, fast, and externally validated solution to this reconstruction problem.

Methods

The core of the system is a bidirectional Mamba encoder-decoder. Mamba is a selective state-space model (SSM) known for its ability to handle long sequences with linear time complexity, making it ideal for high-frequency time-series data like ECGs (sampled at 500 Hz).

The authors developed two versions:

  1. BiMa-SR (Regression): Trained to minimize mean-squared error, effectively predicting the conditional mean of the missing leads.
  2. DiBiMa-SR (Diffusion): A denoising diffusion probabilistic model designed to sample from the distribution of plausible reconstructions.

The architecture (shown in Figure 1) features a convolutional encoder, a stack of bidirectional Mamba layers that scan the signal forward and backward, and a convolutional decoder. A "lead residual" connection ensures that the leads actually measured are re-inserted into the output, so the model only has to learn the "correction" or the missing data.

The BiMa-ECGSR architecture and experimental workflow, showing the Mamba-based backbone and the various input lead configurations tested.

Datasets

The models were trained and internally validated on the PTB-XL dataset (Germany, ~21,000 records). To ensure the model wasn't just memorizing one specific dataset, the authors performed rigorous external validation on two large, independent cohorts:

  • Georgia 12-lead database (USA, ~10,000 records).
  • Chapman-Shaoxing/Ningbo database (China, ~45,000 records).

Key Insights and Ideas

  • Mamba's Efficiency: The state-space approach allows the model to capture long-range temporal dependencies in the ECG signal far more efficiently than standard Transformers or RNNs.
  • Regression vs. Diffusion: Interestingly, the regression model (BiMa-SR) outperformed the diffusion model (DiBiMa-SR) on standard pointwise metrics like Pearson Correlation. While diffusion can generate "plausible" variations, the regression model's tendency toward the mean provides a more stable reconstruction for diagnostic purposes.
  • Diagnostic Readability: The authors didn't just look at how "pretty" the waveforms were. They tested the reconstructions using a separate 12-lead classifier trained only on real ECGs. They found that reconstructions from 3 or 4 leads were virtually indistinguishable from real 12-lead ECGs to the classifier.
  • Information Limits: The authors are careful to note that reconstruction cannot "create" information that isn't there. Instead, it uncovers the latent relationships between leads, making the existing information usable by standard 12-lead tools.

Key Results

  • Superior Accuracy: From Lead II alone, BiMa-SR achieved a pooled median Pearson Correlation Coefficient (PCC) of 0.914, compared to just 0.784 for a standard linear filter.
  • Chest Lead Fidelity: For a 4-lead input (I, II, V1, V4), the PCC on the remaining chest leads reached 0.979.
  • Clinical Utility: A 12-lead classifier achieved a macro AUROC of 0.912 on real ECGs and 0.908 on reconstructions from 4 leads. This suggests that 4-lead telemetry could be used for complex 12-lead automated diagnosis with minimal loss in accuracy.
  • High Speed: BiMa-SR processes a 10-second record in just 45.8 ms on a GPU, making it suitable for real-time monitoring applications.
Qualitative comparison showing how closely BiMa-SR reconstructions (orange) overlay real ECG traces (black) compared to linear filters (dashed grey).

Limitations and Future Work

  • Z-Score Normalization: The current evaluation uses z-scored leads, which ignores absolute voltage. This means the model wasn't tested on its ability to detect conditions relying on absolute amplitude, like certain types of hypertrophy.
  • Standard Electrode Placement: The study assumes leads are placed in standard positions. Real-world wearable data often involves non-standard or "noisy" contact, which may degrade performance.
  • Prospective Validation: While the external validation is a strong start, the authors note that prospective clinical trials and review by human cardiologists are necessary before such a tool could be used in practice.

Summary updated

Abstract

Wearables and monitors record few electrocardiogram (ECG) leads; most diagnostic tools assume 12 leads. BiMa-ECGSR reconstructs the 12-lead ECG from reduced lead sets with a bidirectional Mamba state-space encoder--decoder, as regression (BiMa-SR) or diffusion (DiBiMa-SR). Models were trained on PTB-XL for six input sets (I; II; I+II; I+II+V1; I+II+V2; I+II+V1+V4), see only the measured leads at inference, and were tested on the PTB-XL test fold (2,198 records) and two external cohorts (Georgia, 10,275 records; Chapman-Shaoxing/Ningbo, 43,559). From lead II alone, the pooled median Pearson correlation (PCC) over the 11 predicted leads was 0.914 on PTB-XL, against 0.784 for a least-squares linear filter (lead I: 0.906 against 0.789). As limb leads are exactly derivable from I and II, multi-lead inputs were compared on predicted chest leads: 0.939 against 0.849 for I+II and 0.979 against 0.962 for I+II+V1+V4. BiMa-SR exceeded the linear comparator in all 18 configuration--cohort pairs (by 0.012--0.136), a margin that shrank as chest leads were added. From lead II, regression was more accurate than diffusion (DiBiMa-SR: 0.903 one-step, 0.862 with six DDIM steps). A 12-lead classifier trained only on real ECGs reached a superclass macro AUROC of 0.912 on real PTB-XL ECGs, 0.843 on reconstructions from lead II and 0.908 from I+II+V1+V4; externally, reconstructions from three or four leads scored within 0.004 of real ECGs. BiMa-SR (2.68\,M parameters) takes 45.8 ms per 10-s record on a GPU. Reconstruction makes reduced-lead recordings usable by 12-lead tools; it cannot add information absent from the measured leads.
BibTeX
@misc{lomoio2026bima,
  author = {Ugo Lomoio and Pierangelo Veltri and Pietro Hiram Guzzi},
  title = {{BiMa-ECGSR: reconstructing the 12-lead ECG from reduced lead sets with bidirectional state-space models}},
  year = {2026},
  eprint = {2611.23345},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.23345},
}
Figure