[Paper Review] Development of Interpretable Machine Learning Models to Detect Arrhythmia based on ECG Data
This paper develops interpretable deep learning models—CNN and LSTM—using ECG data from the MIT-BIH arrhythmia dataset to detect cardiac arrhythmias with high accuracy. It evaluates multiple interpretability techniques, finding that Gradient-weighted Class Activation Mapping (Grad-CAM) is the most effective for local interpretability, consistently highlighting the QRS complex as the key feature for classification decisions.
The analysis of electrocardiogram (ECG) signals can be time consuming as it is performed manually by cardiologists. Therefore, automation through machine learning (ML) classification is being increasingly proposed which would allow ML models to learn the features of a heartbeat and detect abnormalities. The lack of interpretability hinders the application of Deep Learning in healthcare. Through interpretability of these models, we would understand how a machine learning algorithm makes its decisions and what patterns are being followed for classification. This thesis builds Convolutional Neural Network (CNN) and Long Short-Term Memory (LSTM) classifiers based on state-of-the-art models and compares their performance and interpretability to shallow classifiers. Here, both global and local interpretability methods are exploited to understand the interaction between dependent and independent variables across the entire dataset and to examine model decisions in each sample, respectively. Partial Dependence Plots, Shapley Additive Explanations, Permutation Feature Importance, and Gradient Weighted Class Activation Maps (Grad-Cam) are the four interpretability techniques implemented on time-series ML models classifying ECG rhythms. In particular, we exploit Grad-Cam, which is a local interpretability technique and examine whether its interpretability varies between correctly and incorrectly classified ECG beats within each class. Furthermore, the classifiers are evaluated using K-Fold cross-validation and Leave Groups Out techniques, and we use non-parametric statistical testing to examine whether differences are significant. It was found that Grad-CAM was the most effective interpretability technique at explaining predictions of proposed CNN and LSTM models. We concluded that all high performing classifiers looked at the QRS complex of the ECG rhythm when making predictions.
Motivation & Objective
- To develop high-accuracy, interpretable machine learning models for arrhythmia detection using ECG data.
- To address the clinical limitation of 'black-box' deep learning models by integrating global and local interpretability techniques.
- To evaluate and compare the effectiveness of interpretability methods—PDP, SHAP, PFI, and Grad-CAM—on time-series ECG data.
- To validate model performance using K-Fold and Leave Groups Out cross-validation with non-parametric statistical testing.
- To ensure clinical relevance by verifying that model decisions align with established medical knowledge of ECG morphology.
Proposed method
- Trained Convolutional Neural Network (CNN) and Long Short-Term Memory (LSTM) models on single-lead ECG beats from the MIT-BIH arrhythmia dataset.
- Preprocessed ECG beats by segmenting them into 11 temporal windows to reduce dimensionality and improve interpretability tool compatibility.
- Applied four interpretability techniques: Partial Dependence Plots (PDP), Shapley Additive Explanations (SHAP), Permutation Feature Importance (PFI), and Gradient-weighted Class Activation Mapping (Grad-CAM).
- Used K-Fold cross-validation and Leave Groups Out evaluation to assess model generalization across subjects.
- Performed non-parametric statistical testing (e.g., Wilcoxon signed-rank test) to validate performance differences between models.
- Visualized Grad-CAM heatmaps to analyze model attention per ECG beat and compare correct vs. misclassified predictions.
Experimental results
Research questions
- RQ1Which machine learning model—CNN, LSTM, or shallow classifiers—achieves the highest accuracy in classifying ECG beats from the MIT-BIH dataset?
- RQ2How effective are global interpretability methods (PDP, SHAP, PFI) versus local methods (Grad-CAM) in explaining model predictions for time-series ECG data?
- RQ3Does Grad-CAM localization differ between correctly and incorrectly classified ECG beats within each arrhythmia class?
- RQ4To what extent do the models rely on the QRS complex, as per medical knowledge, for classification decisions?
- RQ5Can interpretability techniques like Grad-CAM and PFI reveal consistent, clinically meaningful patterns across different models and data splits?
Key findings
- The CNN and LSTM models achieved the highest performance, with 94.1% and 94.0% accuracy on K-Fold cross-validation, and 98.7% and 97.0% on Leave Groups Out validation, respectively.
- Grad-CAM was the most effective interpretability technique, providing clear, localized attention maps that consistently highlighted the QRS complex as the primary decision-making feature.
- All high-performing models focused their attention on the QRS complex, confirming alignment with clinical understanding of arrhythmia diagnosis.
- PFI provided global, model-agnostic insights into feature importance but lacked per-sample or per-class interpretability, limiting its utility for individual beat analysis.
- SHAP and PDP were found to be less effective due to high computational cost (SHAP) and poor informativeness (PDP), especially for time-series data with high temporal resolution.
- The study confirmed that interpretability techniques can effectively demystify deep learning models in ECG classification, enhancing trust and clinical applicability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.