A Gradient-based Spectral Explainability Method for EEG Deep Learning Classifiers

Charles A. Ellis, Mohammad S.e. Sendi, Robyn L. Miller, Vince D. CalhounbioRxiv 2021 · DOI

TL;DR

This paper introduces a novel local spectral explainability method for deep learning models trained on raw EEG data, addressing limitations of existing global and perturbation-based approaches. The method reveals how specific frequency bands contribute to sleep stage classification and uncovers significant influences of age and sex on these learned patterns.

What Problem Does This Paper Address?

Deep learning models have shown great promise in analyzing electroencephalogram (EEG) data, particularly for tasks like sleep stage classification. However, a major challenge arises when these models are trained on raw EEG signals rather than pre-extracted features. Traditional explainability methods often struggle with raw data, and existing approaches for EEG explainability have two key drawbacks: they either rely on perturbation (which can lead to inaccurate explanations by creating out-of-distribution samples) or are global (providing an overall importance of features but not explaining individual predictions). This leaves a gap in understanding why a deep learning model makes a specific sleep stage classification for a given EEG segment, especially concerning the underlying spectral characteristics and how demographic factors like age and sex might influence the model's learned patterns.

Methods

The authors propose a novel local spectral explainability approach. They train a Convolutional Neural Network (CNN) for automated sleep stage classification using raw EEG data. To explain the model's decisions, they employ Layer-wise Relevance Propagation (LRP), a gradient-based method that assigns a "relevance" score to each input time point, indicating its contribution to the final classification.

The key innovation lies in how they interpret these LRP scores:

  1. Spectral Transformation: They apply a Fast Fourier Transform (FFT) to the LRP relevance scores for each time point. This transforms the time-domain relevance into the frequency domain, allowing them to analyze the importance of specific canonical frequency bands (delta, theta, alpha, beta, gamma).
  2. Local and Global Analysis: By examining the spectral relevance for individual EEG segments, they achieve local explainability. They also aggregate these local explanations to approximate global importance of frequency bands across the entire dataset.
  3. Statistical Analysis: They conduct regression analyses to investigate how participant age and sex influence the spectral relevance assigned by the model for each frequency band and sleep stage. This allows them to understand demographic effects on the model's learned patterns.

Datasets

The study utilizes the Sleep Cassette subset of the Sleep-EDF dataset ([14], [15]). This dataset contains approximately 20-hour EEG recordings from 153 participants (78 individuals) aged 25 to 101 years. The data was recorded at a 100 Hz sampling frequency from the Fpz-Cz electrode and annotated into sleep stages: Unmarked, Movement, Awake, Rapid Eye Movement (REM), NREM 1 (NREMI), NREM 2 (NREM2), NREM 3, and NREM 4. The authors performed specific preprocessing steps, including segmenting data, removing certain stages, combining NREM3 and NREM4, and balancing class distribution.

Key Insights and Ideas

  • Beyond Perturbation: The proposed method avoids perturbation-based explainability, which is crucial for maintaining the integrity of explanations by not introducing out-of-distribution samples.
  • Local Spectral Insight: For the first time, this work provides local spectral insights into deep learning models trained on raw EEG, allowing for detailed examination of how specific frequency bands contribute to individual sleep stage classifications.
  • Demographic Influence: The study reveals that age and sex significantly impact how the deep learning model learns to classify sleep stages, particularly concerning the importance of different frequency bands. This highlights the potential for personalized or age/sex-adjusted sleep analysis models.
  • Frequency Band Importance: Delta (δ), beta (β), and gamma (γ) bands emerge as generally the most important frequency bands for sleep stage classification across various stages.

Key Results

  • Classifier Performance: The CNN achieved good performance across sleep stages, with the highest F1 scores for Awake and NREM2, and reasonable performance for NREM3 and REM. NREMI performance was notably lower.
  • Global Frequency Band Importance: Across all sleep stages and classification groups, δ, β, and γ were identified as the most important frequency bands.
  • Age and Sex Effects: Statistical analysis showed significant relationships between age/sex and the spectral relevance assigned by the classifier.
  • Age: Generally, importance for δ, β, and γ bands showed mixed positive and negative relationships with age across different sleep stages. For example, γ importance decreased with age in NREMI, while δ importance increased with age in REM.
  • Sex: Males tended to have higher importance for certain frequency bands (e.g., Awake γ, NREM3 β) compared to females, while females had higher importance for others (e.g., Awake δ and θ).
  • Temporal Dynamics: Figure 3 illustrates how the importance of frequency bands (especially δ) can vary significantly over time within a recording, correlating with changes in spectral power.

Limitations and Future Work

  • LRP Rules: The study applied three LRP relevance rules individually. Future work could explore using different LRP rules for different network layers to potentially improve explanation quality.
  • Statistical Analysis Scope: The statistical analysis focused only on correctly classified samples. Examining explanations for incorrect classifications could provide further insights.
  • Classifier Architecture: While the proposed explainability method is generalizable, the authors note that using state-of-the-art classifiers with higher performance could enhance the utility of their approach for automated biomarker identification.
  • Other GBFA Methods: The paper suggests exploring other Gradient-Based Feature Attribution (GBFA) methods that might offer even better explanations.

Summary updated

Abstract

Abstract The automated feature extraction capabilities of deep learning classifiers have promoted their broader application to EEG analysis. In contrast to earlier machine learning studies that used extracted features and traditional explainability approaches, explainability for classifiers trained on raw data is particularly challenging. As such, studies have begun to present methods that provide insight into the spectral features learned by deep learning classifiers trained on raw EEG. These approaches have two key shortcomings. (1) They involve perturbation, which can create out-of-distribution samples that cause inaccurate explanations. (2) They are global, not local. Local explainability approaches can be used to examine how demographic and clinical variables affected the patterns learned by the classifier. In our study, we present a novel local spectral explainability approach. We apply it to a convolutional neural network trained for automated sleep stage classification. We apply layer-wise relevance propagation to identify the relative importance of the features in the raw EEG and subsequently examine the frequency domain of the explanations to determine the importance of each canonical frequency band locally and globally. We then perform a statistical analysis to determine whether age and sex affected the patterns learned by the classifier for each frequency band and sleep stage. Results showed that δ, β, and γ were the overall most important frequency bands. In addition, age and sex significantly affected the patterns learned by the classifier for most sleep stages and frequency bands. Our study presents a novel spectral explainability approach that could substantially increase the level of insight into classifiers trained on raw EEG.
BibTeX
@misc{ellis2021gradient,
  author = {Charles A. Ellis and Mohammad S.E. Sendi and Robyn L. Miller and Vince D. Calhoun},
  title = {{A Gradient-based Spectral Explainability Method for EEG Deep Learning Classifiers}},
  year = {2021},
  doi = {10.1101/2021.07.14.452360},
  howpublished = {bioRxiv},
}
Figure