Skip to main content
QUICK REVIEW

[Paper Review] Explaining Deep Learning for ECG Analysis: Building Blocks for Auditing and Knowledge Discovery

Patrick Wagner, Temesgen Mehari|arXiv (Cornell University)|May 26, 2023
ECG Monitoring and AnalysisMedicine64 references4 citations
TL;DR

This paper proposes a systematic framework for explainable AI (XAI) in ECG analysis using post-hoc attribution methods, with novel sanity checks and glocal XAI techniques that aggregate attributions across patient subgroups. It demonstrates reliable alignment between model decisions and clinical knowledge, enabling auditing and knowledge discovery—such as identifying subtypes of myocardial infarction—across the PTB-XL dataset using GradCAM, saliency maps, and clustering of hidden features.

ABSTRACT

Deep neural networks have become increasingly popular for analyzing ECG data because of their ability to accurately identify cardiac conditions and hidden clinical factors. However, the lack of transparency due to the black box nature of these models is a common concern. To address this issue, explainable AI (XAI) methods can be employed. In this study, we present a comprehensive analysis of post-hoc XAI methods, investigating the local (attributions per sample) and global (based on domain expert concepts) perspectives. We have established a set of sanity checks to identify sensible attribution methods, and we provide quantitative evidence in accordance with expert rules. This dataset-wide analysis goes beyond anecdotal evidence by aggregating data across patient subgroups. Furthermore, we demonstrate how these XAI techniques can be utilized for knowledge discovery, such as identifying subtypes of myocardial infarction. We believe that these proposed methods can serve as building blocks for a complementary assessment of the internal validity during a certification process, as well as for knowledge discovery in the field of ECG analysis.

Motivation & Objective

  • To address the black-box nature of deep learning models in ECG analysis by developing reliable, auditable XAI methods.
  • To establish quantitative sanity checks for post-hoc XAI methods to ensure their reliability in clinical contexts.
  • To enable knowledge discovery by aggregating attributions across patient subgroups (glocal XAI) to uncover hidden patterns like ECG subtypes.
  • To verify if models exploit expert-recognized clinical concepts through global XAI, supporting internal validity auditing.
  • To provide a reproducible, open-source pipeline for XAI in ECG using PTB-XL and standard XAI libraries.

Proposed method

  • Proposes a set of sanity checks to evaluate the reliability of post-hoc XAI methods like GradCAM and saliency maps using expert-defined rules and quantitative metrics.
  • Introduces 'glocal XAI'—aggregating attribution maps across entire patient subgroups (e.g., MI, ASMI) to reveal consistent signal regions relevant to pathology.
  • Uses R-peak detection from soft segmentation outputs to extract median beats and beat-centered attributions for consistent signal alignment.
  • Applies signal and attribution aggregation via weighted summation using soft segmentation maps: $\mathbf{m}_i = \mathbf{x}_{:,i}^\top \mathbf{s}_{:,i,:}$, normalized by temporal sum $\mathbf{\tilde{s}}$.
  • Employs dimensionality reduction (PCA to 75% variance) and clustering (GMM, k-means) on input signals, attributions, and hidden features to discover subtypes.
  • Visualizes cluster differences by comparing mean attributions and overlaying deviations on original signals to identify clinically relevant regions.
Figure 1 : Overview of different XAI approaches proposed in the context of ECG analysis along with corresponding applications (orange boxes). A deep learning model is trained on ECG data, which is supposed to be used as a decision support system. Local XAI methods allow the extraction of per-sample
Figure 1 : Overview of different XAI approaches proposed in the context of ECG analysis along with corresponding applications (orange boxes). A deep learning model is trained on ECG data, which is supposed to be used as a decision support system. Local XAI methods allow the extraction of per-sample

Experimental results

Research questions

  • RQ1Which post-hoc XAI methods reliably reflect expert-recognized ECG features and avoid spurious correlations?
  • RQ2Can aggregated attributions across patient subgroups (glocal XAI) reveal consistent, clinically meaningful patterns in ECG signals?
  • RQ3Do deep learning models exploit known clinical decision rules, and can this be quantitatively verified using global XAI?
  • RQ4Can clustering of model attributions and hidden features uncover biologically or clinically relevant subtypes of myocardial infarction?
  • RQ5How do different XAI methods compare in their ability to support auditing and knowledge discovery in ECG analysis?

Key findings

  • The proposed sanity checks successfully identified reliable XAI methods that align with expert rules, reducing reliance on anecdotal validation.
  • Glocal XAI revealed consistent, pathology-specific attribution patterns across subgroups, with strong agreement across four pathologies (e.g., MI, ASMI).
  • Clustering of attribution maps achieved high adjusted Rand scores, indicating that models learn distinct, interpretable representations for different subtypes.
  • The method successfully identified spatial and temporal regions of high deviation between clusters, highlighting clinically relevant ECG morphology differences.
  • Hidden feature representations, when clustered via GMM, achieved strong clustering performance, suggesting models learn disentangled, meaningful representations.
  • The framework enables systematic auditing of model behavior and discovery of subtypes, such as distinguishing MI from ASMI, using only model outputs and XAI.
(a) P-wave amplitude ( XResNet )
(a) P-wave amplitude ( XResNet )

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.