Deep learning has revolutionized automated sleep staging, with models now rivaling human experts in accuracy. However, for a clinician, a high accuracy score isn't enough. If a model classifies a 30-second window of brain activity as "Deep Sleep" (N3), the clinician needs to know if the model is actually looking at the characteristic delta waves or just picking up on random noise or artifacts. This is especially critical for patients with Obstructive Sleep Apnea (OSA), where breathing interruptions can create "fragmentation artifacts" that confuse standard models.
A new paper, "Towards Explainable Sleep Stage Classification using Single-Channel Electroencephalogram," tackles this trust gap by systematically evaluating how different Explainable AI (XAI) methods perform when tasked with explaining sleep stage predictions.
TL;DR
The researchers benchmarked five XAI methods to see which best aligns with clinical "ground truth" biomarkers in EEG signals. They found that Integrated Gradients (IG) consistently provides the most reliable explanations across both healthy subjects and patients with varying severities of sleep apnea, significantly outperforming common methods like Grad-CAM.
What Problem Does This Paper Address?
Clinical adoption of AI for sleep staging is stalled by a lack of interpretability. While models can hit 85%+ accuracy, they remain "black boxes." Clinicians need to verify that predictions are grounded in established biomarkers defined by the American Academy of Sleep Medicine (AASM), such as alpha rhythms for wakefulness or sleep spindles for Stage N2.
This challenge is magnified in patients with Obstructive Sleep Apnea (OSA). Apnea events introduce high-frequency noise that can obscure real sleep signals. Without explainability, it’s impossible to know if a model has truly learned to navigate OSA-altered brain activity or if it’s just "cheating" by exploiting artifacts.
Methods
The authors utilized a CNN-CRF architecture. A Convolutional Neural Network (CNN) acts as an encoder to extract features from raw 1D EEG signals, while a Conditional Random Field (CRF) decoder ensures the predicted sequence of sleep stages follows realistic physiological patterns (e.g., you don't typically jump directly from deep sleep to being wide awake).
The core of the study is the comparison of five XAI attribution methods:
- Modified Grad-CAM (the previous standard in this niche)
- Vanilla Saliency
- DeepLIFT
- SHAP (GradientExplainer)
- Integrated Gradients (IG)
To evaluate these, they didn't just look at the heatmaps; they calculated the Spearman rank correlation between the XAI attribution intensity and the actual power of the relevant AASM frequency bands (like delta waves for N3). This provides a quantitative "fidelity score" for how well the AI's "reasoning" aligns with clinical reality.
Datasets
- Sleep-EDF: A standard benchmark featuring 39 recordings from 20 healthy young adults.
- DREAMT: A more challenging clinical dataset of 100 OSA patients, stratified into four groups based on their Apnea-Hypopnea Index (AHI): Normal (<5), Mild (5–14), Moderate (15–29), and Severe (≥30).
Key Insights and Ideas
- Integrated Gradients is the Gold Standard for 1D EEG: Unlike simple gradient methods that can suffer from "saturation" (where the gradient becomes zero even if a feature is important), IG integrates gradients along a path. This makes it much more robust for identifying the specific oscillations that define sleep stages.
- The "Apnea Tax" on Explanations: As OSA severity increases, the quality of the explanations (attribution fidelity) generally decreases. This suggests that the noise introduced by apnea doesn't just make the stages harder to classify, it makes the model's internal logic less aligned with traditional biomarkers.
- Grad-CAM's Limitations: While popular in computer vision, Grad-CAM performed the worst in this study. Its low-resolution activation maps (which must be upsampled to match the 3,000-point EEG signal) limit its temporal precision, making it less useful for clinical EEG analysis.
Key Results
- Classification: The CNN-CRF model outperformed a baseline CNN-CNN model across all groups. However, accuracy dropped as OSA severity increased (from 76.1% in the Normal group to 67.5% in the Severe group).
- XAI Fidelity: Integrated Gradients (IG) achieved the highest mean attribution fidelity across all five sleep stages on Sleep-EDF and all AHI groups on DREAMT.
- Qualitative Alignment: Visualizing IG heatmaps showed clear alignment with physiological markers. For example, in N2 sleep, the attribution peaks coincided perfectly with sleep spindle bursts.
Limitations and Future Work
The study focused exclusively on gradient-based XAI methods. The authors note that perturbation-based methods (like LIME) or attention-based mechanisms might offer different, complementary insights.
Additionally, the "minority" sleep stages (N1 and N3) remain difficult to classify and explain due to class imbalance in the datasets. Future work will likely look into "CRF-aware" attribution methods, as the current XAI techniques were applied only to the CNN encoder, effectively bypassing the sequence-smoothing logic of the CRF.
Summary updated