Table of Contents
Fetching ...

xEEGNet: Towards Explainable AI in EEG Dementia Classification

Andrea Zanola, Louis Fabrice Tshimanga, Federico Del Pup, Marco Baiesi, Manfredo Atzori

TL;DR

xEEGNet tackles the need for interpretable AI in EEG-based dementia classification by evolving ShallowNet into a compact white-box model. It achieves this with a frozen band-pass first layer and a depthwise second layer, yielding 168 trainable parameters and clear spectral/topographic interpretability. Despite its small size, xEEGNet delivers comparable performance to ShallowNet while reducing cross-split variability, and its dense-layer weights align with known dementia spectral profiles. The study also discusses limitations of resting-state spectral power for diagnosis and advocates multimodal data integration to enhance accuracy.

Abstract

This work presents xEEGNet, a novel, compact, and explainable neural network for EEG data analysis. It is fully interpretable and reduces overfitting through major parameter reduction. As an applicative use case, we focused on classifying common dementia conditions, Alzheimer's and frontotemporal dementia, versus controls. xEEGNet is broadly applicable to other neurological conditions involving spectral alterations. We initially used ShallowNet, a simple and popular model from the EEGNet-family. Its structure was analyzed and gradually modified to move from a "black box" to a more transparent model, without compromising performance. The learned kernels and weights were examined from a clinical standpoint to assess medical relevance. Model variants, including ShallowNet and the final xEEGNet, were evaluated using robust Nested-Leave-N-Subjects-Out cross-validation for unbiased performance estimates. Variability across data splits was explained using embedded EEG representations, grouped by class and set, with pairwise separability to quantify group distinction. Overfitting was assessed through training-validation loss correlation and training speed. xEEGNet uses only 168 parameters, 200 times fewer than ShallowNet, yet retains interpretability, resists overfitting, achieves comparable median performance (-1.5%), and reduces variability across splits. This variability is explained by embedded EEG representations: higher accuracy correlates with greater separation between test set controls and Alzheimer's cases, without significant influence from training data. xEEGNet's ability to filter specific EEG bands, learn band-specific topographies, and use relevant spectral features demonstrates its interpretability. While large deep learning models are often prioritized for performance, this study shows smaller architectures like xEEGNet can be equally effective in EEG pathology classification.

xEEGNet: Towards Explainable AI in EEG Dementia Classification

TL;DR

xEEGNet tackles the need for interpretable AI in EEG-based dementia classification by evolving ShallowNet into a compact white-box model. It achieves this with a frozen band-pass first layer and a depthwise second layer, yielding 168 trainable parameters and clear spectral/topographic interpretability. Despite its small size, xEEGNet delivers comparable performance to ShallowNet while reducing cross-split variability, and its dense-layer weights align with known dementia spectral profiles. The study also discusses limitations of resting-state spectral power for diagnosis and advocates multimodal data integration to enhance accuracy.

Abstract

This work presents xEEGNet, a novel, compact, and explainable neural network for EEG data analysis. It is fully interpretable and reduces overfitting through major parameter reduction. As an applicative use case, we focused on classifying common dementia conditions, Alzheimer's and frontotemporal dementia, versus controls. xEEGNet is broadly applicable to other neurological conditions involving spectral alterations. We initially used ShallowNet, a simple and popular model from the EEGNet-family. Its structure was analyzed and gradually modified to move from a "black box" to a more transparent model, without compromising performance. The learned kernels and weights were examined from a clinical standpoint to assess medical relevance. Model variants, including ShallowNet and the final xEEGNet, were evaluated using robust Nested-Leave-N-Subjects-Out cross-validation for unbiased performance estimates. Variability across data splits was explained using embedded EEG representations, grouped by class and set, with pairwise separability to quantify group distinction. Overfitting was assessed through training-validation loss correlation and training speed. xEEGNet uses only 168 parameters, 200 times fewer than ShallowNet, yet retains interpretability, resists overfitting, achieves comparable median performance (-1.5%), and reduces variability across splits. This variability is explained by embedded EEG representations: higher accuracy correlates with greater separation between test set controls and Alzheimer's cases, without significant influence from training data. xEEGNet's ability to filter specific EEG bands, learn band-specific topographies, and use relevant spectral features demonstrates its interpretability. While large deep learning models are often prioritized for performance, this study shows smaller architectures like xEEGNet can be equally effective in EEG pathology classification.
Paper Structure (39 sections, 9 equations, 7 figures, 3 tables)

This paper contains 39 sections, 9 equations, 7 figures, 3 tables.

Figures (7)

  • Figure 1: Architecture Variation. Panel A shows how the median weighted accuracy (blue line) and the number of trainable parameters (orange line) vary with the various models reported in \ref{['tab:weights']}. The black dots are the weighted accuracies of all the 50 train-validation-test splits inside the N-LNSO procedure. In red the random guess baseline for a 3-class classification problem. Panel B shows how the median number of epochs (green line) and the number of trainable parameters (orange line) vary considering the same models before. The black dots are number of epochs of all the 50 train-validation-test splits inside the N-LNSO procedure. The number of epochs here reported are the ones associated to the best models found and retrieved with Early Stopping. While the performance does not correlate with the logarithm of the number of trainable parameters, the number of epochs significantly does ($\rho(12)=-.93,~p<.001$, $Adj.~R^2=.86$).
  • Figure 2: Filters in the first layer. The frequency response of the seven temporal filters in the first layer can be inspected using Bode's plots. In red there is the magnitude in decibel (dB), while in black the phase measured in radians (rad); on the horizontal axis there is the frequency range divided into the seven EEG bands considered. Frequencies are visualized in the [1,45]Hz range.
  • Figure 3: Scalp topographies learned in the second layer. On top of the figure, the set of scalp topographies learned in the best slip, while on the bottom part those learned with the worst split. The color-bars are equal for all the plots, indicating the value of the weights; in red there are the positive weights while in blue the negative ones. The scalp topographies report the weights values interpolated across the scalp surface.
  • Figure 4: Correlation between activations at the beginning of the dense layer and average (over channels) band powers for the test set. The figure consists of seven panels, one for each EEG band. The x-axis shows the average band power $\mathcal{F}_X$ defined in \ref{['equ: Fx']} calculated directly on the EEG windows. The y-axis shows the flatten activations $\mathcal{F}$ of xEEGNet. Values of both axis are expressed in decibel (dB). Blue dots indicate the input windows of the test set, while the red line is the linear fitted model. Axis limits are equal for all the seven sub-plots.
  • Figure 5: Weights learned in the dense layer. The upper part of the figure shows the weights learned in the dense layer, for the best split (left) and the worst split (right). The colour bars are equal for both plots and indicate the weights values, in red the positive and in blue the negative ones. The y-axis indicates the class label, where 'CTL' indicates control, 'FTD' frontotemporal dementia and 'AD' Alzheimer's disease. In the x-axis is reported the EEG bands investigated. In the lower part of the figure it is shown, the largest positive weight for each class and EEG band, for the best split (left) and the worst split (right).
  • ...and 2 more figures