15 Oct 2026 · Paper notes · 5 min read

ScaHybNet: turning heartbeats into pictures

ScaHybNet converts each heartbeat into a wavelet picture, then runs CNN, BiLSTM and Transformer branches. Test accuracy is 94.73%, but fusion beats are still hard.

Abstract

Nagar et al. (2026) transform MIT-BIH heartbeats into 224x224 RGB scalograms with a Morlet continuous wavelet transform. A residual CNN learns shape, a BiLSTM models sequence, and a Transformer encoder captures long-range context. Their outputs are combined with validation-weighted softmax fusion. On five beat classes the ensemble reaches 94.73% test accuracy, 76.51% macro precision, 82.93% macro recall and 77.40% macro F1.

Video resources

Related ECG learning videos, embedded for playback on this page.

Why I picked this

Most papers feed the raw signal to a network. This one converts it to an image first, which made me curious whether the time-frequency picture really helps.

The problem

The data is tricky in three ways:

How it works

  1. Data. ECG Heartbeat Categorization Dataset: 109,446 beats in five classes (N, S, V, F, Q), balanced by stratified balancing and inverse-frequency class weights.
  2. Scalogram. Morlet CWT at 360 Hz, scales 1 to 64, saved as 224x224 RGB images.
  3. Three branches. Residual CNN, then BiLSTM over the CNN feature sequence, then a Transformer encoder with multi-head self-attention.
  4. Fusion. Validation-weighted softmax ensemble. Five-fold cross-validation, batch size 2, 150 epochs, Adam.

Results

ClassPrecisionRecallF1
N (normal)97.2197.0097.12
S (supraventricular)68.5658.4563.12
V (ventricular)88.4883.8486.09
F (fusion)32.2182.7246.37
Q (unknown)96.0792.6694.33
Macro average76.5182.9377.40

Per-class test metrics in %, from Table 8. Swapping CWT for an STFT spectrogram drops accuracy to 91.64% and macro F1 to 73.92%.

My reading notes

Accuracy flatters it

94.73% test accuracy sounds great, but fusion-beat precision is only 32.21% and macro F1 is 77.40%.

Three different accuracies

Train 99.81%, five-fold CV 90.42% (+/- 1.26), test 94.73%. The gap between training and the rest is large.

A contradiction

The limitations say no outside datasets were tested, yet the paper also reports a PTB run (89.83% test accuracy, normal vs abnormal). It looks trained separately, so it is not true transfer.

No patient IDs

The beat-level data has no subject identifiers, so strict patient-wise splits cannot be guaranteed. That is a big caveat.

Biggest lesson: read macro metrics and per-class tables before trusting a headline accuracy.

What's next

The authors suggest adaptive CWT scales, adding PPG, and SHAP explanations. I would add patient-wise evaluation on a second, independent dataset.

Paper: Nagar, Verma, Singh and Shashvat, Scientific Reports 16:25403 (2026).

Why a scalogram?

A continuous wavelet transform maps a one-dimensional ECG into a time–scale representation. Unlike a single global frequency summary, it can make transient events visible at different scales. A CNN can learn local image patterns; a bidirectional LSTM adds sequence context; a Transformer adds attention-based relationships across the representation.

Reported results, read carefully

The 2026 Scientific Reports paper reports 94.73% test accuracy, 76.51% precision, 82.93% recall and 77.40% F1 for its five-category ECG heartbeat task. The gap between accuracy and F1 is important: strong overall accuracy can coexist with weaker performance on underrepresented classes. The article also reports mean five-fold cross-validation accuracy of 90.42% ± 1.26%.

Research limitations to consider

Primary sources

💬 Comments

Share a thought. Your name and comment will be public. Please be kind and keep personal details private.

Loading comments…

Say hello ✉

Questions, feedback or just a kind word? Email contact@ranjeetpandey.xyz or send a message below.

Email directly
↑ Back to top