Clear Sky Science · en
An efficient deep CNN based BiLSTM framework with RanA optimization for accurate cardiac arrhythmia detection
Why smarter heart checks matter
Heart rhythm problems, or arrhythmias, are a major cause of sudden illness and death worldwide. Today, doctors rely heavily on electrocardiograms (ECGs)—the familiar squiggly lines on a monitor—to spot danger. But reading long ECG recordings by eye is slow, tiring, and easy to get wrong, especially when dangerous events are brief or subtle. This paper describes a new artificial intelligence system that can sift through large ECG recordings and detect two important conditions—atrial fibrillation and congestive heart failure—with striking accuracy, potentially making continuous, real‑time heart monitoring far more reliable.
Different heart rhythms, different risks
Not all heart rhythms are created equal. Atrial fibrillation (AF) is an irregular, often rapid rhythm in the heart’s upper chambers that greatly increases the risk of stroke and heart failure. Congestive heart failure (CHF) is a chronic condition in which the heart cannot pump enough blood, leading to fatigue, fluid build‑up, and, if untreated, death. In contrast, normal sinus rhythm (NSR) is the steady beat produced by the heart’s natural pacemaker. The authors focus on two practical questions: can a computer reliably tell AF from NSR, and CHF from NSR, using only ECG data? Solving this would support earlier diagnosis, closer monitoring of high‑risk patients, and faster responses to hidden warning signs.

Teaching machines to read heartbeats
Modern ECG recordings can contain millions of data points per person. Manually picking out useful patterns from this sea of numbers is nearly impossible. The researchers therefore build a multi‑stage deep‑learning pipeline. First, they gather three well‑known ECG datasets from the PhysioNet repository: AF recordings, CHF recordings, and recordings from people with normal rhythms. They then chop these long signals into shorter segments so that a computer can analyze them efficiently. Next, they use a type of neural network called a Capsule Network to compress each segment into a smaller set of numbers while preserving the overall shape and structure of the heartbeat. Statistical tests show that this step separates diseased rhythms from normal ones better than standard reduction methods such as principal component analysis.
Finding the most telling signal clues
Even after compression, many features of the ECG segments are still redundant or weakly related to disease. To focus on what matters most, the team applies several powerful image‑style neural networks—EfficientNet B3, ResNet152, DenseNet201, and VGG19—as intelligent filters. These networks were originally designed to recognize objects in pictures; here, they are repurposed to rank which ECG features best distinguish AF, CHF, and normal beats. Among them, EfficientNet B3 stands out. It balances network depth and width to highlight only the most informative patterns, and it consistently produces features that are more strongly linked to disease labels and better separated between healthy and unhealthy rhythms.

Listening to rhythm over time
Because heart signals unfold as sequences, the final decision is made by a model that is good at learning from ordered data: a bidirectional long short‑term memory network, or BiLSTM. This model “listens” to each segment in both forward and backward directions, capturing subtle timing relationships that might signal an arrhythmia. To squeeze out extra performance, the authors tune the many internal settings of this model using a strategy they call Randomized Adam (RanA), which injects controlled randomness into the learning process. This helps the system avoid getting stuck in poor solutions and improves its ability to generalize to new patients. The researchers rigorously test the full setup with ten‑fold cross‑validation and a 70/30 train‑test split.
How well does it work in practice?
After optimization, the combined EfficientNet B3 + BiLSTM + RanA system achieves striking performance. It correctly distinguishes AF from normal rhythm 99.48% of the time, and CHF from normal rhythm 99.32% of the time—slightly better than or comparable to the best results reported in prior studies. Measures that are especially important for imbalanced medical data, such as the F1 score, Matthews correlation coefficient, and the area under the ROC curve, are all very close to their ideal values. At the same time, the model processes each ECG segment in only a few milliseconds and uses a relatively modest number of parameters, suggesting it could eventually run on wearable devices or bedside monitors. The authors note that extending the approach to many different arrhythmias, handling noisier signals, and reducing computational complexity further are key next steps.
What this means for patients and doctors
For a non‑expert, the core message is simple: this work shows that a carefully designed deep‑learning system can act as an extremely accurate “second pair of eyes” on ECG data. By automatically separating dangerous irregular rhythms and signs of heart failure from normal beats, and doing so in nearly real time, such tools could alert clinicians sooner, support continuous home monitoring, and reduce the chance that a silent but serious problem goes unnoticed. While further validation in broader, real‑world settings is needed, the study points toward a future where advanced algorithms quietly scan our heartbeats in the background, giving both patients and doctors earlier warnings and greater peace of mind.
Citation: Manivannan, G.S., Talawar, S.V., Vasundhara, M.G. et al. An efficient deep CNN based BiLSTM framework with RanA optimization for accurate cardiac arrhythmia detection. Sci Rep 16, 7156 (2026). https://doi.org/10.1038/s41598-026-38227-x
Keywords: cardiac arrhythmia, electrocardiogram, deep learning, atrial fibrillation, heart failure