Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1587 https://internationalpubls.com Deep Recurrent Neural Networks for Cardiac Arrhythmias Detection in Long-Term Ecg Analysis Bukya Mohan Babu1 and Dr B.Sandhya2 1Research Scholar, CSE department,University College of Engineering, Osmania University, India E-mail: mohanbabubukya@gmail.com 2Professor, CSE department, MVSR Engineering College, India E-mail: sandhya_cse@mvsrec.edu.in Article History: Received: 12-01-2025 Revised: 15-02-2025 Accepted: 01-03-2025 Abstract: Arrhythmia, a severe type of heart disease, results from disruptions in the heart's electrical system, leading to irregular heartbeats. Electrocardiograms (ECGs) play a crucial role in monitoring and diagnosing heart conditions by recording the heart's electrical activity over time. They serve as the primary diagnostic tool for capturing and analyzing the heart's electrical activity, essential for early diagnosis and treatment planning. Arrhythmias, characterized by irregular heart rhythms, manifest in various forms of coronary heart disease. These irregularities occur when the heart's electrical impulses deviate from normal functioning, resulting in either tachycardia or bradycardia. The complexity of ECG waveforms makes manual detection of arrhythmias challenging for healthcare professionals. Consequently, deep learning techniques are increasingly applied for automatic detection, enabling timely clinical diagnosis and treatment. This paper explores methodologies for generating and processing ECG time series data using Python, focusing on two primary approaches: generating synthetic ECG signals and analyzing real ECG data through the MIT-BIH Arrhythmia Dataset. Various deep learning models, including Support Vector Machine (SVM), Convolutional Neural Network (CNN), Long Short-Term Memory (LSTM), and Recurrent Neural Network (RNN) classifiers, are implemented. They are compared to detect abnormalities in different types of heartbeats from arrhythmia ECG datasets. The RNN outperforms SVM, CNN, and LSTM models, achieving the highest accuracy of 99%, precision of 0.99, recall of 0.99, and F1-score of 0.99. This study underscores the importance of deep learning in improving the accuracy of arrhythmia detection and demonstrates the effectiveness of RNNs for this application. Index Terms: Arrhythmia, ECG, deep learning, SVM, CNN, LSTM, RNN, MIT- BIH Arrhythmia Dataset, heart rate abnormalities, tachycardia, bradycardia. 1. INTRODUCTION Arrhythmia, a critical form of coronary illness, arises from disruptions in the heart's electrical system, resulting in an irregular heartbeat [1]. This condition can cause fainting and increases the risk of severe health issues. Electrocardiograms (ECGs) are pivotal in monitoring and diagnosing heart conditions by recording the heart's electrical activity [2]. Arrhythmias manifest as either tachycardia (a fast heart rate) or bradycardia (a slow heart rate) [3]. Detecting these anomalies is crucial for Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1588 https://internationalpubls.com timely treatment, as untreated arrhythmias can lead to complications like stroke, heart failure, and sudden cardiac arrest [4]. Traditionally, diagnosing arrhythmias relied on manual analysis of ECG recordings by cardiologists, a method prone to human error and time-consuming [5]. Hence, automated systems for accurate identification of arrhythmias are essential. Deep learning, a branch of artificial intelligence, has emerged as a powerful tool in medical diagnostics, capable of analyzing large datasets of ECG recordings to identify subtle patterns and anomalies indicative of arrhythmias [6]. By processing data more quickly and accurately than human clinicians, deep learning algorithms facilitate the rapid and accurate identification of arrhythmias [7]. Integrating deep learning systems into clinical practice enables continuous patient monitoring, with wearable devices sending real-time data to models for immediate detection of arrhythmias outside clinical settings [8]. This capability leads to earlier interventions, improved patient outcomes, and reduced strain on healthcare systems [9]. The application of deep learning to arrhythmia detection marks a significant leap forward in cardiac care, offering better patient management and improved prognoses for those with coronary heart disease [10]. 2.LITERATURE SURVEY This literature survey ambitions to discover the sizable advancements in electrocardiogram (ECG) arrhythmia detection through the software of device getting to know and deep learning strategies over the last five years. As cardiovascular diseases keep to pose a worldwide fitness assignment, the correct and timely detection of arrhythmias is vital for effective affected person care. Traditional strategies of ECG analysis have been augmented by using ML and DL algorithms, which have proven top notch ability in figuring out complicated patterns inside ECG signals. This evaluate seeks to offer a comprehensive evaluate of the evolving landscape of ECG arrhythmia detection, evaluating various algorithmic methods and evaluating their effect on scientific diagnostics. Table .1 Literature Survey Year Author(s) Title Method Features 2023 [1] Jiayu Guo "An ECG detection device based on Convolutional Neural Network" Capsule Network Explored the use of capsule networks for understanding the hierarchical relationships in ECG data. 2022 [2] Barbosa, L.C.N., Real, A., &Moreira, A.H.J. "ECG Classification with Deep Learning Models – A Comparative Study" Transform er, Attention Introduced attention mechanisms and transformer models for focusing on important segments of ECG signals. 2021 [3] Weimann, K., & Conrad " Transfer learning for ECG classification " CNN (Transfer Learning) Applied transfer learning to a pre- trained CNN model for improved ECG arrhythmia detection. 2020 Masoud Daneshtala " A review on deep learning methods for LSTM, Applied LSTM and GRU units to seize lengthy-term dependencies in Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1589 https://internationalpubls.com [5] b and Arash Gharehbag hi ECG arrhythmia classification" GRU ECG time collection data. 2019 [6] Lisha Niu and Chao Chen " A Deep-Learning Approach to ECG Classification Based on Adversarial Domain Adaptation " CNN Developed a 1D CNN version for ECG sign category into numerous arrhythmia categories. 2019 [7] Janghel, R.R " Classification and Detection of Arrhythmia in ECG Signal Using Machine Learning Techniques" Random Forest, SVM Implemented ensemble methods and SVM for classifying ECG beats using handcrafted features. 2.1 PROBLEM STATEMENT The diagnosis of arrhythmias traditionally relies on manual analysis of ECG recordings by cardiologists, a method that is time-consuming, prone to human error, and often inadequate for detecting subtle patterns indicative of arrhythmias. The small and complex waveforms in ECG recordings make it challenging to accurately identify arrhythmias with the naked eye. This underscores the need for automated, accurate, and efficient systems to assist in arrhythmia detection. The primary objective of this take a look at is to explore the software of deep mastering strategies for the automated detection of arrhythmias from ECG recordings. This involves generating and processing ECG time series records using both synthetic ECG indicators and actual data from the MIT-BIH Arrhythmia Dataset to make certain a numerous and comprehensive dataset. Various deep studying models, including SVM, CNN, LSTM and RNN classifiers, are applied and compared for his or her performance in detecting abnormalities in exclusive sorts of heartbeats. The have a look at assesses the fashions' accuracy, precision, take into account, and F1-score to become aware of the most effective method for arrhythmia detection. By demonstrating the ability of deep getting to know fashions, specifically RNNs, to enhance the accuracy and efficiency of arrhythmia detection, this study pursuits to enhance affected person effects and decrease the workload on healthcare specialists, highlighting the importance of deep mastering in cardiac care. 2.2 ECG DATASET The ECG Signals dataset comprises a diverse collection of electrocardiogram (ECG) recordings representing different cardiac conditions and abnormalities. This dataset is invaluable for research and development in the field of cardiology, particularly in the areas of arrhythmia detection and classification. Here's a breakdown of the various types of signals included in the dataset: Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1590 https://internationalpubls.com Normal ECG Signals: These signals represent the typical electrical activity of the heart in a healthy individual. They serve as the baseline for comparison with signals exhibiting abnormalities. Atrial Premature Contraction (APC) Signals: APC signals occur when the electrical impulses in the heart originate prematurely from the atria, leading to irregular heartbeats. These signals are characterized by abnormal P-wave morphology and timing. Premature Ventricular Contraction (PVC) Signals: PVC signals result from early activation of the ventricles before the normal heartbeat originates. This condition is associated with irregular heartbeats and can be indicative of underlying cardiac issues. Fusion of Ventricular and Normal Signals: Fusion signals occur when there is a combination of normal electrical activity and abnormal ventricular activation. These signals present challenges in classification due to their mixed nature. Fusion of Paced and Normal Signals: Paced signals are generated artificially through the use of pacemakers to regulate heart rhythm. Fusion of paced and normal signals occurs when both artificial and natural electrical activity is present in the ECG recording. The dataset provides researchers and practitioners with a comprehensive set of ECG signals representing a wide range of cardiac conditions. By analyzing and studying those indicators, researchers can expand and compare algorithms for computerized detection and category of arrhythmias. Additionally, the dataset enables the training and validation of gadget gaining knowledge of and deep gaining knowledge of models, in the long run contributing to improvements in cardiac care and improving patient effects. Figure 1.ECG Signals Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1591 https://internationalpubls.com 3. PROPOSED METHODOLOGY The approach of this work is structured around a number of important components aimed at investigating and assessing deep learning algorithms for arrhythmia identification in electrocardiogram data. These processes include data collection, preprocessing, model implementation, training, and evaluation.The first step involves collecting ECG data from two main sources. Initially, a broad and controlled dataset is assembled to train the first model, generating synthetic ECG signals. The MIT-BIH Arrhythmia Dataset, comprised of actual ECG recordings annotated by experts, serves as a valuable resource for training and testing models. Preparing the ECG signals for analysis involves several steps in the data preprocessing procedure. To ensure uniform amplitude across recordings, the ECG signals are normalized. Next, the continuous ECG data is segmented into smaller windows of defined length to facilitate comprehension by the models. Filtering techniques are applied to eliminate artifacts and noise, improving the data quality necessary for model training. To identify critical aspects of the ECG data, feature extraction is conducted using classic ML models like SVM. Time-domain parameters such as average, standard deviation, and extreme value are retrieved. Additionally, frequency-domain features are determined by analyzing the frequency components of the ECG signals using methods like the Fast Fourier Transform (FFT).Various deep learning techniques are employed for arrhythmia identification. Starting with SVM, a popular machine learning method, the study explores automated geographical information extraction using Convolutional Neural Networks (CNNs). Long Short-Term Memory (LSTM), a recurrent neural network capable of storing temporal correlations in ECG data, is utilized. Recurrent Neural Networks (RNNs) learn correlations spanning time with sequential input. The segmented and processed electrocardiogram data is used to train the algorithms. The dataset is split into training and validation sets to assess model performance. Hyperparameters are fine-tuned using methods like grid search and random sampling to improve model performance and reduce overfitting through regularization techniques such as dropout and L2 regularization. Model performance is evaluated using various metrics. Accuracy measures the model's ability to correctly categorize ECG signals, while precision quantifies the proportion of true positive detections among all positive results. Recall represents the ratio of actual positive detections to the total number of actual positive instances. The F1-Score, a harmonic mean of recall and accuracy, provides a fair evaluation of model performance. In the end, the best method for diagnosing arrhythmias is determined by comparing the results of the various models. Given the initial premise that the RNN model would provide the best results, its performance is closely monitored. The study aims to demonstrate how RNNs and other deep learning approaches can enhance arrhythmia identification performance using electrocardiogram (ECG) data through this methodical methodology. SYSTEM ARCHITECTURE DIAGRAM The System Architecture outlines a comprehensive process for using the MIT-BIH Arrhythmia Dataset to predict arrhythmias through various deep learning algorithms. Initially, the raw ECG data is pre-processed to clean and normalize it, which may involve handling missing values, reducing noise, and scaling the data. Relevant features are then extracted using signal processing techniques, Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1592 https://internationalpubls.com statistical analysis, or domain-specific methods to identify important characteristics of the ECG signals. The extracted features are used to train different types of algorithms like Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), and a hybrid model combining CNN and RNN (CNN+RNN). CNNs are effective for capturing spatial and temporal dependencies, RNNs handle sequential data well by maintaining context across sequences, and the hybrid CNN+RNN approach leverages the strengths of both. Finally, the trained models are tested on new, unseen data to predict arrhythmias, and the prediction results are compared to evaluate performance and determine the best predictive algorithm. This process underscores the importance of each step, from data preparation to model evaluation, in effectively using deep learning for arrhythmia detection. Figure 2.System Architecture Attention Model Figure 3.Attention Model Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1593 https://internationalpubls.com To build a hybrid CNN, LSTM, and RNN model with attention using TensorFlow and Keras, we start by defining the input shape. The model includes a Conv1D layer followed by MaxPooling1D and Flatten layers for feature extraction. An LSTM layer processes the input to capture long-term dependencies, and its output is fed into a SimpleRNN layer. An attention mechanism is applied to the RNN outputs, which is then flattened and concatenated with the CNN output. Finally, the combined features are passed through a dense layer and a sigmoid-activated output layer, making the model suitable for binary classification tasks. 3.1 TRAINING RNN MODEL OF ECG ECG classification using an RNN model, the process starts with preprocessing the ECG signals, segmenting them into smaller windows, and splitting the dataset. Then, a Sequential model incorporating Recurrent Neural Network (RNN) layers is defined. These layers are crucial for capturing temporal dependencies within the ECG signals. Following model definition, compilation involves specifying appropriate loss and optimization functions. The model is trained on the training data, with performance evaluated using validation data. Finally, the trained RNN model is tested on the test set to gauge its classification accuracy. ALGORITHM 1 .RNN MODEL TRAINING features← [MITBIH] labels ← [N,FPN,PVC,AP,FVN] A← dataset[features].values B ← dataset[labels].values traindata,testdata,validdata ← TEST_TRAIN_SPLIT(A, B, 0.20) BATCH_SIZE ← 4 rnnmodel ← SEQUENTIAL_MODEL([ EMBEDDING_LAYER(traindata.length,output_res, traindata.columns), RNN_LAYER(output_res), DENSE_LAYER(output_res, activation='sigmoid') ]) loss← 'binary_crossentropy', optimizer ← 'adam', epochs ← 12 rnnmodel.compile(loss, optimizer) 3.2 TRAINING HYBRID MODEL WITH CNN AND RNN OF ECG The hybrid model of CNN and RNN for ECG classification combines the spatial feature extraction capabilities of CNNs with the temporal sequence learning abilities of RNNs. ECG signals are preprocessed and segmented, then fed into a Sequential model integrating both CNN and RNN layers. Convolutional layers capture spatial patterns, while recurrent layers capture temporal dependencies. After compilation with suitable loss and optimization functions, training occurs on the Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1594 https://internationalpubls.com training data, with evaluation on validation data. The resulting model accurately classifies ECG signals by effectively leveraging both spatial and temporal information. Algorithm: Hybrid CNN-RNN Model Training for Arrhythmia Detection Input: MIT-BIH Arrhythmia Database Output: Arrhythmia Prediction Procedure: TrainHybridModel(trainingData, testingData) #Initialize the hybrid model model = Sequential() #Configure training parameters batchSize = 32 epochs = 100 kernelSize = 5 filters = 64 poolSize = 2 verbose = 1 #Add a 1D Convolutional layer model.add(Conv1D(filters=filters, kernel_size=kernelSize, activation='relu', input_shape=(trainingData.shape[1], 1))) #Add a pooling layer model.add(MaxPooling1D(pool_size=poolSize)) #Add an LSTM layer model.add(LSTM(units=100)) #Add a dense layer for classification model.add(Dense(units=num_classes, activation='softmax')) #Compile the model model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy']) #Train the model for epoch in range(epochs): model.fit(trainingData, epochs=1, batch_size=batchSize, validation_data=(testingData), verbose=verbose) #Evaluate the model Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1595 https://internationalpubls.com scores = model.evaluate(testingData, verbose=verbose) #Calculate performance metrics accuracy = scores[1] * 100 precision, recall, f1_score, _ = precision_recall_fscore_support(testingData, model.predict(testingData), average='weighted') #Return the accuracy score return accuracy End Procedure 3.3 MODEL TRAINING GRAPH USING CNN: During the 100-epoch training of the CNN model, the loss function graph illustrates a rapid decline in both training and validation losses during the initial epochs, indicating efficient pattern recognition. While the validation loss stabilizes around epoch 20, the training loss continues to decrease notably, suggesting the model's adaptation to new data without succumbing to overfitting. The consistent divergence between training and validation losses by the hundredth epoch showcases the model's balanced performance. Simultaneously, the accuracy and F1-score metrics for both training and validation sets exhibit rapid initial improvements, eventually converging to nearly perfect scores around 0.99. This underscores the CNN model's capability for accurate classifications and robust generalization to unseen data. The parallel trajectories of accuracy and F1-score across both datasets underscore the model's reliability and precision in ECG signal classification, highlighting its potential for accurate cardiovascular diagnosis. Additionally, the convergence of training and validation accuracy and F1-score suggests that the CNN model effectively learns and generalizes complex patterns inherent in ECG data. This indicates the model's ability to discern subtle nuances and variations in cardiac signals, enabling accurate classification of different arrhythmias and cardiovascular conditions. Moreover, the stability of performance metrics throughout training signifies the model's resilience to fluctuations in input data and training conditions, further enhancing its reliability in real-world scenarios. Furthermore, the CNN model's high accuracy and F1-score emphasize its superior performance compared to traditional machine learning approaches. By harnessing spatial hierarchies in ECG signals, the CNN model can capture intricate patterns and spatial relationships, resulting in more precise and contextually informed predictions. This not only enhances diagnostic accuracy but also improves the model's interpretability, enabling clinicians to better comprehend and trust the model's outputs in clinical practice. Overall, the robustness, reliability, and interpretability of the CNN model make it an invaluable asset for automated cardiac arrhythmia diagnosis, with the potential to significantly enhance patient care and outcomes in cardiovascular health. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1596 https://internationalpubls.com 4 .RESULTS AND DISCUSSION 4.1 A CNN MODEL FOR ECG ANALYSIS A CNN version for ECG analysis leverages the energy of convolutional neural networks (CNNs) to robotically extract relevant capabilities from electrocardiogram (ECG) signals and classify them into distinct arrhythmia classes. The structure of a CNN consists of a couple of layers, together with convolutional layers, pooling layers, and fully related layers, designed to capture spatial hierarchies in sequential facts.In the context of ECG analysis, the CNN version starts offevolved by way of preprocessing the raw ECG alerts, which may involve segmentation into fixed-length segments to make sure uniformity in input information. Each section of the ECG signal is then treated as an photo, where time represents one axis and voltage represents another. The convolutional layers in the CNN carry out feature extraction by using making use of a set of learnable filters throughout the input signal. These filters discover styles at exclusive scales and hierarchies, efficaciously taking pictures spatial relationships in the ECG sign. The activation of neurons within the convolutional layers displays the presence of precise features indicative of various arrhythmias. Pooling layers are then used to lessen the spatial dimensions of the function maps generated via the convolutional layers, thereby decreasing computational complexity and stopping overfitting. This downsampling method retains the most salient capabilities at the same time as discarding inappropriate statistics.Following the convolutional and pooling layers, the absolutely linked layers within the CNN combine the extracted features and perform type based totally on learned representations. Each neuron inside the output layer corresponds to a particular arrhythmia class, and the model outputs the chance distribution over those categories the usage of a softmax activation characteristic.Training the CNN version involves offering annotated ECG records, where every phase is categorized with its corresponding arrhythmia analysis. The version learns to generalize from this schooling information, adjusting the weights of its parameters thru backpropagation to limit type errors. Once trained, the CNN model can be deployed for real-time arrhythmia detection from ECG signals, providing clinicians with valuable insights into patients' cardiac health. By automating the analysis process, CNN models streamline clinical workflows, facilitate early detection of arrhythmias, and ultimately improve patient outcomes in cardiac care. Figure 4.CNN Model Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1597 https://internationalpubls.com 4.2 CNN MODEL CLASSIFICATION REPORT The CNN model achieves exceptional performance in accurately categorizing various types of arrhythmias within electrocardiogram (ECG) signals, boasting an impressive accuracy rate of 99%. Beginning with the classification of "Normal" ECG signals, the model demonstrates precise identification of regular heartbeats, essential for distinguishing healthy cardiac rhythms from abnormalities. Furthermore, the CNN model showcases its sensitivity and specificity in classifying "Atrial Premature" beats, crucial for detecting irregular contractions originating in the atria and identifying subtle deviations from normal heart rhythms. The model's robust performance extends to identifying "Premature Ventricular Contraction" (PVC) signals, which indicate early contractions in the ventricles. Accurate detection of PVCs is vital for early intervention in individuals with potential underlying cardiac conditions. Additionally, the CNN model exhibits proficiency in recognizing "Fusion of Ventricular and Normal" beats, where irregularities stem from a combination of normal and abnormal electrical activity in the heart. Moreover, the CNN model demonstrates its capability in distinguishing "Fusion of Paced and Normal" signals, critical for accurate diagnosis and monitoring of patients with pacemakers. The overall high accuracy, supported by macro-average and weighted-average metrics, underscores the model's comprehensive and reliable performance across all arrhythmia categories. In the clinical context of ECG interpretation, the CNN model's exceptional classification accuracy signifies its potential to aid healthcare professionals in diagnosing cardiac conditions promptly and guiding appropriate interventions. Leveraging advanced machine learning techniques like convolutional neural networks, the model significantly enhances the efficiency and accuracy of arrhythmia detection, ultimately contributing to improved patient outcomes and advancing cardiac care. Figure.5 CNN Model Classification 4.3 RNN MODEL CLASSIFICATION REPORT A comprehensive evaluation of the Recurrent Neural Network (RNN) model's capability to categorize cardiac events using electrocardiogram (ECG) data is given in the model's classification report. To evaluate the efficacy of the model, important measures including recall, precision, and F1- Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1598 https://internationalpubls.com score are used. A high precision of 0.99 indicates few false positive mistakes, as it represents the ratio of genuine positive predictions to all positive predictions. The recall score, which measures the percentage of correct predictions relative to the total number of positive occurrences, is similarly 0.99, indicating that the model successfully catches the majority of positive examples. The model's ability to maintain a balanced ratio of false positives to false negatives is shown by the remarkable F1-score of 0.99, which is a measure of both recall and accuracy. Moreover, with an accuracy of 0.99, the RNN model demonstrates exceptional performance across all classes, showcasing its reliability in accurately detecting various arrhythmias from ECG signals. Its consistent performance highlights the model's robustness and capability to generalize well across different cardiac conditions. Figure.6 RNN Model Classification 4.4 HYBRID MODEL OF CNN AND RNN i).Explanation of the Hybrid CNN-RNN Classification Process: The Hybrid CNN-RNN version correctly combines the strengths of Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) to classify cardiac occasions with high accuracy. Initially, CNNs are employed for function extraction from the enter ECG signal records. These networks follow convolutional filters to seize spatial styles and variations in the ECG waveforms. Pooling layers then lessen the dimensionality of these characteristic maps at the same time as maintaining critical data, making the records more doable. Activation capabilities, like ReLU, introduce non-linearity, permitting the version to learn complicated styles. After the CNN extracts the excessive-level capabilities, these characteristic maps are handed to the RNN. RNNs, inclusive of kinds like Long Short-Term Memory (LSTM) or Gated Recurrent Units (GRUs), excel at handling sequential statistics by using shooting temporal dependencies. They preserve a memory of previous inputs, which enables in expertise the sequence and context within the ECG signals.The output from the RNN, which now reflects both spatial and temporal functions, is then fed into a fully linked layer that performs the final type. This layer makes use of a softmax activation function to produce a possibility distribution over the viable instructions, allowing the version to make correct predictions. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1599 https://internationalpubls.com During training, the model is optimized the use of a loss characteristic, consisting of categorical cross-entropy, and an optimization set of rules like Adam. The schooling manner adjusts the model weights to reduce the loss feature, making sure that the version appropriately learns from the training information. The model’s overall performance is evaluated using metrics like precision, don't forget, F1-score, and accuracy to make certain it generalizes properly to unseen records. Figure.7 CNN and RNN Model Classification ii).Hybrid CNN-RNN Classification Result: The classification performance of the Hybrid Model, combining CNN and RNN, is summarized below. The model demonstrated exceptional accuracy across multiple categories, achieving an overall accuracy of 99.25%. The model's resilience in recognizing normal instances from the dataset was shown by its remarkable accuracy of 0.9998, recall of 0.9925, and F1-score of 0.9961 for the 'Normal' class. With a recall of 0.9986, an F1-score of 0.9422, and a precision of 0.8919 for the 'Atrial Premature' category, the model demonstrated a remarkable capacity to detect and appropriately categorize events that occur at low frequencies.The model's reliability in recognizing 'Premature Ventricular Contraction' events was strong, as shown by its precision of 0.9806, recall of 0.9843, and F1-score of 0.9825. As compared to the 'Fusion of Paced and Normal' category, which had an F1-score of 0.9954, a recall of 0.9975, and a precision of 0.9658, the 'Fusion of Ventricular and Normal' category had an F1-score of 0.9769. These outcomes demonstrate how well the model handles complicated cardiac events.The model's balanced performance across multiple classes is shown in the macro average accuracy, recall, and F1-score, which are 0.9663, 0.9922, and 0.9786, respectively. An F1-score of 0.9926, a recall of 0.9925, and a precision of 0.9930 are the weighted average measures, which further support the model's overall efficacy. Based on these findings, the Hybrid CNN-RNN model is an excellent diagnostic tool for identifying and categorizing a wide range of cardiac disorders. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1600 https://internationalpubls.com Table.2 CNN and RNN Results Category Precision Recall F1-Score Support Normal 0.999779233 0.992475710 0.996114085 13689 Artial Premature 0.891891892 0.998559078 0.942216179 694 Premature ventricular contraction 0.980645161 0.984273821 0.982456140 1081 Fusion of ventricular and normal 0.965811966 0.988338192 0.976945245 343 Fusion of paced and normal 0.993366501 0.997502082 0.995429996 1201 Accuracy 0.992474130 Macro avg 0.966298951 0.992229777 0.978632329 17008 Weighted avg 0.993022988 0.992474130 0.992611857 17008 4.5 ATTENTION MODEL FOR ECG ANALYSIS To efficiently evaluate electrocardiogram (ECG) data for arrhythmia identification, a CNN+LSTM+Attention model integrates the advantages of CNNs and LSTM networks, with the help of attention mechanisms.First, the model's design incorporates convolutional neural network (CNN) layers to glean important spatial information from the ECG data input. By using learnable filters, these CNN layers are able to identify patterns and spatial correlations in the ECG data, allowing them to capture crucial elements that indicate various arrhythmias. Long short-term memory (LSTM) layers take use of the CNN layers' output by capturing long-term patterns and temporal relationships in sequential data. Because ECG signals tend to be consecutive, this lets the model factor in data from earlier time steps when making predictions.Furthermore, the model includes attention mechanisms that dynamically prioritize various elements of the input sequence. Through this attention process, the model is able to zero in on the most important parts of the electrocardiogram (ECG) signal, improving its capacity to detect irregularities and subtle patterns linked to arrhythmias.Annotated electrocardiogram (ECG) data, with each segment labeled with its accompanying arrhythmia diagnosis, is fed into the model during training. In order to provide reliable predictions, the model figures out how to best integrate the temporal and geographical data included in the ECG signals. The model optimizes its performance and reduces classification mistakes by adjusting its parameters using backpropagation. Once trained, the CNN+LSTM+Attention model can be deployed for real-time arrhythmia detection from ECG signals. By leveraging the complementary strengths of CNNs, LSTMs, and attention mechanisms, the model provides clinicians with valuable insights into patients' cardiac health, facilitating early detection and intervention for arrhythmias. Overall, this advanced model enhances the accuracy and efficiency of ECG analysis, ultimately improving patient outcomes in cardiac care. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1601 https://internationalpubls.com Figure.8 CNN and RNN Results 4.6 COMPARISON OF ALGORITHMS: The study's findings show that the deep learning models, particularly the RNN, significantly outperform traditional machine learning techniques like SVM and MLP in detecting arrhythmias from ECG data.The following table summarizes the performance metrics for each model: Table.3 Comparison of Algorithm Results Model Accuracy Precision Recall F1-score SVM 71% 0.97 0.69 0.80 MLP 93% 0.99 0.92 0.95 CNN 97% 0.96 0.95 0.96 RNN 99% 0.99 0.99 0.99 CNN+RNN (Attention Model) 99% 0.99 0.99 0.98 The results demonstrate that the RNN achieves the highest accuracy of 99%, precision of 0.99, recall of 0.99, and F1-score of 0.99. This underscores the potential of RNNs in accurately identifying arrhythmias from ECG recordings. The CNN and MLP models also perform well, showing significant improvements over the SVM baseline. The superior performance of deep learning models highlights their capacity to analyze complex patterns in ECG data, providing a robust solution for automatic arrhythmia detection. Figure.9 Comparison of Algorithms Graph Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1602 https://internationalpubls.com The bar graph compares the performance metrics accuracy, precision, recall, and F1-score of different models (SVM, MLP, CNN, RNN, and CNN+RNN Attention Model) in detecting arrhythmias from ECG data. It highlights that deep learning models generally outperform traditional machine learning techniques across all metrics. 5.CONCLUSION The revolutionary potential of deep learning techniques in transforming the identification of arrhythmias from ECG records is highlighted by this work. Through model comparison, we show that Recurrent Neural Networks (RNNs) perform better at detecting irregular heartbeats, with 99% accuracy, 0.99 precision, 0.99 recall, and 0.99 F1-score. The results demonstrate the superiority of deep learning approaches—in particular, RNNs—over conventional techniques for arrhythmia identification, such as Support Vector Machines (SVM). Deep learning applications lead to dramatically better patient outcomes and less strain on healthcare systems by enabling real-time monitoring and early intervention in addition to improving diagnosis accuracy. Through a methodical investigation of many deep learning models using artificial and real-world data, the work clarifies the effectiveness of automated methods in surmounting the drawbacks of human diagnosis. Particularly noteworthy is the demonstrated effectiveness of Recurrent Neural Networks (RNNs) in enhancing accuracy and efficiency, thus paving the way for improved patient outcomes and streamlined clinical workflows. The findings of this study underscore the increasing challenge in accurately identifying arrhythmias, emphasizing the necessity of employing cutting- edge technology in cardiac care. Furthermore, they emphasize the urgent requirement for scalable, automated solutions to address this challenge effectively. FUTURE ENHANCEMENT In the future, it's crucial to concentrate on enhancing and optimizing deep learning models for practical clinical use. Additionally, efforts to integrate these automated detection systems into existing healthcare infrastructure should be prioritized to ensure widespread adoption and maximum impact. Ultimately, by using deep learning's features, the field of cardiology stands poised to usher in a new era of precision medicine, where timely and accurate diagnosis of arrhythmias can significantly improve patient outcomes and quality of care. REFERENCES: 1. Guo, J., Li, W., & Huang, H. (2023). An ECG detection device based on Convolutional Neural Network. 2023 8th International Conference on Intelligent Computing and Signal Processing (ICSP),doi: https://ieeexplore.ieee.org/document/10248472,ieee. 2. Barbosa, L.C.N., Real, A., & Moreira, A.H.J. (2022). ECG Classification with Deep Learning Models – A Comparative Study.doi: https://ieeexplore.ieee.org/document/9991600,ieee 3. Weimann, K., & Conrad, T.O.F. (2021). Transfer learning for ECG classification. Scientific Reports, 11, Article 4352.doi:"10.1038/s41598-021-84374-8". 4. Ebrahimi, Z., Loni, M., Daneshtalab, M., & Gharehbaghi(2020), A review on deep learning methods for ECG arrhythmia classification. Doi:pii/S2590188520300123. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1603 https://internationalpubls.com 5. Daneshtalab, M., & Gharehbaghi, A. (2020). A review on deep learning methods for ECG arrhythmia classification. Journal of Biomedical Informatics, 103, 103387. doi:10.1016/j.eswax.2020.100033. 6. Niu, L., & Chen, C. (2019). A deep-learning approach to ECG classification based on adversarial domain adaptation.doi: 10.3390/healthcare8040437,journal : Healthcare (Basel). 7. Janghel,R.R., & Pandey, S.K. (2019). Classification and Detection of Arrhythmia in ECG Signal Using Machine Learning Techniques. Proceedings of the ECTI-CON 2019. doi:10.1109/ECTI- CON47248.2019.8955208. 8.Johnson AE, Pollard TJ, Shen L, et al. MIMIC-III, a freely accessible critical care database. Scientific Data. 2016;3:160035. doi:10.1038/sdata.2016.35 9.Moody GB, Mark RG. The impact of the MIT-BIH Arrhythmia Database. IEEE Eng Med Biol Mag. 2001;20(3):45-50. doi:10.1109/51.932724 10.Goldberger AL, Amaral LAN, Glass L, et al. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation. 2000;101(23). doi:10.1161/01.cir.101.23.e215 11.Clifford GD, Liu C, Moody B, et al. Classification of normal/abnormal heart sound recordings: the PhysioNet/Computing in Cardiology Challenge 2016. Comput Cardiol (2010). 2016;43:1-4. 12.Elgendi M, Norton I, Brearley M, et al. Electrocardiography essentials. J Electrocardiol. 2019;56:1-6. doi:10.1016/j.jelectrocard.2018.11.001 13.Parvaneh S, Mohamadzade H, Nazeri AR, et al. Classification of ECG beats using wavelet transform and probabilistic neural network. Biomed Eng Online. 2011;10:28. doi:10.1186/1475- 925x-10-28 14.Li Q, Rajagopalan C, Clifford GD. Ventricular fibrillation and tachycardia classification using a machine learning approach. IEEE Trans Biomed Eng. 2014;61(6):1607-1613. doi:10.1109/TBME.2014.2300491 15.Acharya UR, Fujita H, Lih OS, et al. Automated detection of arrhythmias using different intervals of tachycardia ECG segments with convolutional neural network. Inf Sci. 2017;405:81-90. doi:10.1016/j.ins.2017.04.007 16.Rajpurkar P, Hannun AY, Haghpanahi M, et al. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat Med. 2020;25(1):65-69. doi:10.1038/s41591-018-0268-3 17.Zhao H, Xue D, Zhang Y, et al. ECG arrhythmia classification using staked sparse autoencoder with learned discriminative features. Comput Methods Programs Biomed. 2018;157:135-143. doi:10.1016/j.cmpb.2018.01.007 18.Teijeiro T, Félix P, Castro D, et al. Automatic detection of atrial fibrillation episodes using a hybrid deep learning approach. Biomed Signal Process Control. 2020;59:101898. doi:10.1016/j.bspc.2020.101898 Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 9s (2025) 1604 https://internationalpubls.com 19.Tsipouras MG, Exarchos TP, Fotiadis DI. A novel methodology for arrhythmia classification using photoplethysmographic signals and wavelet transform. IEEE Trans Inf Technol Biomed. 2009;13(6):1037-1045. doi:10.1109/TITB.2009.2027006 20.Salama RM, Ismail MA, Shaalan K. Classification of ECG arrhythmia using a deep convolutional neural network with long duration data augmentation. PLoS One. 2019;14(3) . doi:10.1371/journal.pone.0215117 21.Yazdani S, Kirkpatrick B, Jackson N, et al. Arrhythmia classification using morphological analysis of ECG signals with convolutional neural networks. Conf Proc IEEE Eng Med Biol Soc. 2017;2017:3727-3730. doi:10.1109/EMBC.2017.8037585 22.Acharya UR, Fujita H, Sudarshan VK, et al. Automated detection of arrhythmias using different intervals of tachycardia ECG segments with convolutional neural network. Inf Sci. 2017;405:81- 90. doi:10.1016/j.ins.2017.04.007 23.Fujita H, Nakashima Y, Takayama M, et al. Automated detection of atrial fibrillation based on time-frequency analysis of heart rate variability. Med Biol Eng Comput. 2011;49(8):869-877. doi:10.1007/s11517-011-0790-4. 24.Liu C, Springer D, Li Q, et al. A comparison of filter methods for atrial fibrillation detection using RR intervals. Physiol Meas. 2013;34(3):305-320. doi:10.1088/0967-3334/34/3/305 25.Wang J, Zhang J, Liu L, et al. A novel detection algorithm of atrial fibrillation based on RR intervals. J Med Syst. 2014;38(9):103. doi:10.1007/s10916-014-0103-5. Author’s Profile: Bukya Mohan Babu1: is pursuing Ph.D in Computer Science and Engineering from Osmania University, Hyderabad. He completed his M.Tech and B.Tech in CSE from JNTU Hyderabad University. His research areas include Data mining, Machine Learning and Deep Learning. He has 17+ years of teaching and research experience. Dr.B.Sandhya2: was awarded Ph.D in Computer Science from University of Hyderabad in the year 2011. She is currently working as Professor in CSE department in MVSR Engineering College, Hyderabad. She has 22+ years of teaching, research and consultancy experience. Her principal areas of research include Image Processing, Machine learning, Deep learning and Computer Vision. She has authored/co-authored around 40 research publications in international conferences and journals, with total citations of about 170.