1. Introduction
Cardiovascular diseases remain a leading cause of death globally, and timely detection of arrhythmias plays a crucial role in effective clinical intervention. Electrocardiogram (ECG) signals, which capture the electrical activity of the heart, serve as essential diagnostic tools for identifying various arrhythmias [1]. However, the analysis of ECG signals is challenging due to their complex and dynamic nature, necessitating sophisticated computational techniques to extract meaningful information. In recent years, Convolutional Networks (CNNs) have emerged as powerful tools in the field of signal processing, exhibiting remarkable capabilities in image recognition, natural language processing, and other domains. This paper aims to unveil the power of CNNs through applied computational intelligence techniques for arrhythmia detection from ECG signals [2].
Traditional methods for arrhythmia detection often rely on manual feature engineering, which can be time-consuming, subjective, and limited in its ability to capture subtle patterns in the ECG signals [3]. In contrast, CNNs offer the potential to automatically learn discriminative features directly from the raw ECG data, eliminating the need for handcrafted features. By leveraging the hierarchical and convolutional nature of CNN architectures, it becomes possible to capture both local and global dependencies within the ECG signals, enabling more accurate and efficient arrhythmia detection [4].
The objective of this study is to develop and evaluate a CNN-based approach for arrhythmia detection that leverages the power of computational intelligence [5]. The proposed methodology involves preprocessing the ECG signals to enhance their quality and remove noise interference. Multiple CNN architectures are then designed, optimized, and trained using a large dataset of annotated ECG recordings. The performance of the CNN model is extensively evaluated using confusion matrices, to assess its effectiveness in accurately classifying diverse types of arrhythmias. The contribution of this work lies in harnessing the power of CNNs as applied computational intelligence for automating the process of feature extraction to improve the accuracy and efficiency of arrhythmia diagnosis.
The structure of this work is planned as follows. Section 2 provides a background of the current study. Section 3 describes the methodology of our study. The discussion of experimental results is described in Section 4. Section 5 concludes the main findings.
2. Background
Arrhythmias, or irregular heart rhythms, pose a significant healthcare challenge worldwide. They can manifest in various forms, ranging from harmless palpitations to life-threatening conditions such as ventricular fibrillation [5]. Timely and accurate detection of arrhythmias is crucial for appropriate clinical management and intervention. Electrocardiogram (ECG) signals, which capture the electrical activity of the heart, have long been the cornerstone of arrhythmia diagnosis. ECG-based arrhythmia detection plays a vital role in identifying abnormalities, guiding treatment decisions, and preventing potential complications [6].
Traditionally, arrhythmia detection from ECG signals has relied on manual examination by experienced cardiologists. This process involves visually inspecting the ECG tracings to identify irregularities, subtle waveform changes, or abnormal intervals [7]. However, this subjective and time-consuming approach is prone to inter- and intra-observer variability and may overlook subtle patterns or early signs of arrhythmias. As a result, there is a growing need for automated and objective methods to improve the efficiency and accuracy of arrhythmia detection [8].
Recent advancements in computational intelligence, particularly machine learning, and deep learning techniques, have shown great promise in the field of ECG-based arrhythmia detection. These methods leverage the power of algorithms to analyze large volumes of ECG data, extract meaningful features, and classify arrhythmias accurately [9]. By automating the analysis process, computational intelligence techniques offer the potential for faster, more consistent, and highly scalable arrhythmia detection solutions. Moreover, these techniques can learn complex patterns and relationships within ECG signals that may elude manual inspection, thereby enabling the detection of arrhythmias at an early stage and improving patient outcomes [10].
3. Methodology
In this section, we present a detailed description of the methodology employed to unveil the power of CNNs in applied computational intelligence for arrhythmia detection from ECG signals. The methodology encompasses a series of carefully designed steps, CNN architectures development, training, and evaluation.
3.1. ECG Denoising
The Discrete Wavelet Transform (DWT) is a powerful mathematical tool that decomposes a signal into different frequency components using wavelet basis functions [15]. It operates by convolving the signal with a set of wavelet filters at various scales and positions. The DWT decomposes the ECG signal into approximation coefficients (A) and detail coefficients (D) at various levels of decomposition. Mathematically, this can be represented as:

where X is the original ECG signal, 𝑁 is the level of decomposition, 𝐴𝑗 represents the approximation coefficients at level 𝑗, and 𝐷𝑗 represents the detail coefficients at level 𝑗. To denoise the ECG signal using DWT, the detail coefficients are analyzed and thresholded. The thresholding step involves applying a threshold value (T) to the detail coefficients, selectively reducing the magnitude of coefficients that fall below the threshold. The thresholding operation can be expressed mathematically as:
0, otherwise (2) denoised represents the denoised detail coefficients at level j.
where𝐷𝑗
After denoising the detail coefficients, the denoised ECG signal is reconstructed by combining the modified detail coefficients with the original approximation coefficients. The reconstruction process is performed by applying the inverse DWT (IDWT) to the modified coefficients. Mathematically, the denoised signal (X^{\text{denoised}}) can be obtained as:
denoised ) (3) By employing thresholding on the detail coefficients and reconstructing the denoised signal using the modified coefficients, DWT provides a mathematical framework for effectively denoising ECG signals. The selective attenuation of noise components through thresholding allows for the preservation of key features and arrhythmia patterns in the denoised signal, contributing to improved accuracy in arrhythmia detection algorithms.
denoised , 𝐷1
3.2. CNNet
One promising approach for arrhythmia detection from ECG signals is the utilization of 1D Convolutional Networks (CNNs). This subsection argues the design of simple CNNs called CNNet as an extension to the sequential data, including time-series signals such as ECG. The CNNet is designed as a sequence of multiple layers of 1D convolutional and pooling operations, followed by a flattened layer, dropout layer, and two fully connected layers with 𝑆𝑜𝑓𝑡𝑀𝑎𝑥activation. The input to the network is a 1D signal of length 360, representing a segment of an ECG signal. The output of the network is a probability distribution over five classes of arrhythmia. The first layer of the network is a 1D convolutional layer with 16 filters, a kernel size of 13, and a ReLU activation function. This layer is followed by a 1D average pooling layer with a pool size of 3 and stride of 2, which reduces the dimensionality of the feature maps and helps to prevent overfitting. The second and third layers are like the first layer but with 32𝑎𝑛𝑑64 filters respectively, and larger kernel sizes of 15 and 17. The fourth layer has 128 filters and a kernel size of 19. After the convolutional layers, the output is flattened and passed through a dropout layer with a rate of 0.5, which randomly drops out half of the neurons to improve generalization and reduce overfitting. The flattened output is then fed into two linear layers, in which the latter has 𝑆𝑜𝑓𝑡𝑀𝑎𝑥 activation, which outputs the probability distribution over the five arrhythmia classes. To prevent overfitting, the linear layers are regularized with L2 regularization with a regularization parameter of 0.0001.
3.3. ALexNet
To adapt the powerful convolutional architecture of AlexNet, originally designed for image classification, to the task of arrhythmia detection from ECG signals, we propose a carefully tailored one-dimensional edition. The original AlexNet architecture consists of five convolutional layers, followed by max-pooling layers, fully connected layers, and a softmax layer for classification [16]. However, since ECG signals are one-dimensional temporal sequences, we need to modify the architecture to effectively capture the unique characteristics of these signals. In our onedimensional edition of AlexNet, we replace the 2D convolutional layers of the original architecture with 1D convolutional layers. These layers perform convolutions along the time axis of the ECG signal, capturing the temporal dependencies and patterns inherent in arrhythmias. By using different filter sizes in the convolutional layers, we can capture both local and global features at different scales, enhancing the model's ability to discern various arrhythmia patterns. Additionally, the pooling layers in the one-dimensional edition of AlexNet are modified to operate on the temporal axis, reducing the spatial dimensionality of the feature maps while preserving the relevant temporal information. The fully connected layers at the end of the network are adapted to incorporate the extracted features from the 1D convolutional layers, allowing for robust arrhythmia classification. Finally, a softmax layer is employed to assign probabilities to different arrhythmia classes, enabling accurate diagnosis based on the ECG input.
3.4. VGG16
To adapt the renowned VGG16 architecture, originally designed for image classification, to the task of arrhythmia detection from ECG signals, we propose a carefully crafted one-dimensional edition. The VGG16 architecture is known for its deep and symmetric structure, consisting of multiple convolutional layers, followed by max-pooling layers and fully connected layers. To make it suitable for processing ECG signals, which are one-dimensional temporal sequences, we need to make appropriate modifications to capture the temporal patterns indicative of arrhythmias. In our one-dimensional edition of VGG16, we replace the 2D convolutional layers with 1D convolutional layers. These layers operate along the time axis of the ECG signal, allowing the network to capture the temporal dependencies and patterns specific to arrhythmias. By employing filters of diverse sizes in the 1D convolutional layers, we can effectively capture both local and global features, enhancing the model's ability to recognize different arrhythmia patterns across various temporal scales. The pooling layers in the one-dimensional edition of VGG16 are adapted to perform temporal pooling, reducing the spatial dimensionality while retaining the crucial temporal information in the feature maps. This preserves the meaningful ECG characteristics relevant for arrhythmia detection. The linear layers at the end of the network are modified to incorporate the extracted features from the 1D convolutional layers, enabling the model to make accurate arrhythmia predictions.
3.5. ResNet
In our methodology, we propose the introduction of a one-dimensional edition of ResNet (Residual Network) for robust arrhythmia detection from ECG signals. ResNet [17] is a renowned deep learning architecture known for its skip connections, which alleviate the vanishing gradient problem and enable the training of extremely deep networks. By adapting ResNet to the one-dimensional nature of ECG signals, we aim to leverage its depth and residual connections to effectively capture the intricate temporal patterns indicative of arrhythmias. In our one-dimensional edition of ResNet, we modify the original 2D convolutional layers to 1D convolutional layers, enabling the network to process ECG signals as one-dimensional temporal sequences. We retain the residual connections, which facilitate the propagation of gradients through the network, thereby enabling the training of deeper architectures. The residual connections allow the network to learn and refine residual features, allowing for a better representation of complex ECG patterns associated with different arrhythmia classes. Furthermore, our one-dimensional ResNet introduces temporal pooling layers after the convolutional blocks. These pooling layers reduce the spatial dimensionality along the temporal axis while preserving the essential temporal information, aiding in the extraction of discriminative features. The pooling operation helps in capturing relevant temporal patterns at different scales, allowing the network to learn hierarchical representations of the ECG signals.
3.6. LeNet
In our methodology, we explore the design of a one-dimensional edition of LeNet for effective arrhythmia detection from ECG signals. LeNet [18] is a classic convolutional neural network architecture that has been widely used for image recognition tasks. By adapting LeNet to the one-dimensional nature of ECG signals, we aim to leverage its simplicity and effectiveness to capture relevant temporal patterns indicative of arrhythmias. In our one-dimensional edition of LeNet, we modify the original 2D convolutional layers to 1D convolutional layers to process the ECG signals as one-dimensional temporal sequences. Furthermore, we introduce pooling layers after the convolutional layers to down sample the feature maps, reducing the spatial dimensionality while retaining important temporal information. This helps in summarizing the learned features and improving computational efficiency. The pooled features are then fed into fully connected layers, which integrate the learned representations and enable the accurate classification of arrhythmias.
4. Experimental Analysis
In this section, we debate the main installations and preparation made to conduct experiments of this work. In particular, the following subsection debates the dataset description, the environmental setup, the evaluation indicators, and the hyper-parameters.
4.1. Dataset Description
The experiments of this study used the MIT-BIH Arrhythmia dataset to train and evaluate the DL models. The MITBIH data comprises forty-eight half-hour pieces of two-channel ambulant ECG records, taken from 47 individuals examined between 1975 and 1979 at the BIH Arrhythmia Lab. A sample of twenty-three records was arbitrarily selected from a group of 4000 daily ambulant ECG tapes recorded from a mixture of inpatients and outpatients at Boston's Beth Israel medical center. The leftover twenty-five records were also carefully chosen from the abovementioned populations to incorporate less popular yet medically considerable arrhythmias that would not be well-characterized in a tiny arbitrary sample. In MIT-BIH data, the ECG records were digitalized at 360 trials per
second by 11-bit resolution across a 10-mV scale. The annotation of ECG records was independently performed with more than two cardiologists annotating each record; in which the conflicts were solved to attain the computerized source annotations for each knock contained in the dataset. Figure 1 shows a sample of ECG records from MIH-BIH under different scenarios.
4.2. Environmental setup
The design of all experiments is performed in a Python 3.7 environment, in which the sk-learn is used to implement, train, and evaluate the deep learning models. All these setups are performed on the Dell Workstation equipped with 16 RAM, and Intel(R) Xeon (TM) CPU 3.20GHz CPU and operated with Windows 10 operating system.
4.3. Evaluation Indicators
To assess the performance of the proposed approach, this section debates the performance indicators adopted in our experiments. Confusion matrix is a common evaluation indicator that has been used in classification tasks, hence, it is adopted as the essential indicator in our experiments.
To assess the performance and training dynamics of the proposed CNN architectures for arrhythmia detection from ECG signals, we conducted a comprehensive learning curve analysis. The learning curve provides insights into the model's convergence, generalization, and potential issues such as overfitting or underfitting (Figures 2-6).
In our analysis, we divided the available dataset into training and validation sets, typically using a standard split ratio such as 80% for training and 20% for validation. We trained the CNN architectures using the training set and monitored the training and validation accuracy and loss metrics across multiple epochs. The learning curve plots the changes in
these metrics as the model progresses through the training process. During the initial epochs, the learning curves of the CNN architectures exhibit a rapid improvement in both training and validation accuracy, indicating effective learning from the training data. As the training progresses, the model's performance on the validation set reaches a plateau, while the training accuracy continues to improve. This divergence between the training and validation curves suggests the presence of overfitting, where the model becomes overly specialized to the training data and struggles to generalize well to unseen ECG signals.
To address overfitting, we employed regularization techniques such as dropout and weight decay, which help in reducing the model's complexity and prevent excessive memorization of the training data. By observing the visualized learning curves after applying regularization, we can determine if the model achieves better generalization by reducing the gap between the training and validation accuracy. Additionally, the visualized learning curves can provide insights into the optimal number of epochs for training the CNN architectures. If the validation accuracy reaches a plateau and shows no significant improvement with further training, it indicates that the model has converged, and training for more epochs may lead to overfitting. On the other hand, if both the training and validation accuracies are low and continue to increase with more epochs, it suggests that the model may still be underfitting and requires further training.
To evaluate the performance and effectiveness of the proposed CNN architectures for arrhythmia detection from ECG signals, we conducted a comprehensive analysis using the confusion matrix (see Figure 7-11). The confusion matrix provides valuable insights into the classification accuracy and potential misclassifications of the models. The visualized confusion matrix is a square matrix that summarizes the predicted and actual labels for each class in a tabular format. Each row of the matrix represents the instances in the actual class, while each column represents the instances in the predicted class. The diagonal elements of the matrix correspond to the correctly classified instances, while the off-diagonal elements represent misclassifications. Analyzing the confusion matrix allows us to assess the model's accuracy for each arrhythmia class and identify any patterns or trends in misclassifications. By examining the confusion matrix and the associated performance metrics, we can identify which arrhythmia classes are more prone to misclassifications and understand the specific challenges faced by CNN architectures. This analysis helps in finetuning the models, identifying potential sources of errors, and improving the accuracy of arrhythmia detection.
5. Conclusion
In this paper, we have explored the application of computational intelligence techniques, specifically CNNs, for arrhythmia detection from electrocardiogram (ECG) signals. We presented a comprehensive study on the design and evaluation of one-dimensional editions of popular CNN architectures, including LeNet, VGG16, and ResNet, tailored specifically for analyzing ECG data. Through our experiments and analysis, we have demonstrated the efficacy and potential of CNNs in accurately detecting arrhythmias from ECG signals. We have also discussed the importance of preprocessing techniques, such as discrete wavelet transform (DWT), for denoising ECG signals, and improving the quality of input data for CNN-based arrhythmia detection. The integration of DWT as a preprocessing step enhances the robustness and reliability of the CNN models, enabling them to focus on the salient features and patterns indicative of arrhythmias. The experimental findings underscore the power and potential of computational intelligence, specifically CNNs, in arrhythmia detection from ECG signals.
As the field of computational intelligence and deep learning continues to evolve, we anticipate further advancements in arrhythmia detection, including the integration of multi-modal data and the exploration of more sophisticated architectures. With ongoing research and development, computational intelligence-based approaches hold great promise for revolutionizing arrhythmia diagnosis and making significant contributions to the field of healthcare.