FoundationalECGNet: Lightweight ECG Analysis Model
- FoundationalECGNet is a compact ECG model designed for robust, multitask cardiac screening under noisy and heterogeneous data conditions.
- It leverages dual-stage wavelet denoising combined with convolution, CBAM, GAT, and TST to capture local, inter-lead, and long-range temporal features.
- Its hierarchical inference and neuro-symbolic risk estimation enable precise classification of normal versus abnormal ECGs across multiple cardiac conditions.
FoundationalECGNet is a lightweight foundational model for ECG-based multitask cardiac analysis that is designed for automated cardiac screening and disease subtype identification under conditions of noise, class imbalance, and dataset heterogeneity. Its reported workflow is explicitly hierarchical: it first distinguishes Normal from Abnormal ECGs, and then classifies abnormal recordings into Arrhythmias, Conduction Disorders, Myocardial Infarction, QT Abnormalities, or Hypertrophy and Enlargement. The model combines dual-stage wavelet denoising, convolutional feature extraction, Convolutional Block Attention Module (CBAM), Graph Attention Networks (GAT), Time Series Transformers (TST), and a neuro-symbolic risk-estimation component, and is presented as a compact alternative to larger ECG foundation models (Sk. et al., 10 Sep 2025).
1. Clinical scope and problem formulation
FoundationalECGNet is motivated by the clinical role of ECG analysis in early detection of cardiovascular diseases and by the practical limitations of existing automated systems. The paper identifies three obstacles as central: real ECG recordings are noisy, datasets are heterogeneous across devices and cohorts, and pathological classes are strongly imbalanced relative to normal recordings. It also states that CNN-only or transformer-only systems often either fail to model long-range temporal structure, fail to capture inter-lead relationships, or remain too large and data-hungry for practical deployment (Sk. et al., 10 Sep 2025).
The task formulation is intentionally staged. In the first stage, the model performs screening, predicting whether an ECG is Normal or Abnormal. In the second stage, only abnormal ECGs are passed to a subtype classifier that assigns one of five diagnostic groups: Arrhythmias (AM), Conduction Disorders (CD), Myocardial Infarction (MI), QT Abnormalities (QT), or Hypertrophy and Enlargement (HE). This decomposition reflects a triage-oriented view of ECG interpretation in which missed abnormal cases are treated as especially costly.
The paper frames the model as both scalable and deployable. A plausible implication is that the two-stage design is meant to reduce the decision burden on the downstream subtype classifier while aligning the inference pipeline with screening workflows used in clinical triage and resource-limited settings.
2. Signal processing and model architecture
The architecture is organized around four functional blocks: preprocessing and dual-stage denoising, feature extraction with ExBlock + wavelets, attention-based contextual modeling with CBAM, GAT, and TST, and classification plus neuro-symbolic risk estimation (Sk. et al., 10 Sep 2025).
At preprocessing time, each ECG is resampled to 250 Hz, standardized to 1500 samples per channel, processed channel-wise, normalized with Min-Max normalization to the range , and reshaped into a 2D array suitable for model input. To address class imbalance, the paper uses ADASYN rather than random oversampling or SMOTE, arguing that it focuses on difficult minority examples and avoids generating too many overlapping synthetic points.
The denoising path is explicitly dual-stage. A Morlet wavelet stage is applied first, followed by a Daubechies wavelet (DB4) stage. The stated purpose is to suppress noise while preserving clinically relevant morphology such as QRS complexes and R-peaks. The DB4 stage is described as separating low- and high-frequency components, with low-pass content associated with baseline and P–T components and high-pass content associated with sharp QRS details. The architecture then supplements wavelet features with an Extended Block (ExBlock) built from two CBR modules composed of 1D convolution, batch normalization, and ReLU.
These three feature sources—Morlet, DB4, and ExBlock—are concatenated into a latent representation. The model then applies CBAM to emphasize important channels and salient temporal regions, GAT to model inter-lead or inter-channel relationships, and TST to capture long-range temporal dependencies through multi-head attention. The outputs of GAT, CBAM, and TST are concatenated again, temporally compressed by adaptive pooling, and passed through fully connected layers for classification.
Architecturally, FoundationalECGNet is therefore neither a pure CNN nor a pure transformer. It is a composite ECG pipeline in which wavelet preprocessing, local convolutional extraction, graph-based channel interaction, and transformer-style temporal modeling are all explicitly assigned distinct roles. This suggests that the paper treats ECG interpretation as a joint problem of denoising, multi-lead relational inference, and long-context temporal discrimination rather than as a single homogeneous sequence-modeling task.
3. Hierarchical inference and neuro-symbolic risk estimation
The model’s decision layer extends beyond neural classification. After abnormal detection, FoundationalECGNet computes disease probabilities using symbolic rules derived from ECG measurements, which the paper presents as a neuro-symbolic risk-estimation framework (Sk. et al., 10 Sep 2025).
The workflow begins with R-peak detection using a threshold defined by and a minimum separation constraint , with Hz. Disease-specific probabilities are then computed for each abnormality group. For Conduction Disorders, the text links the rule set to PR > 200 ms and QRS > 120 ms. For Myocardial Infarction, it links risk to ST > 0.1 mV and QRS > 100 ms. For QT Abnormalities, it indicates thresholds around > 460 ms or < 350 ms. For Hypertrophy and Enlargement, it links the rule to R > 2.0 mV and QRS > 110 ms. The arrhythmia rule increases risk when heart rate deviates from 75 bpm.
The final disease choice is the class with the highest probability, but the framework also imposes a priority ordering of MI > Arrhythmias > Conduction Disorders > QT Abnormalities > Hypertrophy, which the paper states reflects clinical urgency. The interpretive aim is to supplement categorical predictions with measurement-linked probabilities rather than opaque labels alone.
The paper further describes visualization-oriented outputs, including annotated 2D ECG waveforms, feature markers for P, Q, R, S, T, risk scores, confidence levels, 3D probability bars, and clinical findings such as PR interval and QRS duration. It also mentions layer-wise attribution maps and counterfactual explanations, although it does not provide a full algorithmic derivation for those visualization methods. In this respect, interpretability is treated as part of the system design rather than only as a post hoc analysis.
4. Training data, transfer protocol, and computational profile
FoundationalECGNet is trained on four public datasets with sequential transfer across datasets rather than a single monolithic pretraining corpus. The paper uses PTB-XL with 21,799 samples at 500 Hz, CinC 2017 with 8,528 samples at 300 Hz, MedalCare-XL with 16,900 samples at 500 Hz, and PTB with 549 samples at 1000 Hz. The first three datasets are used for training, while the final dataset is used for fine-tuning and testing (Sk. et al., 10 Sep 2025).
The split protocol is reported as 80/20 train/validation for the first three datasets and 80/20 train/test for the final dataset. All datasets are resampled to 250 Hz, normalized per channel, reshaped to 1500 samples, denoised with the wavelet pipeline, and balanced using ADASYN. The paper states that datasets were trained one at a time, transferring updated weights from one dataset to the next, which amounts to sequential pretraining or progressive transfer.
Optimization uses BCEWithLogitsLoss, Adam, learning rate 0.0005, weight decay 1e-4, and early stopping with patience 10. Experiments were run on a single NVIDIA RTX 4070 GPU. The model is reported to have about 7.5 million parameters, 0.469B FLOPs, and a model size of 28.62 MB.
Relative to several comparator models cited in the same paper, the reported computational footprint is notably small.
| Model | Params | Model size |
|---|---|---|
| ECG-FM | 90M | ~360 MB |
| KED | 163.7M | 1.3 GB |
| CardX | 15M | ~60 MB |
| FoundationalECGNet | 7.5M | 28.62 MB |
The paper uses this comparison to argue that the model is practical for single-GPU training and potentially suitable for edge or personal-device deployment. A plausible implication is that compactness is treated არა only as an engineering convenience but as part of the model’s foundational claim.
5. Reported performance and ablation evidence
The reported binary-screening performance is 99.48% accuracy for FoundationalECGNet, compared with 94.23% for the baseline ExBlock+CBAM, for an absolute improvement of 5.25%. The paper emphasizes the reduction of false negatives as clinically important because missed abnormal ECGs can have serious consequences (Sk. et al., 10 Sep 2025).
For abnormal subtype classification on the PTB abnormal test subset, the paper reports the following class-level F1 values relative to the ExBlock+CBAM baseline:
| Class | Baseline F1 | FoundationalECGNet F1 |
|---|---|---|
| AM | 0.912 | 0.989 |
| CD | 0.944 | 0.990 |
| MI | 0.872 | 0.927 |
| QT | 0.879 | 0.939 |
| HE | 0.935 | 0.990 |
The same section reports that the model achieves around 99% F1 for Conduction Disorders and Hypertrophy, 98.9% F1 for Arrhythmias, 92.7% F1 for Myocardial Infarction, and 93.9% F1 for QT Abnormalities. The multi-class table also gives a Macro avg of 0.995 F1 and 1.000 AUC for FoundationalECGNet, whereas the narrative discussion states that macro F1 improves from 0.913 to 0.967. The paper therefore contains a slight inconsistency between the class-level table and the prose macro scores.
The ablation study is structurally important because it links performance gains to specific modules. The full model reaches Accuracy 0.9948, Precision 0.9948, Recall 0.9948, and F1-score 0.9948. Removing TST reduces F1 to 0.9686; removing GAT reduces F1 to 0.9790; removing CBAM reduces F1 to 0.9686; removing both wavelet stages (Morlet + DB4) reduces F1 to 0.9633; and replacing ExBlock reduces F1 to 0.9423. The reported interpretation is that best performance depends on the conjunction of denoising, local convolutional extraction, channel/spatial attention, graph-based inter-lead modeling, and long-range temporal attention.
6. Position within ECG foundation-model research and stated limitations
The broader ECG foundation-model literature usually defines foundation models through large-scale pretraining and subsequent transfer. The survey literature describes ECG-FMs as models trained on large, heterogeneous ECG corpora in self-supervised or semi-supervised fashion under a pre-training + fine-tuning paradigm (Han et al., 2024). Examples include multimodal ECG-text alignment in ESI (Yu et al., 2024), large-scale supervised multi-label transfer in ECGFounder (Li et al., 2024), discrete rhythm tokenization and masked modeling in AnyECG (Wang et al., 2024), and structure-aware masked latent attention in LAMAE (Vandenhirtz et al., 27 Mar 2026). Systematic comparison work further argues that ECG foundation-model performance depends strongly on architecture and objective, with structured state space models and CPC or JEPA-style objectives often outperforming larger transformer baselines (Al-Masud et al., 12 May 2026), a conclusion reinforced by large benchmark analyses in which transfer gains are domain-specific rather than universal (Al-Masud et al., 29 Sep 2025).
Within that landscape, FoundationalECGNet occupies a distinctive position. It is called a foundational model, but its emphasis is not on large-scale self-supervised pretraining, multimodal alignment, or masked latent prediction. Instead, it emphasizes compactness, wavelet-based denoising, explicit inter-lead and temporal reasoning, and a neuro-symbolic decision layer. This suggests that its “foundational” character is operational and application-oriented: it is presented as a reusable, lightweight ECG analysis framework rather than as a foundation model in the stricter pretraining-centric sense that dominates the surrounding literature.
The paper also states several limitations. ECG heterogeneity remains challenging, long-range inter-lead dependencies may still need better modeling, and the system currently covers only five abnormality groups. It further notes that future work should explore self-supervised pretraining to reduce dependence on labels and extend diagnostic coverage. Those limitations are notable because they place the model at an intersection between deployable diagnostic architecture and the still-evolving theory of ECG foundation modeling.