Clear Sky Science · en

Heart disease diagnosis and categorization from ECG signals using hybrid Fuzzy-CNN machine optimized by meta-heuristic algorithms

· Back to index

Why smarter heart monitors matter

Heart disease remains the leading killer worldwide, and tiny changes in the heart’s electrical rhythm often provide the earliest warning signs. Doctors read these electrical traces, called ECGs, to spot dangerous irregular beats, but the signals are noisy, complex, and nonstop. This paper explores a new way to teach computers to read ECGs more like expert cardiologists, with the aim of catching life-threatening rhythm problems quickly and reliably.

Figure 1. AI system watches ECG heartbeats and turns them into images to flag dangerous rhythm problems early.
Figure 1. AI system watches ECG heartbeats and turns them into images to flag dangerous rhythm problems early.

From chest stickers to digital heartbeats

Every ECG begins with simple sensors placed on the skin to pick up the heart’s electrical activity. The resulting wavy lines show how the upper and lower chambers squeeze and recover with each beat. Subtle shifts in the shape and timing of these waves can signal very different problems: some relatively harmless, others linked to stroke or sudden cardiac death. Yet ECG signals are small, easily disturbed by movement and electrical noise, and can change even in healthy people, which makes dependable automatic analysis difficult.

Why some irregular beats are more dangerous

The researchers focus on seven common patterns recommended by an international standard for heart rhythm studies. These include normal beats, extra beats that start in the upper chambers, extra beats from the lower chambers, blocks in the heart’s wiring, fusion beats that blend two signals, and beats that are hard to classify. Extra beats from the lower chambers are tightly linked to fast, chaotic rhythms that can stop the heart, while certain extra beats from the upper chambers hint at future stroke. Correctly spotting these risky beats among many normal ones is crucial if automated systems are to help doctors make timely decisions.

Turning heartbeats into images for computers to see

Instead of feeding raw squiggly lines directly into a program, the team first cleans the ECG signals to remove slow drifts and electric hum. They then use a search strategy inspired by the behavior of wild horse herds to find the most regular repeating section of each person’s heartbeat. With this tailored timing, each short stretch of ECG is mathematically wrapped into a loop and plotted as a two dimensional picture. These images preserve the key shapes of each beat while smoothing out noise and random shifts. At the same time, classic timing features such as the spacing between beats and the length of key intervals are measured, giving a second, more traditional view of the heart’s rhythm.

Figure 2. Step by step view of ECG beats transformed into 2D patterns and merged features to sort different arrhythmia types.
Figure 2. Step by step view of ECG beats transformed into 2D patterns and merged features to sort different arrhythmia types.

A blended brain for rhythm recognition

To read these enriched signals, the authors build a hybrid computer model that mixes two ideas. First, a deep image network scans the ECG pictures in several layers, learning to recognize subtle visual patterns linked to each rhythm type. Second, a fuzzy logic layer, which works with gentle "if this, then that" rules instead of hard yes or no decisions, combines what the image network has learned with the timing features. A second animal inspired search strategy, modeled on puma hunting, fine tunes all of the network weights and fuzzy rule settings together, rather than relying on standard step by step adjustment methods that can get trapped in poor solutions.

How well the system performs

The model is trained and tested on a well known public ECG collection that includes expert labeled beats from 47 people, and then checked on a separate long term dataset to see how well it generalizes. On the main database, it correctly classifies nearly all beats across the seven groups, with an overall accuracy of 99.71 percent. Especially important, its sensitivity to the most dangerous classes, the extra beats from the lower chambers and from the upper chambers, rises compared with recent rival methods. Detailed statistical checks show that the features it uses to make decisions match known medical markers such as changes in beat to beat spacing and recovery times.

What this means for patients and clinicians

In plain terms, this work shows that reshaping ECG signals into images and combining them with rule based reasoning can help computers distinguish dangerous heart rhythms from harmless ones with very high reliability. While it does not replace cardiologists, such a system could underpin smarter bedside monitors, wearable devices, or telemedicine tools that flag worrisome patterns in real time, allowing human experts to focus on the most urgent cases.

Citation: Davani, M., Taghizadeh, M., Pirbonyeh, M.A. et al. Heart disease diagnosis and categorization from ECG signals using hybrid Fuzzy-CNN machine optimized by meta-heuristic algorithms. Sci Rep 16, 16001 (2026). https://doi.org/10.1038/s41598-026-43637-y

Keywords: ECG arrhythmia, heart rhythm, deep learning, fuzzy logic, medical AI