Abstract
Cardiovascular diseases are characterized by sudden onset, high mortality rates, and high recurrence rates, making early screening and timely intervention essential. However, due to insufficient medical resources, real-time and refined electrocardiogram monitoring of patients is difficult to implement. Meanwhile, the complex spatiotemporal features of electrocardiogram (ECG) signals bring challenges to multidimensional feature mining and accurate recognition. Therefore, in this study, we propose a three-level risk stratification algorithm for arrhythmia, which not only ensures precise intervention for different types of arrhythmias to achieve optimized allocation of medical resources but also comprehensively captures the spatiotemporal features of ECG signals for high-accuracy risk stratification detection. The algorithm first proposes a three-level arrhythmia risk stratification scheme, classifying cases as Normal, Not Life-threatening, and Life-threatening, with corresponding intervention measures of no need for monitoring, close attention, and immediate intervention, respectively. The core model of this algorithm is a deep learning fusion network based on the palindromic structure of Convolutional Neural Network (CNN) and Long Short-Term Memory network (LSTM), which enables precise three-level risk detection for all types of arrhythmias. Experimental results demonstrate that the algorithm exhibits favorable generalization performance across multiple datasets. It not only outperforms standalone CNN and LSTM models but also surpasses classical classifiers. Notably, on the 2-second ECG segments from the gold-standard dataset, it achieves an accuracy of 99.68% and a Specificity of 99.65%.The 10-fold cross-validation yields an accuracy of 99.62% ± 0.09% for 3-second segments, and patient-level validation on 10-second segments achieves an accuracy of 96.5%. The satisfactory results across varied segment lengths verify the reliability and practicality of the proposed method. In both arrhythmia risk stratification and detection tasks, the algorithm presents moderate competitive advantages.
Keywords: Arrhythmias risk detection, Risk stratification algorithm, Convolutional Neural Network, Long Short-Term Memory network, Palindromic structure
Introduction
Cardiovascular diseases occur with randomness and suddenness, making them the leading life-threatening killer, characterized by acute onset, high mortality, and high recurrence rates, thus requiring early detection, diagnosis, and treatment [1]. In clinical practice, electrocardiograms (ECG) are a vital tool for diagnosing and monitoring cardiovascular diseases [2]. However, due to limited medical resources, ECG backlogs have become a widespread issue, placing a heavy ECG interpretation burden on physicians and delaying timely responses to critical cases. Addressing the significant challenge of ensuring timely treatment of cardiovascular emergencies within healthcare systems, the most effective strategy involves establishing standardized ECG grading criteria to optimize risk stratification, introducing artificial intelligence-assisted diagnosis, and developing an ECG early warning system. Artificial intelligence, machine learning and deep learning possess powerful nonlinear fitting capabilities. They can automatically extract high-dimensional features and model time-series signals, assisting physicians in rapid ECG waveform interpretation, arrhythmia screening and disease risk assessment, and effectively improving the efficiency and accuracy of early screening and clinical diagnosis of cardiovascular diseases.
In the field of AI-assisted diagnosis, the majority of research focuses on detecting specific arrhythmia types and lack grading [3, 4]. A minority of studies target the detection of critical arrhythmias, employing a two-level classification into critical and non-critical categories [5–7], or focus on detecting specific critical types [8, 9], However, arrhythmias are complex and vary widely in severity, ranging from mild rhythm abnormalities to life-threatening ventricular arrhythmias, all of which require clinical attention. Existing methods fail to meet the practical needs of clinical risk assessment and hinder the refined allocation and rational scheduling of medical resources. Therefore, a comprehensive grading system is urgently needed to accurately identify normal, non-life-threatening, and life-threatening arrhythmias. This can effectively address the limitations of single-level and incomplete coverage in current research, while providing reliable technical support for early clinical warning, tiered intervention, and optimized allocation of medical resources.
Currently, the most widely used ECG auxiliary diagnosis models are predominantly based on Convolutional Neural Networks (CNN) and Long Short-Term Memory (LSTM) networks. CNN employ convolutional kernels for local receptive fields, effectively capturing local features and detailed information. Through the use of multiple convolutional and pooling layers, they hierarchically extract abstract features from low-level to high-level representations. Consequently, Alin et al. [10] utilized 2D CNN for arrhythmia detection based on ECG signals, while Bollepalli et al. [11] proposed a CNN-based algorithm for real-time arrhythmia detection. This hierarchical feature extraction approach of CNN, characterized by spatial invariance, enables learning spatial features across different frequencies. However, CNNs exhibit a limited capacity for capturing long-term dependencies. LSTM networks, in contrast, leverage internal memory cells and gating mechanisms (including input, forget, and output gates) to effectively learn temporal correlations and trends within sequences. This makes them particularly adept at handling long time-series data and tasks requiring modeling of long-term dependencies. For instance, Boda et al. [12] proposed and demonstrated a novel framework for patient-specific ECG beat classification using LSTM-based RNN, and Wang [13] proposed a modified bidirectional LSTM (MB-LSTM) network for recognizing atrial fibrillation (AF) and atrial flutter (AFL) signals. Although LSTM excel at extracting contextual features from ECG data, they suffer from higher computational costs, longer training times, and inferior spatial feature extraction capabilities compared to CNN [14].
ECG signals are inherently time-dependent bioelectrical signals characterized by specific waveform patterns. A comprehensive and multi-level extraction of both spatial (i.e., waveform morphology) and temporal (i.e., dynamic variations over time) features from ECG signals is crucial for enhancing model performance in diagnostic and predictive applications. Such an integrated feature extraction strategy enables more accurate capture of ECG signal information, thereby improving model generalizability and accuracy. Consequently, many studies have explored the fusion of CNN and LSTM architectures. The prevalent fusion architectures typically employ single-layer integration, primarily following either a CNN-LSTM approach (where CNN precedes LSTM). Examples include Venkatesh et al.‘s CNN-CNN-CNN-BiLSTM model for atrial arrhythmia detection [15], Petmezas et al.‘s CNN-CNN-CNN-LSTM framework for atrial fibrillation identification [16], and Shi et al.‘s CNN-LSTM architecture for 15-class arrhythmia classification [17]. Alternatively, some adopt an LSTM-CNN structure, as demonstrated by Liu et al.‘s attention-based hybrid LSTM-CNN model for multi-class arrhythmia detection [18]. While effective, such single-layer fusion may compromise fine-grained feature representation when processing complex spatiotemporal patterns. In contrast, the multi-layer CNN-LSTM fusion structure gradually expands the spatiotemporal receptive field and steadily captures complex spatiotemporal correlations and dynamic variations [19]. CNN-LSTM has been widely applied in ECG detection in existing studies, yet most models lack multi-layer alternating stacking design. Accordingly, this paper establishes a multi-layer fusion diagnostic prediction model. Adopting the CNN-LSTM-CNN-LSTM-CNN palindrome hierarchical structure, it excavates ECG spatiotemporal features comprehensively and multidimensionally.
In summary, to ensure timely and appropriate medical attention for all patients, this study proposes a three-level risk stratification algorithm for arrhythmia that effectively addresses healthcare resource constraints and allocation optimization. Furthermore, we introduce a CNN-LSTM palindrome network architecture for comprehensive multi-level spatiotemporal feature extraction, resolving the accuracy limitations in existing deep learning-based arrhythmia diagnostic methods caused by incomplete feature representation.
The contributions of this study: (1) A three-level cardiac arrhythmia risk classification system was constructed by considering the severity of the arrhythmia condition, the impact on hemodynamics, and the demand for medical resource allocation.
(2) A three-level cardiac arrhythmia risk detection algorithm PaliConvLSTM based on the fusion layer of palindrome structure CNN-LSTM was proposed, seamlessly integrating the morphological features extracted by CNN into the LSTM time-series processing framework.
Chapter 2 comprehensively elaborates on the overall process of the algorithm, the data preprocessing methods, and the network model structure. Chapter 3 introduces the publicly available dataset used in the research, explains the data sample processing plan, and conducts a comparative analysis of related models. Chapter 4 conducts a comprehensive analysis and verification of the experimental results of the proposed algorithm. Chapter 5 compares and demonstrates the experimental results of this paper with existing related research achievements. Chapter 6 summarizes the research work of the entire paper and presents prospects and ideas for future research directions.
Method
Overview
This study first preprocesses the electrocardiogram signal database and divides it into training and testing sets, then constructs and trains a deep learning model based on a CNN-LSTM palindrome architecture, optimizes parameters using the training set, and evaluates performance on the testing set. As shown in Fig. 1, the proposed flow diagram of the three-level arrhythmia risk classification algorithm based on CNN-LSTM palindromic structure comprises three key components:
Fig. 1.

The flow diagram of the three-level classification algorithm for arrhythmia risk based on CNN-LSTM palindromic structure
Data Preprocessing: Raw ECG signals undergo systematic processing to obtain fixed-length rhythm-specific segments for model training.
Model Building: The proposed three-level arrhythmia risk classification model consists of CNN, LSTM, and fully connected layer. The multi-scale spatiotemporal features are extracted through the CNN-LSTM-CNN-LSTM hybrid layer, and then the CNN is used to capture the advanced information to generate the final feature map. These feature maps are subsequently classified through the fully-connected layer.
Model Optimization: The model is trained and optimized using training data, with validation performed on test sets. Parameter adjustment repeats until satisfactory accuracy is achieved for clinical arrhythmia risk detection.
Preprocessing
As shown in Fig. 1, the raw ECG signals undergo three preprocessing steps, complete rhythm segment extraction, three-category classification by life-threatening severity, and segmentation into specific-length samples. The implementation details are described below.
Capture the complete rhythm segment
The physiological cardiac rhythm originates from the sinoatrial node and manifests as sinus rhythm, which is considered the standard normal electrocardiographic pattern in healthy individuals. Deviation from normal electrical conduction patterns disrupts cardiac periodicity and rhythmicity, thereby inducing arrhythmias characterized by aberrant electrophysiological activity. To facilitate model learning and feature recognition, it is essential to extract specific rhythm segments individually. Therefore, the first step in data preprocessing involves isolating complete segments of specific rhythm types based on annotations from publicly available ECG databases. Figure 2 displays an ECG segment containing both ventricular tachycardia (labeled as “(VT”) and atrial fibrillation (labeled as “(AFIB”) rhythms. The segmentation process involves dividing the waveform along the indicated blue markers to isolate complete VT and AFIB rhythm segments for analysis.
Fig. 2.

An example of ECG segment
-
2.
Classified into three categories based on life-threatening degree
Malignant ventricular arrhythmias, namely “ventricular flutter”, “ventricular tachycardia” and “ventricular fibrillation”, can cause severe hemodynamic changes, easily lead to sudden cardiac death, and are of extremely high urgency and require immediate response. Common arrhythmias such as atrial bigeminy, ventricular bigeminy, and 2° heart block do not endanger life in a short time, but also need to be focused on. Therefore, considering factors such as urgency and medical resource allocation, this paper proposes a three-level classification scheme for arrhythmia risks. The specific classification method is shown in Table 1. “Normal sinus rhythm” is separately classified into the normal category (labeled as “normal”); “ventricular flutter”, “ventricular tachycardia” and “ventricular fibrillation” are classified into the critical category (labeled as “Life-threatening”), which requires real-time response and immediate intervention; the remaining common arrhythmias are classified into the key concern category (labeled as ”Not Life-threatening”), which does not require immediate intervention but needs to be focused on [20, 21]. This risk classification scheme can not only take into account all arrhythmia diseases of different levels of criticality, but also enable the optimal allocation of medical resources.
Table 1.
The three - level classification scheme for arrhythmia risks
| Risk Ranking | Risk stratification | Arrhythmia | Clinical intervention measures |
|---|---|---|---|
| 0 | Normal | Normal sinus rhythm | No intervention required |
| 1 | Not Life-threatening |
(AB-Atrial bigeminy (B-Ventricular bigeminy (BII-2° heart block (IVR-Idioventricular rhythm (P-Paced rhythm (T-Ventricular trigeminy …… |
special attention.required |
| 2 | Life-threatening |
(VFL-Ventricular flutter (VT-Ventricular tachycardia (VF-Ventricular fibrillation |
Immediate intervention required |
-
3.
Divide into specific length segments
To facilitate the analysis and comparison of model performance, the complete rhythm segments are cut into fixed - length ECG segments, such as 2s, 3s, 5s, 8s and 10s. Eventually, a time - series dataset is formed, which contains both temporal and spatial characteristic information. The data structure is shown by Eq. (1).
![]() |
1 |
Where n represents the dimension, the frequency of the ECG data is H, and the duration is t, then n=H*t. m is the data volume of the dataset, where
represents the amplitude of the i-th data point at the j-th time point.
PaliConvLSTM: Palindrome-structured CNN-LSTM classification algorithm for arrhythmia three level risk detection
As a complex physiological signal, the ECG signal demonstrates the continuous evolution of cardiac electrical activity, including the sequential and morphological changes of its sub - waves (such as the P - wave, QRS complex, T - wave, etc.). These changes are a direct reflection of cardiac electrophysiological activities and contain abundant physiological and pathological information. Thus, an effective risk - detection model not only needs to precisely capture the temporal dynamics of the signal but also has to thoroughly understand the spatial morphological characteristics of the signal. CNN can successfully extract rich morphological features from the data, while LSTM networks are adept at capturing and analyzing the temporal patterns of these features over time [22, 23]. Accordingly, this paper adopts the CNN-LSTM-CNN-LSTM-CNN palindrome hierarchical architecture and establishes an arrhythmia risk detection algorithm based on CNN-LSTM fusion layers, named PaliConvLSTM. With multi-dimensional and multi-level feature extraction capability, it can conduct temporal analysis and spatial morphology recognition simultaneously. The architecture of PaliConvLSTM is shown in Fig. 3.
Fig. 3.

The architecture of PaliConvLSTM
Convolutional Neural Networks (CNN) are a class of deep feedforward neural networks incorporating convolutional computation [24]. They exhibit representation learning capability and perform translation invariant hierarchical classification of input information [25, 26]. As illustrated in Fig. 3, their core mechanism involves feature extraction through convolutional operations, primarily comprising convolutional and pooling layers.
The convolution operation computes the sum of element-wise products between local matrix regions and the corresponding kernel matrix, followed by addition of a bias term, as formalized in Eq. (2).
![]() |
2 |
Where s(i, j) denotes an element of the output feature map S, where X represents the input and W the m×n convolution kernel. Both X and W share identical spatial dimensions. The size of S is computed as formalized in Eq. (3).
![]() |
3 |
where O denotes output size, I denotes input size, F kernel size, S stride length, and P padding amount. To enhance extraction of nonlinear features, we introduce the Rectified Linear Unit (ReLU) activation function for nonlinear transformation, as formalized in Eq. (4).
![]() |
4 |
Pooling operations primarily reduce feature dimensionality and computational complexity while enhancing scale and rotation invariance. This work employs max pooling, which extracts the maximum value within each pooling window as formalized in Eq. (5).
![]() |
5 |
where x denotes the input matrix, which is the result of the above mentioned nonlinear processing using the activation function. k specifies the pooling kernel size, and y constitutes the output matrix. During this operation, for each spatial position (i, j) in the input matrix, the corresponding element in the output matrix is generated by selecting the maximum value within a k×k neighborhood centered at (i, j). The resulting feature map y subsequently serves as input to following network layers.
Long Short-Term Memory (LSTM) networks constitute a recurrent neural network architecture particularly effective for processing and predicting significant events in time series data with long range dependencies [27]. As depicted in Fig. 3, LSTM cells regulate information flow through gating mechanisms, specifically, forget, input, and output gates, where xt represents feature maps from the preceding CNN output.
The Loss function serves to quantify the discrepancy between the model’s predictions and the true values. Minimizing this loss function enables the model to better fit the training data and enhance predictive accuracy. This study employs the sparse_categorical_crossentropy loss function, as shown in Eq. (6).
![]() |
6 |
where m denotes the number of samples, k represents the number of classes, y denotes the true label of the test sample, and ŷ denotes the predicted label of the test sample.
As illustrated in Fig. 3, the model employs two CNN-LSTM blocks to extract multi-scale spatiotemporal features from the training set. A subsequent CNN captures high-level information, generating the ultimate feature map, which is fed into a fully connected layer for feature integration and classification. The specific workflow is as follows. The dataset is first input into a convolutional neural network (CNN) to extract key spatial features. The resulting features are then passed to a long short-term memory network (LSTM) to extract key temporal features. This feature information subsequently undergoes further processing through additional CNN and LSTM layers to extract spatiotemporal features at distinct scales. The extracted spatiotemporal features are then input into a final CNN layer to capture high level information and generate the ultimate feature maps. Finally, these features are fed into the fully connected layer for consolidation and classification. Given that this architecture follows the sequence “CNN-LSTM-CNN-LSTM-CNN”, it is designated as a palindromic structure. This structural design enables the spatial morphological features of electrocardiogram waveforms extracted by CNN to be seamlessly integrated into the LSTM temporal modeling framework. Through the alternating nested and progressively progressive structural pattern of “CNN-LSTM-CNN-LSTM-CNN”, multi-scale spatial features and temporal rhythm information can be hierarchically coupled and iteratively optimized.
Experimental settings
Dataset
ECG databases
This study utilizes three databases for experimentation, the MIT-BIH Malignant Ventricular Arrhythmia Database (VFDB) [28, 29], the MIT-BIH Arrhythmia Database (MITDB) [30, 29], and the Creighton University Ventricular Tachyarrhythmia Database (CUDB) [31, 29]. The descriptions of these databases are provided below.
VFDB: The MIT-BIH Malignant Ventricular Arrhythmia Database, is provided by the Massachusetts Institute of Technology. This database comprises 22 half-hour ECG recordings, encompassing malignant ventricular arrhythmias such as ventricular fibrillation (labeled as “VF”), ventricular flutter (labeled as “VFL”), and ventricular tachycardia (labeled as “VT”). The data were digitized at a sampling rate of 360 samples per second, with 11-bit resolution within a ± 10 mV range.
MITDB: The MIT-BIH Arrhythmia Database, was jointly established by the Massachusetts Institute of Technology and Beth Israel Hospital. This database contains 48 half-hour two lead ECG recordings. Data were digitized at 360 samples per second with 11-bit resolution within a ± 10 mV range. It encompasses a wide spectrum of clinically significant arrhythmias, including Atrial bigeminy, Ventricular bigeminy, 2° heart block, Idioventricular rhythm, Nodal (A-V junctional) rhythm, Paced rhythm, and Ventricular trigeminy. Although the proportion of life-threatening arrhythmias is relatively low, the database reflects the distribution characteristics of clinical arrhythmia types, thereby offering significant value for real world scenario validation.
CUDB: The Creighton University Ventricular Tachyarrhythmia Database, originates from Creighton University, USA. This database contains 35 single-lead ECG recordings, each approximately 8 min in duration. It covers malignant ventricular arrhythmias including sustained ventricular tachycardia (labeled as “VT”), ventricular flutter (labeled as “VFL”), and ventricular fibrillation (labeled as “VF”). The data were digitized at a sampling rate of 250 samples per second, with 12-bit resolution within a ± 10 mV range.
Data preprocessing
For the three experimental databases, data preprocessing is carried out strictly in accordance with the procedure described in section “Preprocessing”. First, based on the rhythm annotation information, complete rhythm segments corresponding to various arrhythmia types are extracted from the first lead of each database listed in section “ECG databases” in a unified manner. For analytical and experimental purposes, these segments are then segmented into fixed durations of 2s, 3s, 5s, 8s and 10s. Subsequently, these fixed segments are labeled according to the three-level arrhythmia risk classification scheme normal, Not Life-threatening, and Life-threatening. The normal class exclusively comprises Normal Sinus rhythm (labeled as “(N”), while the Life-threatening class includes Ventricular Flutter (labeled as “(VFL”), Ventricular Tachycardia (labeled as “(VT”), and Ventricular Fibrillation (labeled as “(VF”). Eventually, after processing, the VFDB formed the VFDBs dataset, the MITDB formed the MITDBs dataset, and the CUDB formed the CUDBs dataset. Each dataset was cut according to the fixed length of the rhythm segments, and datasets with lengths of 2s, 3s, 5s, 8s and 10s were formed again. Meanwhile, in order to verify the generalization performance of the proposed algorithm, the VFDB and CUDB were specifically merged to form the CU - VFDBs dataset. Since the sampling rate of the VFDB is 360 and that of the CUDB is 250, in order to enable them to be trained at the same sampling rate, the VFDB was subjected to equidistant down - sampling processing.The data distribution of the four datasets is shown in Table 2. For instance, the VFDBs 2s subset comprises 22,776 segments, including 8,614 normal, 10,140 Not Life-threatening, and 4,022 Life-threatening rhythms (further categorized as 1,151 (VF, 299 (VFL, and 2,572 (VT instances). For all datasets, one-third of the data was randomly partitioned as the test set, with the remainder constituting the training set.
Table 2.
The data distribution of the four datasets
| Label | Arrhythmia | Dataset | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| VFDBs | MITDBs | CUDBs | CU-VFDBs | ||||||||||||||||||
| 2S | 3S | 5S | 8S | 10S | 2S | 3S | 5S | 8S | 10S | 2S | 3S | 5S | 8S | 10S | 2S | 3S | 5S | 8S | 10S | ||
| Normal | (N | 8614 | 5712 | 3392 | 2097 | 1663 | 10,803 | 6595 | 3959 | 2465 | 1979 | 688 | 456 | 271 | 169 | 132 | 9302 | 6168 | 3663 | 2266 | 1795 |
| Not Life-threatening | Other | 10,140 | 6735 | 4003 | 2468 | 1961 | 11,150 | 7308 | 4231 | 2528 | 1981 | 282 | 188 | 111 | 69 | 54 | 10,422 | 6923 | 4114 | 2537 | 2015 |
| Life-threatening | (VF | 1151 | 765 | 457 | 285 | 225 | ─ | ─ | ─ | ─ | ─ | 1875 | 1244 | 736 | 451 | 353 | 5909 | 3900 | 2295 | 1404 | 1102 |
| (VFL | 299 | 185 | 94 | 54 | 36 | 69 | 44 | 26 | 15 | 12 | |||||||||||
| (VT | 2572 | 1697 | 1005 | 612 | 487 | 71 | 38 | 19 | 11 | 8 | 12 | 9 | 3 | 2 | 1 | ||||||
| sum | 4022 | 2647 | 1556 | 951 | 748 | 140 | 82 | 45 | 26 | 20 | |||||||||||
| Sum of all | 22,776 | 15,094 | 8951 | 5516 | 4732 | 22,093 | 13,985 | 8235 | 5019 | 3980 | 2857 | 1897 | 1121 | 691 | 540 | 25,633 | 16,991 | 10,072 | 6207 | 5272 | |
Annotation: Other indicates other arrhythmias; (N is the annotation label of normal sinus rhythm; VFL is the annotation label of Ventricular flutter; (VT is the annotation label of Ventricular tachycardia; (VF is the annotation label of Ventricular fibrillation
Model preparation and validation
To validate the performance and generalization capability of the proposed PaliConvLSTM algorithm, its performance was benchmarked against both deep learning and traditional machine learning approaches. Consequently, it was first compared against standalone CNN and standalone LSTM models, followed by comparisons with classical machine learning algorithms derived from diverse classification principles. To ensure comprehensive and complete validation, both comparative experiments were conducted across all segments of all datasets. Here, the standalone CNN and standalone LSTM models refer to single-type network models constructed solely from the CNN layers and LSTM layers, respectively, of the PaliConvLSTM model. The selected machine learning algorithms are the rule-based hierarchical decision algorithm Decision Trees [32], the ensemble learning-based Random Forest (RandomForestClassifier) [33], the connectionism-based Multilayer Perceptron (MLPClassifier) [34], the instance-based lazy learning algorithm K-Nearest Neighbors (KNN) [35], and the maximum-margin geometric classifier Support Vector Machine (SVM) [36].
The evaluation metrics employed in this study are Accuracy, Sensitivity, Specificity and Confusion Matrix. Accuracy represents the overall correct prediction probability of the model, as shown in Eq. (7). Sensitivity refers to the probability of correctly identifying normal heartbeat samples, as defined in Eq. (8). Specificity denotes the probability of accurately detecting all abnormal arrhythmia samples covering Not Life-threatening and Life-threatening cases, as defined in Eq. (9). In the confusion matrix, it represents the proportion of actual negative samples that are correctly identified, characterizing the model’s performance in detecting abnormal heartbeats. From a clinical perspective, the detection of abnormal arrhythmias carries greater early warning value than identifying normal cardiac signals. Therefore, Accuracy is used to evaluate the comprehensive performance of the model, Sensitivity is adopted to assess its recognition ability for normal rhythm samples, and Specificity is applied to reflect the model’s capacity to screen out various arrhythmia abnormalities. In this study, the normal class is designated as the Positive class (P), and both Not Life-threatening and Life-threatening arrhythmia classes are collectively defined as the Negative class (N).
![]() |
7 |
where TP (True Positive) denotes the number of samples correctly detected as normal, TN (True Negative) denotes the number of samples correctly detected as either Not Life-threatening or Life-threatening.
![]() |
8 |
where P denotes the total number of actual normal samples.
![]() |
9 |
where N denotes the total number of actual Not Life-threatening and Life-threatening samples.
Experiment setup
Experiments are implemented based on Python and TensorFlow 2.6, with hardware configured as an NVIDIA GeForce RTX 4060 GPU and 16 GB RAM. The Adam optimizer (learning rate set to 0.001) and sparse categorical cross-entropy loss are used for training, with a maximum of 100 epochs. Early stopping, learning rate decay, and best model saving strategies are employed to prevent overfitting, with patience values set to 10 and 3, respectively. Model performance is comprehensively evaluated using multiple metrics including accuracy, sensitivity, and specificity.
Experimental results
Cross-database multi-scale performance comparison
Validation of model accuracy and generalization requires testing across multiple independent databases. To assess PaliConvLSTM’s generalizability and adaptability to data from heterogeneous acquisition configurations, we evaluated its detection performance on 16 multi-scale ECG segment datasets derived from three databases. Table 3; Figs. 4, 5 and 6 present PaliConvLSTM’s accuracy (ACC), Sensitivity (SE), Specificity (SP) and confusion matrices.
Table 3.
Cross-database multi-scale performance comparison of PaliConvLSTM
| Dataset | ACC(%) | ||||
|---|---|---|---|---|---|
| 2s | 3s | 5s | 8s | 10s | |
| MITDBs | 99.68 | 99.69 | 99.33 | 99.51 | 99.70 |
| CUDBs | 90.56 | 90.90 | 90.81 | 89.95 | 88.59 |
| VFDBs | 96.22 | 97.18 | 97.29 | 97.52 | 95.56 |
| CU-VFDBs | 95.07 | 95.57 | 95.63 | 96.29 | 95.41 |
Fig. 4.

Sensitivity distribution of PaliConvLSTM across segments in multiple datasets
Fig. 5.

Specificity distribution of PaliConvLSTM across segments in multiple datasets
Fig. 6.

Confusion matrices of the PaliConvLSTM model on different datasets
As evidenced in Table 3, MITDBs achieved peak accuracy exceeding 99.50% for all segments. VFDBs and CU-VFDBs maintained accuracy above 95%, while CUDBs consistently reached at least 90%. Performance improved with increasing ECG segment length across CUDBs, VFDBs, and CU-VFDBs, while MITDBs maintained consistently high accuracy regardless of length.
Given the heightened clinical significance of both normal rhythm recognition and pathological arrhythmia screening, we report both Sensitivity and Specificity.
As evidenced in Fig. 4, the proposed method achieves high and stable sensitivity (normal rhythm detection) across all datasets and different segment lengths. MITDB consistently demonstrates excellent sensitivity above 99% for various segment durations, indicating strong robustness in identifying normal heartbeats. The sensitivity of CUDB significantly improves with increasing segment length, rising from 69.60% at 2s to 91.89% at 10s. The combined dataset CU-VFDBs, merging VFDBs and CUDBs, also attains high and stable sensitivity.
Meanwhile, Specificity (pathological arrhythmia detection) also achieved high performance, as documented in Fig. 5, with a mean value of 96.78%, surpassing the overall accuracy. MITDBs consistently delivered exceptional Specificity above 99%, demonstrating negligible correlation with segment length.
The algorithm demonstrates robust generalization across three independent databases and their composite datasets, with superior performance in detecting pathological cases.
Comparison of performance with models of different structures
To verify the performance superiority of the proposed PaliConvLSTM model compared with CNN-CNN-LSTM-LSTM (CCLL), CNN-LSTM-CNN (CNLCN), LSTM-LSTM-CNN-CNN (LLCC), CNN-CNN-CNN-BiLSTM (CCCBiL) [15], CNN-CNN-CNN-LSTM (CCCL) [16], single CNN and LSTM models, comparative experiments are conducted from four dimensions: model type, dataset category, ECG segment length and evaluation indicator. Table 4 summarizes the accuracy comparison results of all models across four datasets and four segment lengths. The comparison data of sensitivity and specificity are presented in Tables 5 and 6.
Table 4.
Accuracy comparison of PaliConvLSTM with other models
| Algorithm | Accuracy (%) | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MITDBs | CUDBs | VFDBs | CU-VFDBs | |||||||||||||||||||||
| 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | |||||
| PaliConvLSTM | 99.68 | 99.69 | 99.33 | 99.51 | 99.70 | 90.56 | 90.9 | 90.81 | 89.95 | 88.59 | 96.22 | 97.18 | 97.29 | 97.52 | 95.56 | 95.07 | 95.57 | 95.63 | 96.29 | 96.29 | ||||
| CCLL | 99.34 | 99.50 | 99.19 | 99.40 | 99.32 | 90.14 | 89.15 | 87.83 | 87.77 | 82.55 | 95.69 | 96.09 | 96.92 | 96.76 | 95.22 | 94.17 | 94.85 | 94.61 | 94.58 | 93.09 | ||||
| CNLCN | 99.51 | 99.50 | 99.19 | 99.40 | 99.40 | 89.50 | 88.68 | 82.97 | 87.77 | 87.25 | 95.74 | 95.91 | 94.65 | 95.99 | 94.73 | 94.10 | 94.20 | 95.25 | 93.50 | 93.66 | ||||
| LLCC | 99.36 | 99.46 | 99.23 | 98.67 | 99.48 | 88.34 | 90.43 | 87.03 | 85.15 | 83.89 | 93.34 | 95.91 | 94.38 | 94.95 | 95.08 | 93.21 | 94.56 | 93.41 | 94.00 | 92.96 | ||||
| CCCBiL | 98.68 | 98.25 | 99.08 | 98.25 | 99.08 | 86.96 | 88.20 | 82.16 | 73.80 | 75.17 | 94.69 | 95.20 | 91.91 | 90.17 | 87.04 | 93.53 | 92.74 | 91.13 | 85.41 | 84.17 | ||||
| CCCL | 98.97 | 98.98 | 97.79 | 95.59 | 93.61 | 85.68 | 88.52 | 81.89 | 62.45 | 61.07 | 94.41 | 95.46 | 93.30 | 91.65 | 90.23 | 77.29 | 71.08 | 70.55 | 59.79 | 79.02 | ||||
| CNN | 99.34 | 99.52 | 99.04 | 99.16 | 97.95 | 88.02 | 84.37 | 86.76 | 86.03 | 85.91 | 93.91 | 94.8 | 93.47 | 93.25 | 93.76 | 92.39 | 92.48 | 93.11 | 91.95 | 93.22 | ||||
| LSTM | 95.54 | 97.57 | 98.75 | 98.97 | 97.49 | 89.61 | 88.2 | 86.76 | 76.86 | 85.23 | 94.90 | 91.85 | 93.87 | 71.55 | 94.53 | 93.76 | 86.5 | 85.5 | 72.04 | 77.2 | ||||
Table 5.
Sensitivity comparison of PaliConvLSTM with other models
| Algorithm | Sensitivity (%) | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MITDBs | CUDBs | VFDBs | CU-VFDBs | |||||||||||||||||||||
| 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | |||||
| PaliConvLSTM | 99.72 | 99.77 | 99.23 | 99.88 | 99.85 | 69.6 | 72.85 | 82.02 | 80.36 | 91.89 | 96.48 | 97.72 | 97.77 | 98.12 | 98.18 | 98.18 | 95.43 | 95.45 | 95.59 | 93.34 | ||||
| CCLL | 99.61 | 99.45 | 98.78 | 99.26 | 99.23 | 72.25 | 66.23 | 75.28 | 71.43 | 43.24 | 96.52 | 94.54 | 97.68 | 97.11 | 95.81 | 94.14 | 95.04 | 95.20 | 93.85 | 90.44 | ||||
| CNLCN | 99.75 | 99.40 | 99.39 | 99.51 | 99.85 | 69.6 | 78.15 | 59.55 | 62.50 | 89.19 | 97.50 | 96.55 | 97.14 | 95.52 | 97.09 | 94.43 | 94.79 | 94.46 | 91.71 | 91.98 | ||||
| LLCC | 99.19 | 99.82 | 99.39 | 99.02 | 99.54 | 63.44 | 72.19 | 89.89 | 57.14 | 59.46 | 94.20 | 96.39 | 94.73 | 94.65 | 95.08 | 94.27 | 95.28 | 93.13 | 92.25 | 95.05 | ||||
| CCCBiL | 98.54 | 97.75 | 98.62 | 98.77 | 99.39 | 57.27 | 71.52 | 62.92 | 30.36 | 29.73 | 94.44 | 95.01 | 94.01 | 91.91 | 88.16 | 93.78 | 91.99 | 89.83 | 82.35 | 85.32 | ||||
| CCCL | 98.91 | 99.04 | 97.17 | 95.70 | 93.42 | 55.95 | 64.24 | 41.57 | ─ | ─ | 93.95 | 96.23 | 93.03 | 92.49 | 91.62 | 74.79 | 58.06 | 60.71 | 56.42 | 79.69 | ||||
| CNN | 99.50 | 99.36 | 99.23 | 99.39 | 96.94 | 71.81 | 54.97 | 68.54 | 60.71 | 78.38 | 95.08 | 95.44 | 94.73 | 95.66 | 91.26 | 93.09 | 92.19 | 93.63 | 93.32 | 90.61 | ||||
| LSTM | 93.49 | 96.60 | 99.23 | 99.14 | 97.40 | 73.57 | 72.85 | 68.54 | 23.21 | 75.68 | 95.60 | 94.48 | 94.82 | 74.86 | 95.45 | 94.56 | 82.27 | 83.71 | 64.30 | 78.84 | ||||
Table 6.
Specificity comparison of PaliConvLSTM with other models
| Algorithm | Specificity(%) | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MITDBs | CUDBs | VFDBs | CU-VFDBs | |||||||||||||||||||||
| 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | 2s | 3s | 5s | 8s | 10s | |||||
| PaliConvLSTM | 99.65 | 99.63 | 99.43 | 99.17 | 99.55 | 97.21 | 96.64 | 93.59 | 93.06 | 87.50 | 96.06 | 96.87 | 97.00 | 97.17 | 93.96 | 95.01 | 95.66 | 95.74 | 96.69 | 96.62 | ||||
| CCLL | 99.09 | 99.55 | 99.57 | 99.53 | 99.39 | 95.81 | 96.43 | 91.81 | 93.06 | 95.54 | 95.19 | 97.03 | 96.46 | 96.55 | 94.85 | 94.19 | 94.74 | 94.28 | 95.00 | 94.63 | ||||
| CNLCN | 99.28 | 99.59 | 99.01 | 99.29 | 98.94 | 95.81 | 92.02 | 90.39 | 95.59 | 86.61 | 94.67 | 95.51 | 93.13 | 96.28 | 93.29 | 93.91 | 93.87 | 95.70 | 94.54 | 94.63 | ||||
| LLCC | 99.52 | 99.14 | 99.08 | 98.34 | 99.39 | 96.23 | 96.22 | 86.12 | 94.22 | 91.96 | 92.81 | 95.61 | 94.17 | 95.13 | 95.08 | 92.61 | 94.15 | 93.57 | 95.00 | 91.75 | ||||
| CCCBiL | 98.82 | 98.69 | 99.50 | 97.75 | 98.79 | 96.37 | 93.49 | 88.26 | 87.86 | 90.18 | 94.84 | 95.32 | 90.63 | 89.11 | 86.35 | 93.39 | 93.17 | 91.87 | 87.16 | 83.50 | ||||
| CCCL | 99.03 | 98.93 | 98.37 | 95.49 | 93.80 | 95.11 | 96.22 | 94.66 | 82.66 | 81.25 | 94.69 | 95.00 | 93.46 | 91.14 | 89.37 | 78.72 | 78.50 | 76.17 | 61.72 | 78.63 | ||||
| CNN | 99.19 | 99.67 | 98.87 | 98.93 | 98.94 | 93.16 | 93.70 | 92.53 | 94.22 | 88.39 | 93.20 | 94.41 | 92.70 | 91.76 | 95.30 | 91.98 | 92.64 | 92.81 | 91.16 | 94.73 | ||||
| LSTM | 97.50 | 98.44 | 98.30 | 98.81 | 97.58 | 94.69 | 93.07 | 92.53 | 94.22 | 88.39 | 94.48 | 90.25 | 93.30 | 69.53 | 93.96 | 93.30 | 88.91 | 86.52 | 76.48 | 76.24 | ||||
As shown in Tables 4, 5 and 6, the multi-database experimental results demonstrate that PaliConvLSTM achieves the optimal performance on the MITDB dataset, followed by VFDBs and CU-VFDB. Differences in sampling frequency between MITDB and CUDB lead to the loss of signal temporal precision, and there is also a large gap in the number of signal samples, resulting in a slight decline in detection indicators [37]. Compared with models such as CCLL and CNLCN, the proposed PaliConvLSTM presents prominent advantages in accuracy, sensitivity and specificity. Specifically, it obtains an accuracy of 99.7% on the 10-second segments of MITDB, a sensitivity of 98.88% on the 8-second segments, and a specificity of 99.68% on the 2-second segments. For the VFDBs dataset, its accuracy reaches 99.68% on the 2-second segments, while the sensitivity and specificity on the 10-second segments are 98.18% and 97.17% respectively. Outperforming the other seven models on nearly all indicators, the proposed model is fully proven to be effective in jointly extracting spatial and temporal features of ECG signals.
Performance evaluation via 10-fold cross-validation
To further evaluate the performance of the PaliConvLSTM model, 10-fold cross-validation was conducted on the MITDB dataset. Model performance was validated using the mean values and standard deviations of accuracy, sensitivity, and specificity.
As shown in Table 7, the mean accuracy of the model from 10-fold cross-validation remained consistently above 99% across different ECG segment lengths. The 3s segment achieved the best performance, with the highest accuracy reaching 99.62% and standard deviations generally below 0.31%, indicating high recognition precision and stability in the overall classification task. Meanwhile, the sensitivity and specificity for the 3s segment also showed outstanding performance, reaching 99.68% and 99.56%, respectively. These results confirm that the model is reliable in identifying abnormal ECG signals and has an extremely low false-positive rate for normal ECG signals.
Table 7.
Mean values and standard deviations of accuracy, sensitivity and specificity of PaliConvLSTM on MITDBs
| Performance | MITDBs | ||||
|---|---|---|---|---|---|
| 2s | 3s | 5s | 8s | 10s | |
| ACC | 99.47 ± 0.13 | 99.62 ± 0.09 | 99.16 ± 0.30 | 99.06 ± 0.31 | 99.38 ± 0.21 |
| SE | 99.62 ± 0.13 | 99.68 ± 0.12 | 99.12 ± 0.39 | 99.40 ± 0.44 | 99.23 ± 0.27 |
| SP | 99.33 ± 0.20 | 99.56 ± 0.12 | 99.19 ± 0.51 | 98.74 ± 0.30 | 99.53 ± 0.32 |
Collectively, the 10-fold cross-validation results not only verify the effectiveness of the PaliConvLSTM model on the MITDB dataset but also demonstrate its good robustness across different ECG segment lengths, providing stable and reliable technical support for three-level arrhythmia risk stratification.
Validation based on patient-level record partitioning
To fully validate the adaptability of the PaliConvLSTM model across different patient samples, the MITDBs dataset was partitioned at the record level to construct training and test sets. Model performance was evaluated using three key metrics: accuracy, sensitivity, and specificity.
as shown in Fig. 7, the model accuracy remained stably above 95% across different ECG segment lengths, with an overall upward trend as the signal length increased. The 10s segment achieved the optimal performance, with an accuracy of 96.50%. Meanwhile, the sensitivity consistently stayed above 99% at all lengths, indicating the model’s stable and reliable ability to identify abnormal ECG signals. The specificity also performed well and improved with longer segment lengths, reaching 95.39% for the 10s segment, which effectively reduced the false positive rate for normal ECG signals.
Fig. 7.

Performance analysis of PaliConvLSTM with different patient record partitioning
Collectively, the validation results based on patient record partitioning demonstrate that the PaliConvLSTM model exhibits good generalization ability and robustness in cross-patient scenarios, providing stable and reliable technical support for three-level arrhythmia risk stratification under different ECG segment lengths.
Performance comparison with classic machine learning algorithms
The previous section analyzed the advantages of the PaliConvLSTM model, which is a CNN-LSTM fusion architecture based on palindrome structures, from a deep learning perspective. This section conducts a comparative analysis of the model’s detection capability and generalization performance against classical machine learning approaches. The evaluation follows a comprehensive framework encompassing multiple models, diverse databases, varying ECG segment lengths, and multiple evaluation metrics. Five classical machine learning algorithms with distinct algorithmic principles were selected for comparison, including Decision Trees (DT), K-Nearest Neighbors (KNN), Multi-Layer Perceptron (MLP), Random Forest (RF), and Support Vector Machines (SVM). Figure 8 present the Accuracy comparisons of six classifiers across four datasets with varying ECG segment lengths, while Fig. 9 display the corresponding Specificity comparisons.
Fig. 8.

Line chart of accuracy for PaliConvLSTM versus classic machine learning algorithms
Fig. 9.

Line chart of specificity for PaliConvLSTM versus classic machine learning algorithms
As clearly shown, the PaliConvLSTM model achieves Accuracy ranges of [89.95%, 99.69%] and Specificity ranges of [93.06%, 99.65%]. In contrast, the other five algorithms exhibit Accuracy ranges of [45%, 90.55%] and Specificity ranges of [29.34%, 90.82%]. This demonstrates that PaliConvLSTM significantly outperforms the classical algorithms in both overall arrhythmia class detection and the detection of abnormal arrhythmia. Furthermore, Figs. 8 and 9 clearly show that PaliConvLSTM exhibits significantly greater stability in both Accuracy and Specificity compared to other algorithms. Its performance consistently exceeds 90% across all datasets, with minimal fluctuations both between datasets and within individual datasets. Conversely, the performance curves of the other algorithms exhibit substantial variability, with significant fluctuations observed both across different datasets and within the same dataset at different segment lengths. Notably, SVM’s Specificity demonstrates particularly high instability on the CU-VFDBs dataset, with a fluctuation range reaching 33%. Traditional machine learning algorithms such as SVM and KNN suffer drastic performance fluctuations, fundamentally due to heavy reliance on manually designed features. Depending on fixed statistical features, these algorithms fail to adapt to data distribution variations caused by high noise and inconsistent segment lengths across databases, resulting in unstable evaluation indicators [38].
These results demonstrate that PaliConvLSTM possesses superior generalization capability across multiple databases, as well as enhanced robustness when processing ECG segments of varying durations, compared to the other algorithms.
Discussion
Addressing the shortage of medical resources in ECG diagnostics, this paper proposes a three-tier arrhythmia risk classification scheme to ensure timely and appropriate care for all patients while optimizing resource allocation. Given the transient, abrupt nature of arrhythmias and rapid morphological evolution of their waveforms, intelligent detection necessitates integrating both temporal and morphological features. Consequently, we introduce a classification model based on a CNN-LSTM palindromic network architecture. This framework classifies arrhythmias into three clinical urgency levels, normal, requiring close monitoring, and requiring immediate intervention. Using a minimal segment length of 2s as an example, Table 8 presents the Accuracy (Acc) and Specificity (Sp) achieved across four datasets. Here, Acc denotes the overall detection accuracy for each dataset, while Sp represents the proportion of correctly detected abnormal samples (i.e., not Life-threatening and Life-threatening arrhythmias). Comparative analysis with the state-of-the-art techniques from 2014 to 2024, as referenced in Table 8, demonstrates the highly competitive performance of our approach across MITDB, VFDB, CUDB and other databases. Our method achieved particularly notable results on MITDB, with 99.68% accuracy and 99.65% Specificity. On VFDB, it attained 96.22% accuracy and 96.06% Specificity. For CUDB, the performance reached 90.56% accuracy and 97.21% Specificity. The hybrid CU-VFDB dataset yielded 95.07% accuracy and 95.01% Specificity, further confirming the robustness of our work across multiple databases.
Table 8.
Performance comparison of the proposed method with other existing methods
| Author/Year | Classifier | Classification scheme | Database | Length of segments(second) | Performance |
|---|---|---|---|---|---|
| (Alonso-Atienza et al. 2014) [39] | Feature Selection and Support Vector Machines |
VF(ventricular fibrillation) Non-VF |
MITDB VFDB CUDB |
8s |
Acc:96.8% Sp: 97.1% |
| (Tripathy et al. 2016) [40] | random forest |
shockable non-shockable |
MITDB VFDB CUDB |
5s |
Acc:97.23% Sp: 97.97% |
| (Cheng and Dong, 2017) [41] | SVM |
shockable non-shockable |
MITDB VFDB CUDB |
8s |
Acc:95.46% Sp: 95.56% |
| (Acharya et al. 2018) [42] | CNN |
shockable non-shockable |
MITDB VFDB CUDB |
2s |
Acc:93.18% Sp: 91.04% |
| (Panda et al. 2020) [43] |
Fixed frequency range empirical wavelet transform (FFREWT) Filter-bank+ CNN |
shockable non-shockable |
VFDB CUDB |
2s |
Acc:97.94% Sp:92.09% |
| (Hammad et al. 2021) [44] | PCA + SVM |
shockable non-shockable |
MITDB VFDB CUDB |
2s | Acc:91.14% |
| (Tripathi et al. 2022) [45] |
High-Resolution Superlet Transform + CNN ///// superlet transformation (SLT) + DenseNet-201 |
healthy heart, AF(atrial fibrillation), VF(ventricular fibrillation) |
MITDB VFDB CUDB AF termi Nation challenge database, Fantasia database |
10s |
Acc:96.20% Acc for AF:97.1% |
| (Kavya and Karuna, 2024) [46] | Dwarf Mongoose Gannet Optimization AlgorithmDeep Neuro-Fuzzy Network (DMGOA-DNFN) |
shockable non-shockable |
VFDB CUDB |
Acc:93.2%, Sp:91.7% Acc:94.0%, Sp:88.4% |
|
| This study 2025 | PaliConvLSTM |
Normal Not Life-threatening Life-threatening |
MITDB VFDB CUDB CU-VFDB |
2s |
Acc:99.68%, Sp:99.65%, Acc:96.22%, Sp:96.06%, Acc:90.56%, Sp:97.21%, Acc:95.07%, Sp:95.01%, |
The advantages of the proposed algorithm are as follows:
Analyzed from the perspective of detection categories, this study focuses on detecting three categories, Normal, Not Life - threatening, and Life - threatening. In contrast, most other works typically detect only two categories, namely shockable and non - shockable. Exceptions include Alonso - Atienza et al. [39], which detects AF and non - AF, and Tripathi et al. [45], which detects healthy, AF, and VF. Evidently, the classification scheme adopted in this work is both comprehensive and targeted, ensuring that each type of arrhythmia receives appropriate attention and intervention.
In this research, 2 - second is selected as the shortest verification time - length unit. Experimental data indicates that, compared with ECG signal segments of the same or longer durations in similar studies, this method exhibits a remarkable competitive edge in terms of performance.
Unlike existing methods requiring manual feature extraction [39–41], signal filtering [43], or waveform reconstruction [45], our framework directly processes raw ECG inputs through the PaliConvLSTM without other processing.
Despite robust overall performance, the model exhibits comparatively lower accuracy (90.56%) on the CUDB dataset relative to other benchmarks.
Conclusion and further research
This study develops a three-level arrhythmia risk stratification system driven by clinical severity, which overcomes the limitations of oversimplified and incomplete grading in existing research. It enables refined classification of arrhythmias across different severity levels and provides a systematic standard for clinical risk assessment. The proposed PaliConvLSTM model leverages a CNN-LSTM palindromic structure to effectively capture spatiotemporal correlations and dynamic features of ECG signals. It achieves an accuracy of 99.68% and a specificity of 99.65% on 2-second MITDB ECG segments, demonstrating favorable performance in arrhythmia risk detection. This study offers an efficient and reliable technical solution for intelligent ECG diagnosis, with important implications for improving early screening capabilities and optimizing medical resource allocation.
Meanwhile, this study has several limitations. The experimental dataset suffers from class imbalance, and no data augmentation strategies were adopted to optimize the sample distribution, which to a certain extent affects the model’s learning performance for minority arrhythmia samples. The proposed three-level risk stratification system and PaliConvLSTM model still possess favorable clinical translation potential. They can be integrated into portable ECG devices, dynamic monitoring systems or hospital ECG analysis platforms for real-time arrhythmia screening, risk early warning and auxiliary clinical decision-making. In future studies, we will focus on optimizing the data imbalance problem by introducing data augmentation, sample balancing strategies and improved loss functions to further enhance the classification stability and generalization ability of the model. In addition, multimodal medical data such as ambulatory blood pressure and blood oxygen saturation will be incorporated in subsequent research. The current network architecture is inherently compatible with multimodal inputs, requiring only minor adjustments to the input layers without major structural modifications. A cross-modal feature fusion layer will be designed, and transfer learning will be adopted to improve the model’s adaptability to complex clinical scenarios and realize the dynamic calibration of risk classification thresholds.
Acknowledgements
This work was supported by the Henan Key Laboratory of Cardiac Remodeling and Transplantation; Guidance Plan Project for Technological Innovation in Zhengzhou’s Medical and Health Field [grant number 2024YLZDJH224]; National Natural Science Foundation of China [grant number 62302463]; Key Research Project Support Program for Higher Education Institutions in Henan Province [grant number 25A520010].
Author contributions
Hua Zhang: Writing – original draft, Methodology, Investigation, Visualization. Jing Li: Writing – review & editing, Methodology, Conceptualization, Project administration. Mingjie Wang: Writing – review & editing, Resources, Investigation. Xuexi Xuan: Writing – original draft, Data curation, Formal analysis. Kai Xia: Writing – review & editing, Investigation, Visualization, Validation. Yuanyuan Tan: Writing – review & editing, Resources, Data curation. Li Li: Writing – original draft, Data curation, Validation, Formal analysis. Jianfeng Chen: Writing - review & editing, Resources, Validation. Haiyan Wang: Writing – original draft, Methodology, Conceptualization, Visualization, Resources, Data curation.
Funding
This work was supported by the Henan Key Laboratory of Cardiac Remodeling and Transplantation; Guidance Plan Project for Technological Innovation in Zhengzhou’s Medical and Health Field [grant number 2024YLZDJH224]; National Natural Science Foundation of China [grant number 62302463]; Key Research Project Support Program for Higher Education Institutions in Henan Province [grant number 25A520010].
Data availability
The publicly available datasets used in this study include the MIT-BIH Arrhythmia Database (https://archive.physionet.org/physiobank/database/mitdb/), the MIT-BIH Malignant Ventricular Arrhythmia Database (https://archive.physionet.org/physiobank/database/vfdb/), and the Creighton University Ventricular Tachyarrhythmia Database (https://archive.physionet.org/physiobank/database/cudb/).
Declarations
Ethical approval
Ethical approval was not required for this study, as all data were obtained from publicly available, de-identified databases (MITDB, CUDB and VFDB). These datasets are widely used in biomedical research and contain no identifiable patient information, and the study did not involve new human subjects or additional interventions, thus exempting it from institutional review board approval.
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.Kumar AS, Rekha R. An improved hawks optimizer based learning algorithms for cardiovascular disease prediction. Biomed Signal Process Control. 2023;81.
- 2.Lukyanenko P, Mayourian J, Liu M, et al. Deep survival analysis from adult and pediatric electrocardiograms: a multi-center benchmark study. BioData Min. 2026;19:6. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Pokaprakarn T, Kitzmiller RR, Moorman R, Lake DE, Krishnamurthy AK, Kosorok MR. Sequence to sequence ECG cardiac rhythm classification using convolutional recurrent neural networks. IEEE J Biomedical Health Inf. 2022;26:572–80. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Liu Z, et al. Multiclass arrhythmia detection and classification from photoplethysmography signals using a deep convolutional neural network. J Am Heart Association. 2022;11. [DOI] [PMC free article] [PubMed]
- 5.Lai D, Fan X, Zhang Y, Chen W. Intelligent and efficient detection of Life-threatening ventricular arrhythmias in short segments of surface ECG signals. IEEE Sens J. 2021;21:14110–20. [Google Scholar]
- 6.Nainwal A, Kumar Y, Jha B. Arrhythmia classification based on improved monarch butterfly optimization algorithm. J King Saud Univ - Comput Inform Sci. 2022;34:5100–9. [Google Scholar]
- 7.Sinha N, Das A. Discrimination of life-threatening arrhythmias using singular value, harmonic phase distribution, and dynamic time warping of ECG signals. IEEE Trans Instrum Meas. 2021;70:2504508. [Google Scholar]
- 8.Qaisar SM, Khan SI, Srinivasan K, et al. Arrhythmia classification using multirate processing metaheuristic optimization and variational mode decomposition. J King Saud Univ Comput Inform Sci. 2023;35:26–37. [Google Scholar]
- 9.Jia Z, et al. TinyML design contest for life-threatening ventricular arrhythmia Detection. IEEE Trans Comput Aided Des Integr Circuits Syst. 2024;43:127–40. [Google Scholar]
- 10.Arhin JR, Zhang X, Coker K, et al. ADCGNet: Attention-based dual channel Gabor network towards efficient detection and classification of electrocardiogram images. J King Saud Univ Comput Inform Sci. 2023;35:101763. [Google Scholar]
- 11.Bollepalli SC, Sevakula RK, Au-Yeung WTM, Kassab MB, Merchant FM, Bazoukis G, Boyer R, Isselbacher EM, Armoundas A. Real-time arrhythmia detection using hybrid convolutional neural networks. J Am Heart Assoc. 2021;10. [DOI] [PMC free article] [PubMed]
- 12.Boda S, Mahadevappa M, Dutta P. An automated patient-specific ECG beat classification using LSTM-based recurrent neural networks. Biomed Signal Process Control. 2023;84:104756. [Google Scholar]
- 13.Wang J. An intelligent computer-aided approach for atrial fibrillation and atrial flutter signals classification using modified bidirectional LSTM network. Inf Sci. 2021;574:320–32. [Google Scholar]
- 14.Liu X, Wang H, Li Z, Qin L. Deep learning in ECG diagnosis: a review. Knowl Based Syst. 2021;227:107187. [Google Scholar]
- 15.Venkatesh NP, Kumar RP, Neelapu BC, Pal K, Sivaraman J. Automated atrial arrhythmia classification using 1D-CNN-BiLSTM: a deep network ensemble model. Biomed Signal Process Control. 2024;97:106703. [Google Scholar]
- 16.Petmezas G, Haris K, Stefanopoulos L, Kilintzis V, Tzavelas A, Rogers J, Katsaggelos A. Maglaveras, N. Automated atrial fibrillation detection using a hybrid CNN-LSTM network on imbalanced ECG datasets. Biomed Signal Process Control. 2021;63:102194. [Google Scholar]
- 17.Shi H, Qin C, Xiao D, Zhao L, Liu C. Automated heartbeat classification based on deep neural network with multiple input layers. Knowl Based Syst. 2020;188:105036. [Google Scholar]
- 18.Liu F, et al. An attention-based hybrid LSTM-CNN model for arrhythmias classification. In: 2019 International Joint Conference on Neural Networks (IJCNN). 2019. p. 1–8.
- 19.Shi X, et al. Convolutional LSTM network: a machine learning approach for precipitation nowcasting. Adv Neural Inf Process Syst. 2015.
- 20.Tripathy RK, Sharma LN, Dandapat S. Detection of shockable ventricular arrhythmia using variational mode decomposition. J Med Syst. 2016;40:79. [DOI] [PubMed] [Google Scholar]
- 21.Zipes DP, Camm AJ, et al. ACC/AHA/ESC 2006 guidelines for management of patients with ventricular arrhythmias and the prevention of sudden cardiac death: a report of the American College of Cardiology/American Heart Association Task Force and the European Society of Cardiology Committee for Practice Guidelines. J Am Coll Cardiol. 2006;48(5):e247–346. [DOI] [PubMed] [Google Scholar]
- 22.Saranya K, Karthikeyan U, Kumar AS, et al. DenseNet-ABiLSTM: revolutionizing multiclass arrhythmia detection and classification using hybrid deep learning approach leveraging PPG signals. Int J Comput Intell Syst. 2025;18(1).
- 23.Bangar A, Pandey V, Bhagwat H, Rasal S, Shirke T, Nikam VP. To implement and enhance EEG disease classification with customized mixed attention mechanism using deep CNN-Bi-LSTM. In: 2025 IEEE International Conference on Advances in Computing Research on Science Engineering and Technology (ACROSET); 2025; Indore, India. p. 1–6.
- 24.Salehi A, Goudarzi HR, Heydarian A. Quantum Angle–distance kernel for ECG classification and anomaly detection: a quantum-inspired framework for biomedical signal analysis. BioData Min. 2026;19:14. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Zhang W, Tanida J, Itoh K, Ichioka Y. Shift-invariant pattern recognition neural network and its optical architecture. In: Proceedings of the Annual Conference of the Japan Society of Applied Physics; 1988. p. 564.
- 26.Ul Amin S, Hussain A, Kim B, et al. Deep learning based active learning technique for data annotation and improve the overall performance of classification models. Expert Syst Appl. 2023;228.
- 27.Hochreiter S, Schmidhuber J. Long short-term memory. Neural Comput. 1997;9:1735–80. [DOI] [PubMed] [Google Scholar]
- 28.Greenwald S. Development and analysis of a ventricular fibrillation detector. M.S. thesis, MIT Department of Electrical Engineering and Computer Science; 1986.
- 29.Goldberger A, Amaral L, Glass L, Hausdorff J, Ivanov P, Mark R, Mietus J, Moody G, Peng C, Stanley H. PhysioBank, physiotoolkit, and physioNet: components of a new research resource for complex physiologic signals. Circulation. 2000;101:e215–20. [DOI] [PubMed] [Google Scholar]
- 30.Moody G, Mark R. The impact of the MIT-BIH arrhythmia database. IEEE Eng Med Biol Mag. 2001;20:45–50. [DOI] [PubMed] [Google Scholar]
- 31.Nolle F, Badura F, Catlett J, Bowser R, Sketch M, CREI-GARD. A new concept in computerized arrhythmia monitoring systems. Computers Cardiol. 1986;13:515–8. [Google Scholar]
- 32.Quinlan JR. Induction of decision trees. Mach Learn. 1986;1:81–106. [Google Scholar]
- 33.Breiman L. Random forests. Mach Learn. 2001;45:5–32. [Google Scholar]
- 34.Rumelhart D, Hinton G, Williams R. Learning representations by backpropagating errors. Nature. 1986;323:533–6. [Google Scholar]
- 35.Dudani SA. The distance-weighted k-nearest-neighbor rule. IEEE Trans Syst Man Cybernetics. 1976;4:325–7. [Google Scholar]
- 36.Cortes C, Vapnik V. Support vector networks. Mach Learn. 1995;20:273–97. [Google Scholar]
- 37.Rajagopal R, Kumar VS. Analysis on effect of resampling techniques on cardiac arrhythmia classification using convolutional neural networks. Int J Med Eng Inf. 2023;15(6).
- 38.Prakash JA, Belkacem NA, Elfadel IM, Jelinek HF, Atef M. Advances in machine and deep learning for ECG beat classification: a systematic review. Front Digit Health. 2025;7:1649923. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 39.Alonso-Atienza F, Morgado E, Fernandez-Martinez L, Garcia-Alberola A, Rojo-Alvarez JL. Detection of life-threatening arrhythmias using feature selection and support vector machines. IEEE Trans Biomed Eng. 2014;61:832–40. [DOI] [PubMed] [Google Scholar]
- 40.Tripathy RK, Sharma LN, Dandapat S. Detection of shockable ventricular arrhythmia using variational mode decomposition. J Med Syst. 2016;40:79. [DOI] [PubMed] [Google Scholar]
- 41.Cheng P, Dong X. Life-threatening ventricular arrhythmia detection with personalized features. IEEE Access. 2017;5:14195–203. [Google Scholar]
- 42.Acharya UR, Fujita H, Oh SL, Adam M. Automated identification of shockable and non-shockable life-threatening ventricular arrhythmias using convolutional neural network. Future Generation Comput Syst. 2018;79:952–9. [Google Scholar]
- 43.Panda R, Jain S, Tripathy RK, Acharya UR. Detection of shockable ventricular cardiac arrhythmias from ECG signals using FFREWT filter-bank and deep convolutional neural network. Comput Biol Med. 2020;124:103939. [DOI] [PubMed] [Google Scholar]
- 44.Hammad M, Kandala R, Abdelatey A, Abdar M, Zomorodi-Moghadam M, Tan RS, Acharya UR, Pławiak J, Tadeusiewicz R, Makarenkov V. Sarrafzadegan, N. Automated detection of shockable ECG signals: a review. Inf Sci. 2021;571:580–604. [Google Scholar]
- 45.Tripathy PM, Kumar A, Kumar M, Komaragiri R. Multilevel classification and detection of cardiac arrhythmias with high-resolution superlet transform and deep convolution neural network. IEEE Trans Instrum Meas. 2022;71:1–13. [Google Scholar]
- 46.Kavya L, Karuna Y. Dwarf mongoose gannet optimization algorithm-enabled deep neuro-fuzzy network for detection of shockable ventricular cardiac arrhythmias. Proc Inst Mech Eng C J Mech Eng Sci. 2024;238.
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The publicly available datasets used in this study include the MIT-BIH Arrhythmia Database (https://archive.physionet.org/physiobank/database/mitdb/), the MIT-BIH Malignant Ventricular Arrhythmia Database (https://archive.physionet.org/physiobank/database/vfdb/), and the Creighton University Ventricular Tachyarrhythmia Database (https://archive.physionet.org/physiobank/database/cudb/).









