Fusing CNN, LSTM and Transformer features to spot bad heartbeats
I read a 2024 paper that glues together features from three deep models and lets three simple classifiers vote. It hits 99.56% accuracy on MIT-BIH, but only for normal vs abnormal beats.
Abstract
Din et al. (2024) argue that no single network sees everything in an ECG: CNNs catch local shape, LSTMs keep order but forget the far past, Transformers look at the whole beat sequence. They train all three, take the last 30-unit layer of each, concatenate them into one fused vector, and feed it to SVM, logistic regression and random forest with majority voting. On MIT-BIH (normal vs abnormal) the fused model reaches 99.82% precision, 98.87% recall and 99.56% accuracy.
Video resources
Related ECG learning videos, embedded for playback on this page.
Why I picked this
An ECG is a time series, so I wanted to know how people combine models that each see time differently. This paper gives a clean answer: do not pick one, merge their features.
The problem
Earlier ECG work had three gaps:
- Handcrafted features do not generalize well across different ECGs.
- A CNN alone is good at local shape but weak on time.
- CNN + LSTM adds time, yet LSTMs can lose very long-range patterns.
How it works
- Data. MIT-BIH: 48 half-hour recordings from 47 subjects. Binary task: 75,052 normal beats vs 34,164 abnormal beats. Class weights handle the imbalance.
- Three feature extractors. A CNN (two conv layers, 16 filters), a CNN-LSTM (LSTM with 120 units) and a Transformer (6 encoder layers, 2 heads). Each ends in a 30-unit dense layer.
- Fuse. Concatenate the three 30-unit outputs into one feature vector.
- Vote. SVM (RBF kernel), logistic regression and random forest (100 trees) take that vector and decide by majority vote.
Results
| Model | Precision | Recall | F-score | Accuracy |
|---|---|---|---|---|
| CNN | 96.26 | 96.00 | 96.13 | 96.68 |
| CNN-LSTM | 90.54 | 86.71 | 88.28 | 90.35 |
| Transformer | 97.05 | 96.20 | 96.61 | 97.10 |
| Logistic regression, raw signal | 87.88 | 78.96 | 82.31 | 89.64 |
| Logistic regression, fused features | 99.34 | 98.26 | 98.80 | 99.24 |
| Fusion + majority vote (proposed) | 99.82 | 98.87 | 99.34 | 99.56 |
All numbers in %, from the paper's Tables 3 and 4.
My reading notes
Features beat classifiers
The same logistic regression scores 89.64% on the raw signal and 99.24% on the fused features. The deep features did most of the work, voting added the last bit.
A typo to watch
The conclusion says 95.56% accuracy, but every table says 99.56%. I treat the tables as correct.
The comparison is not apples to apples
The paper compares with eight earlier studies. The best of them reports 99.34% accuracy, so the margin is 0.22 points, and their beat counts differ from this paper's.
Biggest lesson: good features matter more than fancy classifiers.
What's next
The authors list their own limits: it needs GPUs, it ignores age and sex, it has only two classes, and it uses one dataset. I want to see it on a bigger benchmark.
Paper: Din, Qaraqe, Mourad, Qaraqe and Serpedin, Artificial Intelligence in Medicine 150 (2024) 102818.
Research interpretation
The central idea is representation complementarity: convolutional filters learn local waveform morphology, recurrent layers model sequential context, and self-attention can connect distant positions. Concatenation makes these learned representations available to conventional classifiers, while majority voting can reduce dependence on one decision boundary.
Data and evaluation details
The authors evaluate on the MIT-BIH Arrhythmia Database. The reported 99.56% accuracy is the paper's result for its stated binary normal/abnormal setup; it should not be read as 99.56% accuracy for every arrhythmia type, every patient, or clinical deployment. Accuracy can look especially high when class prevalence is uneven, so precision, recall, F1, confusion matrices and patient-independent validation matter.
What to scrutinize
- Patient leakage: confirm that beats from the same person do not cross train and test splits.
- Task definition: binary normal/abnormal classification is easier than five-class or multi-label diagnosis.
- External validation: a benchmark dataset cannot establish performance on modern devices or diverse populations.
- Clinical workflow: false negatives, calibration, explainability and clinician review need evaluation.
Reproducibility and further reading
- Din et al. (2024), paper record and abstract
- MIT-BIH Arrhythmia Database (PhysioNet)
- Journal article DOI
Takeaway: the fusion design is promising, but the split protocol and the difference between benchmark classification and clinical diagnosis are as important as the headline score.
💬 Comments
Share a thought. Your name and comment will be public. Please be kind and keep personal details private.
Say hello ✉
Questions, feedback or just a kind word? Email contact@ranjeetpandey.xyz or send a message below.
Loading comments…