ECG Signal Classification Using Interpretable KAN: Towards Predictive Diagnosis of Arrhythmias
Abstract
:1. Introduction
2. Literature Study
- (1)
- Integration of automation and interpretability: The KAN not only automatically extracts multi-layered features from ECG signals but also offers clear explanations for the physical significance of these features.
- (2)
- Enhanced capability to address the complexity of ECG data: The KAN’s structural design is particularly suited for processing multi-view and multi-scale features inherent in arrhythmia signals.
- (3)
- Reliability and practical applicability: By improving the model’s adaptability to the distribution and characteristics of ECG data, the KAN achieves higher classification accuracy, offering a dependable foundation for clinical diagnosis.
3. Materials and Methods
3.1. Data Description
3.2. Data Preprocessing
3.3. Feature Analysis of Data
- (1)
- BIRCH (Balanced Iterative Reducing and Clustering Using Hierarchies) [18] is a hierarchical clustering method that efficiently performs clustering operations by constructing a clustering feature tree (CF Tree). The CF Tree, similar in structure to a balanced B+ tree, contains nodes composed of clustering features (CFs), which are represented as a triple (N, LS, SS). Here, N denotes the number of sample points in a cluster, LS represents the linear sum of feature dimensions, and SS is the sum of squares vector. In the context of ECG signal feature clustering, BIRCH captures both the global structure and local patterns of signals through hierarchical and recursive cluster merging, making it well-suited for fast clustering of large-scale datasets. This study compares the clustering outcomes of original features and KAN-extracted features using BIRCH, aiming to demonstrate the ability of the KAN to optimize feature distribution.
- (2)
- MeanShift [19] is a nonparametric, density-based clustering method that estimates the probability density of a dataset using a kernel function. It iteratively shifts data points along the density gradient toward regions of highest density, known as mode points. Each data point converges to a high-density region, achieving automatic clustering. In this study, MeanShift clustering is applied to identify high-density feature distribution regions within ECG signals.
- (3)
- Spectral Clustering [20] is a graph theory-based method that constructs a similarity graph among data points, representing data relationships as a weighted graph matrix. The eigenvalues and eigenvectors of the graph’s Laplacian matrix are then utilized for dimensionality reduction and clustering. Spectral clustering excels at handling complex, nonlinear data distributions and is particularly effective for uncovering latent high-dimensional nonlinear structures within ECG signals. This study visualizes the clustering results of both original features and KAN-extracted features through spectral clustering, highlighting the KAN’s superior performance in preserving nonlinear signal characteristics and capturing intricate relationships within the feature space.
3.4. Interpretable KAN Model
- (1)
- KAN incorporates a learnable univariate function. As demonstrated in Equation (8), the weight of each edge is not a fixed value but rather a dynamically learnable univariate function. This design enables flexible application of complex nonlinear transformations on each edge, thus enhancing the capture of characteristic distributions in ECG signals.
- (2)
- Feature visualization facilitates the interpretation of ECG signal feature distributions. In the arrhythmia classification task, when different categories of ECG signals are input, key features—such as QRS waveforms or characteristic signal change curves—exhibit progressively significant classification differences.
- (3)
- The tree structure diagram illustrates the forward propagation process. As illustrated in Figure 4, the tree structure represents each node as a feature combination, with edges denoting the dependency relationships between features. This representation strategy aids in understanding the model’s decision-making mechanism and offers potential clinical interpretability, such as elucidating synergies among ECG signals.
3.5. Loss Calulation Method for ECG Signal Classification
4. Experimental Results and Analysis
4.1. Experimental Detail
4.2. Experimental Evaluation Metrics
4.3. Experimental Results
4.4. Cluster Feature Distribution
4.5. Comparison with the Existing Models of the Literature
4.6. Convergence Study of Loss
5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
AAMI | American Association for the Advancement of Medical Instrumentation |
DL | Deep Learning |
ML | Machine Learning |
KAN | Kolmogorov–Arnold Network |
MLP | Multi-Layer Perceptron |
AI | Artificial Intelligence |
Appendix A
Appendix A.1. Comparative Analysis of the Accuracy of the Training Set and the Validation Set
References
- Factsheet Cardiovascular Diseases (cvds). Available online: https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds) (accessed on 13 October 2021).
- Deng, M.; Meng, T.; Cao, J.; Wang, S.; Zhang, J.; Fan, H. Heart sound classification based on improved MFCC features and convolutional recurrent neural networks. Neural Netw. 2020, 130, 22–32. [Google Scholar] [CrossRef] [PubMed]
- Huizar, J.F.; Kaszala, K.; Tan, A.; Koneru, J.; Mankad, P.; Kron, J.; Ellenbogen, K.A. Abnormal conduction-induced cardiomyopathy: JACC review topic of the week. J. Am. Coll. Cardiol. 2023, 81, 1192–1200. [Google Scholar] [CrossRef]
- American National Standards Institute. Testing and Reporting Performance Results of Cardiac Rhythm and ST Segment Measurement Algorithms. Available online: https://webstore.ansi.org/standards/aami/ansiaamiec572012r2020 (accessed on 1 January 2025).
- Liu, Z.; Wang, Y.; Vaidya, S.; Ruehle, F.; Halverson, J.; Soljačić, M.; Hou, T.Y.; Tegmark, M. Kan: Kolmogorov-arnold networks. arXiv 2024, arXiv:2404.19756. [Google Scholar]
- Rajaraman, V. JohnMcCarthy—Father of artificial intelligence. Resonance 2014, 19, 198–207. [Google Scholar] [CrossRef]
- Petch, J.; Di, S.; Nelson, W. Opening the black box: The promise and limitations of explainable machine learning in cardiology. Can. J. Cardiol. 2022, 38, 204–213. [Google Scholar] [CrossRef]
- Dolatabadi, A.D.; Khadem SE, Z.; Asl, B.M. Automated diagnosis of coronary artery disease (CAD) patients using optimized SVM. Comput. Methods Programs Biomed. 2017, 138, 117–126. [Google Scholar] [CrossRef] [PubMed]
- Kumar, S.U.; Inbarani, H. Neighborhood rough set based ECG signal classification for diagnosis of cardiac diseases. Soft Comput. 2017, 21, 4721–4733. [Google Scholar] [CrossRef]
- Acharya, U.R.; Fujita, H.; Sudarshan, V.K.; Oh, S.L.; Adam, M.; Koh, J.E.; Tan, J.H.; Ghista, D.N.; Martis, R.J.; Chua, C.K.; et al. Automated detection and localization of myocardial infarction using electrocardiogram: A comparative study of different leads. Knowl. Based Syst. 2016, 99, 146–156. [Google Scholar] [CrossRef]
- Zhang, J.; Lin, F.; Xiong, P.; Du, H.; Zhang, H.; Liu, M.; Hou, Z.; Liub, X. Automated detection and localization of myocardial infarction with staked sparse autoencoder and treebagger. IEEE Access 2019, 7, 70634–70642. [Google Scholar] [CrossRef]
- Feng, K.; Pi, X.; Liu, H.; Sun, K. Myocardial infarction classification based on convolutional neural network and recurrent neural network. Appl. Sci. 2019, 9, 1879. [Google Scholar] [CrossRef]
- Liu, Z.; Zhang, X. ECG-based heart arrhythmia diagnosis through attentional convolutional neural networks. In Proceedings of the 2021 IEEE International Conference on Internet of Things and Intelligence Systems (IoTaIS), Bandung, Indonesia, 23–24 November 2021; pp. 156–162. [Google Scholar]
- Hu, R.; Chen, J.; Zhou, L. A transformer-based deep neural network for arrhythmia detection using continuous ECG signals. Comput. Biol. Med. 2022, 144, 105325. [Google Scholar] [CrossRef]
- Available online: https://www.kaggle.com/datasets/shayanfazeli/heartbeat?resource=download (accessed on 1 January 2025).
- Kachuee, M.; Fazeli, S.; Sarrafzadeh, M. Ecg heartbeat classification: A deep transferable representation. In Proceedings of the 2018 IEEE International Conference on Healthcare Informatics (ICHI), New York, NY, USA, 4–7 June 2018; pp. 443–444. [Google Scholar]
- Wang, Y.; Qian, J.; Hassan, M.; Zhang, X.; Zhang, T.; Yang, C.; Zhou, X.; Jia, F. Density peak clustering algorithms: A review on the decade 2014–2023. Expert Syst. Appl. 2024, 238, 121860. [Google Scholar] [CrossRef]
- Zhang, T.; Ramakrishnan, R.; Livny, M. BIRCH: An efficient data clustering method for very large databases. ACM Sigmod Rec. 1996, 25, 103–114. [Google Scholar] [CrossRef]
- Peng, Y.; Luo, Y.; Zhang, Q.; Xie, C. A mean shift algorithm incorporating reachable distance for spatial clustering. Inf. Sci. 2025, 689, 121456. [Google Scholar] [CrossRef]
- Zhong, G.; Pun, C.M. Self-taught multi-view spectral clustering. Pattern Recognit. 2023, 138, 109349. [Google Scholar] [CrossRef]
- Mao, A.; Mohri, M.; Zhong, Y. Cross-entropy loss functions: Theoretical analysis and applications. In Proceedings of the International Conference on Machine Learning, Honolulu, HI, USA, 23–29 July 2023; pp. 23803–23828. [Google Scholar]
- Reyad, M.; Sarhan, A.M.; Arafa, M. A modified Adam algorithm for deep neural network optimization. Neural Comput. Appl. 2023, 35, 17095–17112. [Google Scholar] [CrossRef]
- Majhi, B.; Kashyap, A. Explainable AI-driven machine learning for heart disease detection using ECG signal. Appl. Soft Comput. 2024, 167, 112225. [Google Scholar] [CrossRef]
- Arias-Duart, A.; Mariotti, E.; Garcia-Gasulla, D.; Alonso-Moral, J.M. A confusion matrix for evaluating feature attribution methods. In Proceedings of the 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPRW), Vancouver, BC, Canada, 17–24 June 2023. [Google Scholar]
- Thompson, M.L.; Zucchini, W. On the statistical analysis of ROC curves. Stat. Med. 1989, 8, 1277–1290. [Google Scholar] [CrossRef]
- Shaker, A.M.; Tantawi, M.; Shedeed, H.A.; Tolba, M.F. Generalization of convolutional neural networks for ECG classification using generative adversarial networks. IEEE Access 2020, 8, 35592–35605. [Google Scholar] [CrossRef]
- Wang, J.; Qiao, X.; Liu, C.; Wang, X.; Liu, Y.; Yao, L.; Zhang, H. Automated ECG classification using a non-local convolutional block attention module. Comput. Methods Programs Biomed. 2021, 203, 106006. [Google Scholar] [CrossRef]
- Le, M.D.; Rathour, V.S.; Truong, Q.S.; Mai, Q.; Brijesh, P.; Le, N. Multi-module recurrent convolutional neural network with transformer encoder for ECG arrhythmia classification. In Proceedings of the 2021 IEEE EMBS International Conference on Biomedical and Health Informatics (BHI), Virtually, 27–30 July 2021; pp. 1–5. [Google Scholar]
- Hammad, M.; Iliyasu, A.M.; Subasi, A.; Ho, E.S.L.; El-Latif, A.A.A. A multitier deep learning model for arrhythmia detection. IEEE Trans. Instrum. Meas. 2020, 70, 2502809. [Google Scholar] [CrossRef]
- Kumar, S.; Mallik, A.; Kumar, A.; Del Ser, J.; Yang, G. Fuzz-ClustNet: Coupled fuzzy clustering and deep neural networks for Arrhythmia detection from ECG signals. Comput. Biol. Med. 2023, 153, 106511. [Google Scholar] [CrossRef] [PubMed]
- Pradeep, C.S.; Sinha, N. Time-invariant latent space signatures for enhanced time-frequency domain representation. In Proceedings of the 2024 International Joint Conference on Neural Networks (IJCNN), Yokohama, Japan, 30 June–5 July 2024; pp. 1–8. [Google Scholar]
- Al-Shammary, D.; Radhi, M.; AlSaeedi, A.H.; Mahdi, A.M.; Ibaida, A.; Ahmed, K. Efficient ecg classification based on the probabilistic kullback-leibler divergence. Inform. Med. Unlocked 2024, 47, 101510. [Google Scholar] [CrossRef]
- Sharma, L.N.; Tripathy, R.K.; Dandapat, S. Multiscale energy and eigenspace approach to detection and localization of myocardial infarction. IEEE Trans. Biomed. Eng. 2015, 62, 1827–1837. [Google Scholar] [CrossRef]
- Islam, R.; Rahman, M.; Ismail, S.M.; Akter, S. Transfer learning in deep neural network model of ecg signal classification. In Proceedings of the 2022 International Conference on Recent Progresses in Science, Engineering and Technology (ICRPSET), Rajshahi, India, 26–27 December 2022; pp. 1–4. [Google Scholar]
- Kojuri, J.; Boostani, R.; Dehghani, P.; Nowroozipour, F.; Saki, N. Prediction of acute myocardial infarction with artificial neural networks in patients with nondiagnostic electrocardiogram. J. Cardiovasc. Dis. Res. 2015, 6, 51. [Google Scholar] [CrossRef]
AAMI ECG | N | S | V | F | Q |
---|---|---|---|---|---|
Class description | Normal heart that not included in S, V, F or Q classes | Supraventricular ectopic beat | Ventricular ectopic beat | Fusion beat | Unknown beat |
MIT-BIH ECG classes | Normal beat (N) Left bundle branch block beat (L) Right bundle branch block beat (R) Atrial escape beat (e) Nodal (junctional) escape beat (j) | Atrial premature beat (A) Aberrated atrial premature beat (a) Nodal (junctional) premature beat (J) Supraventricular premature or ectopic beat (S) | Premature ventricular contraction (V) Ventricular escape beat (E) | Fusion of ventricular and normal beat (F) | Paced beat (/) Fusion of paced and normal beat (f) Unclassifiable beat (Q) |
Training set | 72,471 | 2223 | 5788 | 641 | 6431 |
Test set | 18,118 | 556 | 1448 | 162 | 1608 |
Total | 90,589 | 2779 | 7236 | 803 | 8039 |
Model | Accuracy (%) | Precision (%) | Recall (%) | F1_Score (%) |
---|---|---|---|---|
MLP | 97.62 | 87.06 | 83.18 | 85.08 |
KAN | 97.68 | 93.19 | 82.47 | 87.50 |
Model | Accuracy (%) | Precision (%) | Recall (%) | F1_Score (%) |
---|---|---|---|---|
MLP | 98.28 | 98.22 | 98.14 | 98.21 |
KAN | 99.08 | 99.07 | 98.99 | 99.03 |
Model | Accuracy (%) | Precision (%) | Recall (%) | F1_Score (%) |
---|---|---|---|---|
MLP | 96.01 | 95.06 | 95.26 | 95.16 |
KAN | 97.68 | 97.90 | 97.97 | 97.97 |
Model | Accuracy (%) | Precision (%) | Recall (%) | F1_Score (%) |
---|---|---|---|---|
MLP | 97.40 | 97.45 | 97.35 | 97.39 |
KAN | 99.11 | 99.11 | 98.82 | 98.96 |
Works | Accuracy (%) | Precision (%) | Recall (%) |
---|---|---|---|
Shaker et al. [26] | 98.30 | 90.00 | 99.77 |
Wang J. et al. [27] | 98.64 | \ | 99.00 |
Le M. D. et al. [28] | 98.29 | \ | \ |
Hammad M. et al. [29] | 98.00 | 95.80 | 99.70 |
Kumar S. et al. [30] | 98.66 | 98.92 | 93.88 |
Kachuee M. et al. [16] | 93.40 | \ | \ |
Pradeep C. S. et al. [31] | 98.19 | 97.58 | 97.66 |
Al-Shammary D. et al. [32] | 86.67 | 86.34 | 86.67 |
Liu et al. [13] | 98.65 | 98.68 | 98.65 |
our | 99.08 | 99.07 | 98.99 |
Works | Accuracy (%) | Precision (%) | Recall (%) |
---|---|---|---|
Kumar S. et al. [30] | 95.79 | 96.29 | 85.38 |
Kachuee M. et al. [16] | 95.90 | 95.20 | 95.10 |
Sharma L. N. et al. [33] | 96.00 | 99.00 | 93.00 |
Islam R. et al. [34] | 97.00 | 97.00 | 98.00 |
Kojuri et al. [35] | 95.60 | 97.90 | 93.33 |
our | 99.11 | 99.11 | 98.82 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Cui, H.; Ning, S.; Wang, S.; Zhang, W.; Peng, Y. ECG Signal Classification Using Interpretable KAN: Towards Predictive Diagnosis of Arrhythmias. Algorithms 2025, 18, 90. https://doi.org/10.3390/a18020090
Cui H, Ning S, Wang S, Zhang W, Peng Y. ECG Signal Classification Using Interpretable KAN: Towards Predictive Diagnosis of Arrhythmias. Algorithms. 2025; 18(2):90. https://doi.org/10.3390/a18020090
Chicago/Turabian StyleCui, Hongzhen, Shenhui Ning, Shichao Wang, Wei Zhang, and Yunfeng Peng. 2025. "ECG Signal Classification Using Interpretable KAN: Towards Predictive Diagnosis of Arrhythmias" Algorithms 18, no. 2: 90. https://doi.org/10.3390/a18020090
APA StyleCui, H., Ning, S., Wang, S., Zhang, W., & Peng, Y. (2025). ECG Signal Classification Using Interpretable KAN: Towards Predictive Diagnosis of Arrhythmias. Algorithms, 18(2), 90. https://doi.org/10.3390/a18020090