NeuroXAI: Adaptive, Robust, Explainable Surrogate Framework for Determination of Channel Importance in EEG Application
Choel-Hui Lee, Daesun Ahn, Hakseung Kim, Eun Jin Ha, Jung-Bin Kim and Dong-Joo Kim
[Paper]] [BibTeX] [Paper With Code]
Abstract 🔥
Electroencephalogram (EEG)-based applications often require numerous channels to achieve high performance, which limits their widespread use. Various channel selection methods have been proposed to identify minimum EEG channels without compromising performance. However, most of these methods are limited to specific data paradigms or prediction models. We propose NeuroXAI, a novel method that identifies channel importance regardless of the type of EEG application. It integrates the surrogate analysis algorithm to optimize EEG signals and the data sampling algorithm, which effectively selects from highly voluminous EEG data. The efficacy of channel selection via the proposed method was evaluated through three datasets acquired under different paradigms (motor imagery, steady-state visually evoked potentials, and event-related potentials). On datasets based on these paradigms, NeuroXAI-based channel selection reduced the number of channels while maintaining or enhancing performance. The advantages of the proposed method include enhanced performance and robustness over varying data paradigms and the type of prediction model. The XAI technique enables intuitive interpretation regarding the constructed model operation, making it applicable in various fields such as model debugging and model interpretation. NeuroXAI has the potential to be used as a practical tool to develop better EEG applications.
Installation 💿
The code requires python>=3.5, as well as lime and mne >= 1.8.0.
install NeuroXAI
>> pip install neuroxai
or clone the repository locally and install with
>> git clone git@github.com:dlcjfgmlnasa/NeuroXAI.git
>> cd NeuroXAI
>> pip install -e .
Usage 🤖
(Example 1) NeuroXAI for sinlge EEG sample
from neuroxai.explanation import BrainExplainer
kernel_width = 25 # exponential smoothing kernel size
num_samples = 500 # training sample size
replacement_method = 'mean' # permutation type {mean, zero, noise}
label_idx_list = [i for i, _ in enumerate(class_names)]
explainer = BrainExplainer(kernel_width=kernel_width, class_names=class_names)
exp = explainer.explain_instance(data=x, # x => (channel_num, signal_length)
classifier_fn=classifier_fn, # pretrained model
labels=label_idx_list,
num_samples=num_samples,
replacement_method=replacement_method)
exp.as_list(label=class_idx) # [result] => channel importance for each class
(Example 2) NeuroXAI for entire EEG samples
from neuroxai.explanation import BrainExplainer
from neuroxai.explanation import GlobalBrainExplainer
kernel_width = 25 # exponential smoothing kernel size
num_samples = 500 # training sample size
replacement_method = 'mean' # permutation type {mean, zero, noise}
explainer = BrainExplainer(kernel_width=kernel_width, class_names=class_names)
global_exp = GlobalBrainExplainer(explainer=explainer)
global_exp.explain_instance(x=x, # x => (epoch_size, channel_num, signal_length)
y=y, # y => (epoch_size, 1)
classifier_fn=classifier_fn, # pretrained model
num_samples=num_samples,
replacement_method=replacement_method)
global_exp.explain_classes_channel_importance() # [result1] => Global channel importance for each class
global_exp.explain_global_channel_importance() # [result2] => Global channel importance
Tutorials 
- NeuroXAI for FBCSP (Filter Bank Common Spatial Pattern)
- NeuroXAI for EEGNet
- NeuroXAI based Channel Selection
- NeuroXAI based Model Debugging
License and Citation 📰
The software is licensed under the Apache License 2.0. Please cite the following paper if you have used this code
@article{lee2025neuroxai,
title={NeuroXAI: Adaptive, robust, explainable surrogate framework for determination of channel importance in EEG application},
author={Lee, Choel-Hui and Ahn, Daesun and Kim, Hakseung and Ha, Eun Jin and Kim, Jung-Bin and Kim, Dong-Joo},
journal={Expert Systems with Applications},
volume={261},
pages={125364},
year={2025},
publisher={Elsevier}
}
Metadata
Release files for neuroxai 0.0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neuroxai-0.0.0.4.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neuroxai-0.0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.1 kB
Release files / neuroxai-0.0.0.4.tar.gz
| Download URL | neuroxai-0.0.0.4.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8144db85b955cf646a65ac3b95cf10c9b2e6595f193148f0b750e3b952d81be
|
|
BLAKE2b-256 checksum How to use checksums |
2ec93eabfe76327f4f4fd2867f82864854955ec410b3752ec34b212c55f27046
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.13
|
Release files / neuroxai-0.0.0.4-py3-none-any.whl
| Download URL | neuroxai-0.0.0.4-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ef978e1d21c8252a8af7073c62a512c78cf2d4b52225f31f3f124b3b803cba0
|
|
BLAKE2b-256 checksum How to use checksums |
2e9c229e51aedbea51beddd1b662072df6cf186c80134eeb5c4967ce24998dc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.13
|