Abstract
Cardiovascular diseases are a cause of death making it crucial to accurately diagnose them. Electrocardiography plays a role in detecting heart issues such as heart attacks, bundle branch blocks and irregular heart rhythms. Manual analysis of ECGs is prone to mistakes and time consuming, underscoring the importance of automated methods. This study uses AI models like AlexNet and a dual branch model for categorizing ECG signals from the PTB Diagnostic ECG Database. AlexNet achieved a validation accuracy of 98.64% and a test set accuracy of 99% while the dual branch fusion network model achieved a test set accuracy of 99%. Data preprocessing involved standardizing, balancing and reshaping ECG signals. These models exhibited precision, sensitivity and specificity. In comparison to state of the arts’ models such as Hybrid AlexNet SVM and DCNN LSTM our proposed models displayed performance. The high accuracy rates of 99% underscore their potential for ECG classification. These results validate the advantages of incorporating learning models into setups for automated ECG analysis providing adaptable solutions for various healthcare settings including rural areas.
Subject terms: Arrhythmias, Radiography, Image processing, Cardiovascular biology
Introduction
Cardiovascular diseases, known as CVDs, are the reason, behind fatalities globally accounting for 17.9 million deaths in 2019 representing 32% of all deaths1. Among these fatalities 85% were attributed to heart attacks and strokes. Many of these deaths occur in countries with middle incomes that often lack healthcare services for early detection and treatment. In the year 2019 out of the 17 million deaths (occurring before the age of 70) due to noncommunicable diseases 38% were a result of CVDs2. These diseases encompass a variety of conditions that affect the heart and blood vessels such as heart disease, cerebrovascular disease, peripheral arterial disease, rheumatic heart disease, congenital heart disease, deep vein thrombosis and pulmonary embolism. Coronary artery disease (CAD) is a condition caused by the accumulation of cholesterol deposits (plaques) in the arteries leading to atherosclerosis which hinders blood flow and can result in heart attacks or strokes causing symptoms like chest pain (angina) shortness of breath; neck or jaw pain; throat discomfort; upper abdominal pains or backaches. When a heart attack happens it’s because a blood clot blocks the flow of blood to a part of the heart and can lead to muscle damage if not treated. Strokes, whether ischemic or hemorrhagic, cause brain hemorrhage by interrupting blood supply. Heart failure occurs when the heart struggles to pump blood resulting in symptoms, like breathlessness and exhaustion. Arrhythmias are heartbeats that can affect how well the heart pumps blood while issues with heart valves can disrupt blood flow and may require medical or surgical treatment. Unhealthy diet, lack of activity, smoking, excessive alcohol consumption and air pollution are factors that increase the risk of cardiovascular diseases. By making lifestyle changes and implementing health measures to address these factors can be significantly reduced. Effective management also involves using medications to manage conditions such as blood pressure, diabetes and high cholesterol levels; regular health checkups are crucial for detection too. The World Health Organizations Global Action Plan aims to reduce deaths from diseases by 25% by 2025 through substantial investments, in healthcare systems worldwide particularly in low- and middle-income nations.
Researchers are increasingly using deep learning and artificial intelligence (AI) to identify CVDs with high accuracy3–12. AI algorithms, particularly deep learning models like convolutional neural networks (CNNs), are applied to medical imaging and ECG data to detect anomalies indicative of conditions such as coronary artery disease, arrhythmias, and heart failure. These models are trained on large datasets, enabling them to recognize patterns and features that might be imperceptible to human clinicians. For instance, AI can analyze ECG signals to identify irregular heart rhythms or detect subtle changes in heart structure from imaging data that suggest atherosclerosis or valve disorders. Additionally, AI-based tools can predict the risk of future cardiovascular events by integrating various clinical parameters, hence, enhancing early diagnosis and personalized treatment plans. This technology not only improves diagnostic accuracy but also facilitates timely intervention, potentially reducing the incidence and severity of CVDs. However, manually analyzing ECGs can be prone to errors and time consuming. This challenge becomes more evident in areas with access to healthcare professionals. In existing, the high volume of patients and limited expert resources often result in delays and potential inaccuracies in ECG interpretations. These obstacles underscore the importance of utilizing AI techniques to analyze ECG findings. The advancements, in AI, such as DL a subset of AI have significantly transformed the healthcare industry. These models excel at identifying patterns in data sets for tasks like interpreting images. In the realm of imaging, CNNs are extensively utilized to spot irregularities in types of images like X rays CT scans, MRI scans and mammograms. They exhibit accuracy in detecting conditions such as tumors, fractures and other ailments that often outperform diagnosticians. The impact of DL is further enriched by methods like transfer learning, multi modal learning and attention mechanisms. These techniques aid in creating tools for applications. Integrating DL approaches into healthcare systems do not enhance precision. Also boosts workflow efficiency and improves access to quality healthcare services. Automated analysis helps minimize errors and expedites processes while extending services to remote regions through telemedicine facilities. Additionally, hybrid healthcare models show potential for offering solutions by amalgamating AI methods. Their capability to manage types of data enhances performance and delivers scalable and personalized solutions that set them apart from others. Combining CNNs with Long Short-Term Memory networks (LSTMs), in hybrid models elevates accuracy and precision levels. CNNs are skilled, at extracting features from data such as X rays and CT scans while LSTMs excel at capturing time patterns in data like ECG signals. This combination allows the model to effectively identify patterns leading to capabilities. For instance, in ECG analysis a CNN can spot trends in the waveform while an LSTM can examine the sequence to provide a diagnosis of conditions. Healthcare data comes in formats, including images, patient records and longitudinal information. Hybrid models can seamlessly blend these types of data together. By combining CNNs for image analysis with transformer models, for text interpretation a model can efficiently process both imaging data and notes concurrently. This holistic approach ensures that all relevant details are considered ultimately enhancing decision making processes. For example, in the field of oncology combining radiology images, with a patient’s history and genetic information can enhance the accuracy of cancer diagnoses. AlexNet, a learning model known for its ability to classify images can also be effectively used for analyzing ECG data. This model is skilled, at identifying features in ECG waveforms through its layers recognizing patterns that indicate different heart conditions. With its structure AlexNet can categorize ECG signals into diagnostic groups like heart attacks, irregular heartbeats and other cardiac issues. By utilizing transfer learning existing AlexNet models trained on datasets can be adjusted with ECG information to improve performance with limited labeled data. Moreover, AlexNet efficient design enables processing of ECG signals making it suitable for time diagnostic tools. Employing visualization methods on AlexNet filters helps us understand which aspects of the ECG signal influence the models’ decisions the most enhancing interpretability.
This study seeks to create a model that merges the capabilities of dual branch model, with the feature extraction strengths of AlexNet. The study will concentrate on three categories: heart attacks (MI) blockages, in bundle branches and irregular heart rhythms. By automating the assessment of ECG signals this research aims to offer an adaptable and effective method for interpreting ECG results especially helping regions with restricted access, to specialized medical attention.
Literature review
A plethora of papers suggested that CNN, RNN, LSTM & BiLSTM, transformers, and hybrid models have been applied for ECG classification. DL method-based ECG arrhythmia classification is vital, because of its layered architecture and tasks associated with each layer enhance performance. A state-of-the-art deep learning system that highlighted precision and widespread approval surfaced recently for sorting Normal Sinus Rhythm (NSR) Abnormal Arrhythmia (ARR) and Congestive Heart Failure (CHF) ECG signals. This groundbreaking system was constructed based on a Hybrid AlexNet SVM (Support Vector Machine). Out of a total of 192 ECG signals there were 96 Arrhythmia, 30 CHF and 36 NSR signals accessible, for examination. To demonstrate the classification capabilities of the learning systems the ARR, CHF and NSR signals were initially categorized using SVM and KNN algorithms achieving accuracies of 68.75% and 65.63%, respectively. Afterwards these signals underwent analysis with LSTM with an accuracy rate of 90.67%13. The researchers introduced a system, for diagnosing Congestive Heart Failure (CHF) by analyzing ECG signals, based on a combination of Deep CNN and LSTM Architecture (DCNN LSTM). They utilized CNN to extract features and employed LSTM to detect CHF using these features. The DCNN LSTM method proposed by the researchers required preprocessing of ECG signals. Did not rely on manual feature engineering or classification processes during diagnosis. Through experimentation, with real time ECG signal datasets the authors achieved results; an accuracy rate of 99.52% sensitivity of 99.31% specificity of 99.28% F Score of 98.94% and AUC of 99.9%14. The researchers have put forward an approach to automatically detect and categorize ECG signals. They created a heart rhythm network by combining a 24-layer Deep Convolutional Neural Network (DCNN) with Bidirectional Long Short-Term Memory (BiLSTM) to extract time sensitive ECG features. By using convolution kernels of sizes. 32, 64 and 128 they were able to capture ECG characteristics and filter out noise from the signals using wavelet transform and median filtering techniques. Moreover, they introduced a loss function to manage fluctuations, in training loss incorporating the tan function, for model optimization through convergence mapping15. Training learning models can be quite challenging, due to the lack of labeled data especially when dealing with EEG signals which’re computationally expensive. To tackle this issue researchers introduced a deep transfer CNN framework based on VGG 16 for classifying EEG signals. This approach involves leveraging a trained VGG 16 model from ImageNet and transferring its parameters to a target CNN model. Subsequently the model is fine-tuned using a target MI dataset comprising time frequency spectrum images. When put to the test on the BCI competition IV dataset 2b this framework demonstrated accuracy and efficiency compared to methods such, as SVM, ANN and standard CNNs16. The researchers created a Convolutional Neural Network (CNN) structure by incorporating the Grasshopper Optimization Algorithm (GOA) to identify heart conditions based on ECG readings. They dealt with interference and unnecessary information by utilizing the Discrete Wavelet Transform (DWT) for noise elimination and segmentation along, with GOA, for identifying R peaks features. By leveraging the Standard MIT BIH arrhythmia database their method sought to enhance the precision of disease classification. Their model showed performance compared to the methods, across 16 heart condition categories achieving an average accuracy of 99.58%, in classification. It accurately identified 86,005 heartbeats with 108 beats misclassified, leading to an error rate of 0.42%17. The researchers presented a method, for diagnosing ECG using a mix of Convolutional Neural Network (CNN) and Constant Q Non-Stationary Gabor Transform (CQ NSGT). The CQ NSGT transforms 1 D ECG signals, into 2-time frequency visuals, which are then inputted into the trained AlexNet CNN model. The results of the model demonstrate that the suggested method outperforms current techniques with an accuracy of 98.82%, sensitivity of 98.87% specificity of 99.21% and precision of 99.20%18. The researchers suggested a deep learning system that utilizes a neural network (CNN) to detect myocardial infarction (MI) from conventional 12 lead ECG readings. Their trained CNN demonstrated an accuracy and sensitivity exceeding 99.00% for diagnosing MI across all ECG leads19. The researchers utilized techniques involving EEG signals. Transfer learning to train CNNs across domains for predicting seizures and classifying sleep stages. The seizure detection model, which identified pre seizure and post seizure periods achieved accuracy for seven, out of nine patients with 40 s of training. Additionally, the transfer learning model using EEG and ECG data for sleep staging increased accuracy by 2.5%20. The researchers proposed a learning model based on CNN to identify emotions by analyzing respiration (RSP) and heart rate variability (HRV) data, from 53 participants who were experiencing six fundamental emotions. Through incorporating signal parameters and pinpointing factors that impact accuracy they successfully attained a level of accuracy, in detecting emotions21. DL techniques, including those used in speech and image recognition have seen adoption. However, creating a learning model, for accurately classifying EEG signals remains a challenge due to the unique characteristics of EEG signals. These signals exhibit variations between subjects and even within the same subject over time. They are also prone to non-randomness and low signal clarity. While SincNet has proven effective, for speaker recognition it faces limitations when applied to EEG signal classification. To address this issue, we have. Introduced SincNet R, a modified version of SincNet tailored for EEG signal classification. SincNet R features three layers and three neural network (DNN) layers22. Researchers have developed a new system that improves ECG diagnosis accuracy by combining advanced deep learning with ECG and HRV metrics. The system converts an ECG signal into a 2D image using the constant Q non-stationary Gabor transform and processes it with AlexNet. Key features are selected using the pairwise feature proximity approach and merged with ECG and HRV metrics for enhanced diagnostic precision23.
Table 1, shows the summarized literature demonstrates the efficacy of these models in identifying complex cardiac conditions, including myocardial infarction, bundle branch block, and dysrhythmia. These approaches address the inherent challenges in manual ECG analysis, such as error-proneness and time consumption, by leveraging AI’s capability to analyze vast datasets accurately and swiftly. The use of transfer learning, optimization algorithms, and hybrid models has further improved diagnostic accuracy, demonstrating the potential of these techniques in real-world healthcare applications.
Table 1.
Summary of Literature Review on various deep learning models Applied for ECG classification.
| Methods or Model | Description | Reference |
|---|---|---|
| Hybrid AlexNet-SVM System | State-of-the-art system for classifying NSR, ARR, and CHF ECG signals. It achieved 90.67% accuracy using LSTM | 13 |
| DCNN-LSTM System | Used for diagnosing CHF with ECG signals. Achieved 99.52% accuracy, 99.31% sensitivity, 99.28% specificity, 98.94% F-Score, and 99.9% AUC | 14 |
| DCNN-BiLSTM System | Combined 24-layer DCNN with BiLSTM to extract time-sensitive ECG features. Improved model optimization with tan function and managed training loss fluctuations. BiLSTM 89.3 | 15 |
| Deep Transfer CNN Framework | Based on VGG 16 for classifying EEG signals. Demonstrated better accuracy and efficiency than SVM, ANN, and standard CNNs on BCI competition IV dataset 2b | 16 |
| CNN with GOA | Utilized GOA and DWT for noise elimination and segmentation, achieving 99.58% accuracy on the MIT-BIH arrhythmia database | 17 |
| CNN-CQ NSGT Model | Transformed 1D ECG signals into 2D time-frequency visuals and inputted into AlexNet. Achieved 98.82% accuracy, 98.87% sensitivity, 99.21% specificity, and 99.20% precision | 18 |
| CNN for MI Detection | Used CNN to detect myocardial infarction from 12-lead ECG readings, achieving over 99.00% accuracy and sensitivity. | 19 |
| Transfer Learning with CNNs | Used for predicting seizures and classifying sleep stages. Achieved high accuracy for seizure detection and improved sleep stage classification accuracy by 2.5%. EEG accuracy is 92.67 (± 0.45%) | 20 |
| CNN for Emotion Detection | Analyzed respiration and HRV data to identify emotions, achieving high accuracy in detecting emotions from 53 participants. CNN Model 4 accuracy 94.02% | 21 |
| SincNet R for EEG Signal Classification | Modified SincNet tailored for EEG signals, addressing non-randomness and low signal clarity. SincNet-R accuracy 95.22% | 22 |
| ECG-HRV Deep Learning System | Combined deep learning with ECG and HRV metrics for enhanced diagnostic precision, using constant Q non-stationary Gabor transform and AlexNet. Achieved improved accuracy in ECG diagnosis | 23 |
We chose13–23, these strategies to compare because they were recognized as leading approaches, in classifying ECG signals and were acknowledged for their capacity to accurately detect patterns in the data set. The DCNN LSTM excelled at detecting relationships whereas the CNN-CQ NSGT method improved feature extraction by examining time frequency details. These techniques were used as standards, for assessing the performance of our model.
Based on the literature, most of the research listed here is focused on classifying ECG and measuring the system’s performance. The authors also compared their respective work with state-of-the-art methods. Furthermore, they have also applied various advanced models for the ECG classification to find performance models. Still, none of these methods were applied to find diseases within the ECG images. Various researchers have utilized the MITDB and PTB/PTBXL datasets, in their studies, on ECG classification through a range of deep learning methods as indicated by research. It is also reported that hybrid DL and AlexNet have been put to work to achieve the best performance. However, most of the research carried out on ECG classification on intra-patient diagnosis.
Method and material
The Fig. 1 illustrates a process, for analyzing ECG data that is divided into three phases; Preprocessing the data first ensures uniformity across all datasets by standardizing it prior to any analysis work being done, then follows the step of trimming to eliminate unnecessary sections and keep vital parts only, lastly comes class balancing to address any discrepancies in categories and mitigate potential biases in the model. The data is divided into training sets to tune the models. Ensure they meet the required input criteria before moving on to validation and testing segments. This workflow incorporates two types of models: AlexNet and a dual branch fusion network. AlexNet originally a convolutional neural network (CNN) tailored for image classification tasks has been adapted here for ECG signal analysis purposes. The dual branch fusion network integrates CNNs and Long Short-Term Memory networks (LSTMs) to capture both temporal characteristics of ECG data enhancing the ability to identify patterns. Model performance evaluation involves utilizing metrics. Training and validation accuracy along with loss are monitored to assess model learning progress; confusion matrices visually represent positives/negatives and false positives/negatives performance metrics; Receiver Operating Characteristic (ROC) curves offer insights, into sensitivity specificity tradeoffs. Detailed classification reports provide, in depth metrics like precision, recall, F1 score and support, for every class guaranteeing an assessment of the model’s performance. This structured process ensures an analysis of ECG data covering data preparation, model training and performance assessment to achieve dependable diagnostic results.
Fig. 1.
Proposed framework, workflow for ECG Data analysis.
Dataset and preprocessing
The PhysioBank database is the PTB Diagnostic ECG Database. The dataset was added on September 25, 2004. This collection comprises 549 resolution 15-lead electrocardiograms (consisting of the 12 leads along with Frank XYZ leads) and comes with clinical summaries for every entry. Each of the 294 individuals featured in the database may have between one and five ECG recordings, encompassing both participants and individuals diagnosed with various heart conditions22,24. The database contains information from 290 individuals ranging in age from 17, to 87 with an age of 57.2. There are men (209) than women (81) in the dataset with ages of 55.5 and 61.6 respectively. Most subjects have one to five records each except for a few exceptions like subjects numbered 124, 132 134 or 161 who do not have any records. Each record includes data from 15 signals measured simultaneously: the 12 leads (i, ii, iii avr, avl, avf, v1 v6) and the additional Frank lead ECGs (vx, vy, vz). The signals are digitized at a rate of 1000 samples per second with a resolution of ± 16.384 mV using a range of equipment. In ECG record headers (.hea) there is clinical information such as age, gender, diagnosis, medical history including medication and interventions performed if applicable. This may also include artery pathology, ventriculography, echocardiography, and hemodynamics data. However, this clinical summary is only available for some subjects; specifically, it is missing for the records of twenty-two subjects.
Results and discussions
The AlexNet model when used on the PTB dataset showed performance, in categorizing ECG signals into myocardial infarction bundle branch block and dysrhythmia. The hyperparameters of the model consist of the learning rate (ranging from 0…001, to 0001) batch sizes (16 and 32) epochs (10 and 20) and class weights calculated dynamically to address any imbalances, in the dataset; these were fine tuned using grid search optimization techniques. The highest validation accuracy achieved was 0.9909 with a validation accuracy of 0.9864. In the test set the confusion matrix revealed (refer Fig. 2); 74 classifications for infarction (2 misclassifications) 73 accurate classifications for bundle branch block (0 misclassifications) and 71 accurate classifications for dysrhythmia (0 misclassifications). The test set classification report indicated a precision of 1.00 for infarction, 0.99 for branch block and 0.97 for dysrhythmia. The overall test set accuracy stood at 0.99 with both averages. Weighted average f1 score at a commendable level of.99. These outcomes suggest that the AlexNet model is remarkably precise and dependable in sorting ECG irregularities into categories showcasing its efficiency, in automated ECG signal interpretation and its potential to aid healthcare professionals in diagnosing heart conditions.
Fig. 2.
Test set confusion matrix of AlexNet model.
The ROC curve of the AlexNet model demonstrates (Refer Fig. 3) how well the model can differentiate between three classes; infarction (class 0) bundle branch block (class 1) and dysrhythmia (class 2). The curves show performance, in classifying all three categories. For Class 0 (Myocardial Infarction); The ROC curve has an AUC of 0.98 indicating a positive rate and very few false positives. For Class 1 (Bundle Branch Block); The ROC curve displays an AUC of 1.00 representing classification with no positive results. For Class 2 (Dysrhythmia); The ROC curve reveals an AUC of 0.99 demonstrating classification accuracy. These impressive AUC values demonstrate that the AlexNet model excels at identifying ECG abnormalities proving its reliability as a tool, for automated heart condition diagnosis. The performance shown in the ROC curves emphasizes its potential to accurately classify ECG signals consistently assisting healthcare professionals in diagnosing heart conditions.
Fig. 3.
The AlexNet model ROC curves.
The dual branch fusion network model, when used on the PTB dataset demonstrated performance, in categorizing ECG signals into three groups: myocardial infarction, bundle branch block and dysrhythmia. The model was trained with hyperparameters such as learning rates of 0.001 and 0.0001 batch sizes of 16 and 32 and epochs spanning from 10 to 20. The validation accuracy of the dual branch fusion network model peaked at 0.9593 achieving a validation accuracy of 1.0 under conditions. In the test dataset the confusion matrix (refer Fig. 4) for the dual branch fusion network model revealed classification outcomes.
Fig. 4.
Test set confusion matrix of dual branch fusion network model.
For infarction there were 76 classifications and only one misclassification. Regarding branch block all 73 cases were accurately classified without any errors. Similarly, all 71 cases of dysrhythmia were correctly classified with no mistakes noted in the test set results. The classification report for precision, recall and f1 scores showed performance across all categories; precision was perfect for infarction (0) at 1.00 with a recall of 0.99 and an f1 score of 0.99; for bundle branch block (1) both precision and recall were at a strong level of 0.99 along, with an f1 score of likewise; finally for dysrhythmia (2) precision, recall and f1 score all reached a perfect score of 1.00. The test accuracy, across the board was a 100% with both macro and weighted averages for precision, recall and f1 score hitting 100%. These findings showcase the capability of the dual branch fusion network model in accurately categorizing ECG irregularities by leveraging the strengths of convolutional neural networks (CNNs) for extracting spatial features and long short-term memory networks (LSTMs) for modeling temporal sequences. The models strong performance and consistency, in interpreting ECGs highlight its potential to enhance precision in clinical settings alleviate cardiologist’s workload and enhance patient outcomes by enabling prompt and accurate detection of cardiac conditions.
The ROC curve of the dual branch fusion network model (refer Fig. 5) how well the model performs in distinguishing among three categories; infarction (class 0) bundle branch block (class 1) and dysrhythmia (class 2). The ROC curves for each category show results indicating outstanding classification accuracy. Specifically, the ROC curve, for class 0 (infarction) boasts an area under the curve (AUC) of 0.99 highlighting a high true positive rate accompanied by an extremely low false positive rate. Both class 1 (bundle branch block). Class 2 (dysrhythmia) exhibit an AUC of 1.00 signifying flawless classification without any false positives. The exceptional AUC values for all categories underscore the dual branch fusion network models capability in distinguishing various ECG abnormalities effectively. Its near flawless separation between classes suggests an accurate classification of ECG signals positioning it as a tool, for automated diagnosis of heart conditions.
Fig. 5.
The dual branch fusion network model ROC curves.
The dual branch fusion network model, used on the PTB dataset training with different hyperparameter configurations to enhance its performance as shown in Table 2. These settings were utilized to assess how well the model could categorize ECG data into three groups; infarction, bundle branch block and dysrhythmia. The model achieved a validation accuracy of.9593 with the validation accuracy reaching a score of.1. indicating successful classification of the validation data, under optimal conditions. In the test set results showed that for infarction were76 correct classifications and only one misclassification whereas for bundle branch block there were73 correct classifications and for dysrhythmia there were 71 correct classifications. The test results for the dataset showed a precision rate of 1.00, for heart attack 0.99 for branch block and 1.00 for heartbeats. The overall accuracy on the test set was perfect at 1.00 with both the average precision, recall and f1 score being ideal at 1.00. These findings emphasize the performance of the CNN LSTM model in accurately identifying ECG abnormalities. By blending the spatial feature extraction abilities of networks (CNNs) with the temporal sequence modeling strengths of long short-term memory networks (LSTMs) this model excels, in recognizing and categorizing heart conditions effectively. Such outstanding results demonstrate how this hybrid model can enhance precision ease healthcare professional’s workload and enhance outcomes by providing efficient and accurate ECG interpretations.
Table 2.
Training of dual branch fusion network model and Alexnet under various hyper-parameters settings along with different learning rates.
The AlexNet and dual branch fusion network model was trained on the PTB dataset using hyperparameter settings (refer Table 2). These variations included learning rates of 0.001 and 0.0001 batch sizes of 16 and 32 and epochs ranging from 10 to 20. The model showed performance, in categorizing ECG signals into three groups: infarction, bundle branch block and dysrhythmia. During validation the AlexNet model achieved an accuracy of 0.9864 with the score reaching 0.9909. This indicates that the model performed well in validation almost perfecting its classification under settings. In the test set evaluation for the AlexNet model results from the confusion matrix displayed; 74 identifications and 3 misclassifications for infarction; accurate identification of bundle branch block with no errors (73 correct); and precise identification of dysrhythmia with no mistakes (71 correct). The classification report for the test set revealed a precision rate of 1.00 for infarction 0.99 for branch block and 0.97 for dysrhythmia. Overall accuracy on the test set stood at a rate of 0.99 with macro. Weighted averages of precision, recall and f1 score all at a high level of, around 0.99. These outcomes highlight how effectively the AlexNet model can classify ECG abnormalities with its accuracy and reliability. The models’ effectiveness underscores its ability to support healthcare professionals in diagnosing heart conditions decreasing the chances of misdiagnosis and enhancing outcomes by interpreting ECG results promptly and accurately. Studies that delve into the prevalence of heart disease have mainly concentrated on analyzing ECG data to detect heart abnormalities. Yet extensive research utilizing AI and a variety of datasets has sometimes struggled to pinpoint the distinctions, among arrhythmias and their unique clinical presentations. Furthermore, most research papers focused on analyzing ECG findings of multiple diseases rather than a few dreaded diseases. Recognizing a right bundle branch block (RBBB), on an ECG is typically clear cut for healthcare professionals. It involves a prolonged QRS duration ( to or than 120 ms) and distinct patterns in leads V1 or V2 like rsr′, rsR′ or rSR′ alongside a broad S wave in leads V6 and I. Yet deciphering the importance of RBBB, in clinical settings especially when considering other heart conditions can pose more intricate challenges25.
Figures 6 and 7, show the outcomes of the various models, and showcase the progress and effectiveness of deep learning methods in categorizing ECG signals. Cutting edge models like Hybrid AlexNet SVM, DCNN LSTM and DCNN BiLSTM exhibit precision, sensitivity and specificity in identifying NSR, ARR, CHF and heart attacks. Notably the proposed AlexNet and CNN LSTM models achieved accuracy rates of 100% and 99% respectively highlighting their performance and potential for precise ECG classification. These models utilize approaches such as removing noise extracting time features and applying transfer learning to boost their predictive abilities. The integration of hybrid models that merge CNNs with LSTMs or SVMs has proven to be highly effective based on the performance metrics observed across datasets. In general, these findings confirm the benefits of integrating learning models into settings for automated ECG analysis. These models not only enhance precision but also provide a scalable solution that can be implemented in diverse healthcare environments, including remote areas with limited access, to medical services. This progress sets the stage for more detection of heart conditions ultimately leading to improved patient outcomes and more efficient healthcare provision.
Fig. 6.

Comparison with state-of-the-art methods.
Fig. 7.

Detailed comparison with state-of-the-art methods.
Conclusion
The study effectively showcases how advanced neural network models, AlexNet and a dual branch fusion network model were used to classify ECG signals, for detecting myocardial infarction bundle branch block and dysrhythmia. These models showed accuracy rates with AlexNet achieving 99% accuracy and the dual branch fusion network model achieving classification accuracy in unseen dataset. By combining the strengths of CNNs for spatial feature extraction and LSTMs for temporal sequence modeling these models offer dependable tools for automated ECG interpretation. This progress has potential to enhance decision making reduce misdiagnoses and improve patient outcomes through efficient ECG analysis. Future work will be implementing real time ECG monitoring systems based on these models can offer continuous assessment of health crucial for timely intervention in managing cardiac events. Integrating these network models, with ECG devices can enable ongoing heart monitoring and early detection of abnormalities supporting proactive healthcare management.
Acknowledgements
This work was supported by the Deanship of Scientific Research, Vice Presidency for Graduate Studies and Scientific Research, King Faisal University, Saudi Arabia Grant No. KFU242259.
Author contributions
Certainly! Below is a draft of the Author Contributions Statement: Author Contributions StatementManjur Kolhar and Ahmed M Al Rajeh made substantial contributions to the conception and design of the work, the analysis and interpretation of the data, and the creation of new software used in the work. Manjur Kolhar also drafted and substantively revised the manuscript.Manjur Kolhar and Ahmed M Al Rajeh approved the submitted version of the manuscript and any substantially modified versions that involve the author’s contribution to the study.Manjur Kolhar and Ahmed M Al Rajeh agreed to be personally accountable for the author’s own contributions and ensured that questions related to the accuracy or integrity of any part of the work, even ones in which the author was not personally involved, are appropriately investigated, resolved, and the resolution documented in the literature.
Data availability
The datasets generated during and/or analyzed during the current study are available in the PhysioNet repository, [https://physionet.org/content/ptbdb/1.0.0/].
Declarations
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Hussain, M. M., Rafi, U., Imran, A., Rehman, M. U. & Abbas, S. K. Risk factors Associated with cardiovascular disorders: Risk factors associated with cardiovascular disorders. Pakistan BioMed. J. 03–10 (2024).
- 2.Fan, T. et al. A new deep convolutional neural network incorporating attentional mechanisms for ECG emotion recognition. Comput. Biol. Med.159, 106938 (2023). [DOI] [PubMed] [Google Scholar]
- 3.Zhang, S. & Metaxas, D. On the challenges and perspectives of foundation models for medical image analysis. Med. Image. Anal. 102996 (2023). [DOI] [PubMed]
- 4.Bhosale, Y. H. & Patnaik, K. S. Bio-medical imaging (X-ray, CT, ultrasound, ECG), genome sequences applications of deep neural network and machine learning in diagnosis, detection, classification, and segmentation of COVID-19: A meta-analysis & systematic review. Multimedia Tools Appl.82(25), 39157–39210 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Song, B., Zhou, R. & Ahmed, F. Multi-modal machine learning in engineering design: A review and future directions. J. Comput. Inf. Sci. Eng.24(1), 010801 (2024). [Google Scholar]
- 6.Xu, X. et al. A Comprehensive review on synergy of multi-modal data and AI technologies in medical diagnosis. Bioengineering11 (3), 219 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Shastry, K. A. & Shastry, A. An integrated deep learning and natural language processing approach for continuous remote monitoring in digital health. Decis. Analytics J.8, 100301 (2023). [Google Scholar]
- 8.Osama, M. et al. Internet of medical things and healthcare 4.0: Trends, requirements, challenges, and research directions. Sensors23(17), 7435 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Venkaiahppalaswamy, B., Reddy, P. P. & Batha, S. Hybrid deep learning approaches for the detection of diabetic retinopathy using optimized wavelet based model. Biomed. Signal Process. Control79, 104146 (2023). [Google Scholar]
- 10.Pham, N. T. et al. Hybrid data augmentation and deep attention-based dilated convolutional-recurrent neural networks for speech emotion recognition. Expert Syst. Appl.230, 120608 (2023). [Google Scholar]
- 11.Ram, R. S., Akilandeswari, J. & Kumar, M. V. HybDeepNet: A hybrid deep learning model for detecting cardiac arrhythmia from ECG signals. Inform. Technol. Control52(2), 433–444 (2023). [Google Scholar]
- 12.Khan, S. & Kumar, V. A novel hybrid GRU-CNN and residual bias (RB) based RB-GRU-CNN models for prediction of PTB Diagnostic ECG time series data. Biomed. Signal Process. Control94, 106262 (2024). [Google Scholar]
- 13.Çınar, A. & Tuncer, S. A. Classification of normal sinus rhythm, abnormal arrhythmia and congestive heart failure ECG signals using LSTM and hybrid CNN-SVM deep neural networks. Comput. Methods Biomech. BioMed. Eng.24(2), 203–214 (2021). [DOI] [PubMed] [Google Scholar]
- 14.Kusuma, S. & Jothi, K. R. ECG signals-based automated diagnosis of congestive heart failure using deep CNN and LSTM architecture. Biocybernetics Biomed. Eng.42(1), 247–257 (2022). [Google Scholar]
- 15.Cheng, J., Zou, Q. & Zhao, Y. ECG signal classification based on deep CNN and BiLSTM. BMC Med. Inf. Decis. Mak.21, 1–12 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Xu, G. et al. A deep transfer convolutional neural network framework for EEG signal classification. IEEE Access.7, 112767–112776 (2019). [Google Scholar]
- 17.Tyagi, A. & Mehra, R. Intellectual heartbeats classification model for diagnosis of heart disease from ECG signal using hybrid convolutional neural network with GOA. SN Appl. Sci.3(2), 265 (2021). [Google Scholar]
- 18.Eltrass, A. S., Tayel, M. B. & Ammar, A. I. A new automated CNN deep learning approach for identification of ECG congestive heart failure and arrhythmia using constant-Q non-stationary Gabor transform. Biomed. Signal Process. Control65, 102326 (2021). [Google Scholar]
- 19.Baloglu, U. B., Talo, M., Yildirim, O., San Tan, R. & Acharya, U. R. Classification of myocardial infarction with multi-lead ECG signals and deep CNN. Pattern Recognit. Lett.122, 23–30 (2019). [Google Scholar]
- 20.Yang, C. Y., Chen, P. C. & Huang, W. C. Cross-domain transfer of EEG to EEG or ECG learning for CNN classification models. Sensors23(5), 2458 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Oh, S., Lee, J. Y. & Kim, D. K. The design of CNN architectures for optimal six basic emotion classification using multiple physiological signals. Sensors20(3), 866 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Zeng, H. et al. EEG emotion classification using an improved SincNet-based deep learning model. Brain Sci.9(11), 326 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Xiao, Q. et al. Deep learning-based ECG arrhythmia classification: A systematic review. Appl. Sci.13(8), 4964 (2023). [Google Scholar]
- 24.Goldberger, A. et al. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation [Online]101(23), e215–e220 (2000). [DOI] [PubMed] [Google Scholar]
- 25.Wong, C. K. et al. Risk stratification of patients with acute anterior myocardial infarction and right bundle-branch block: importance of QRS duration and early ST-segment resolution after fibrinolytic therapy. Circulation114(8), 783–789 (2006). [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The datasets generated during and/or analyzed during the current study are available in the PhysioNet repository, [https://physionet.org/content/ptbdb/1.0.0/].






