A Confound-Aware Framework for Multi-Class EEG Classification and Explainable Model Evaluation
Ahmed Alqurashi, Abdullah AlharthiObjective diagnosis in psychiatry remains challenging due to the lack of reliable biological markers and the presence of confounding variables in observational data. While EEG-based machine learning models have shown promising classification performance, their validity remains unclear when confounding factors such as age are not explicitly controlled. In this work, we propose a confound-aware mathematical framework for supervised learning, where classification is formulated as a mapping f:RE×C×T→Y under the presence of a confounding variable A. Within this formulation, model performance is interpreted as a function of both predictive structure and confound dependence. The proposed framework integrates classification, regression, and feature selection into a unified evaluation pipeline. A central contribution is the Cross-Task Explanation Concordance (CTEC) index, a rank-based metric that quantifies the stability of feature importance across models and predictive tasks. Experimental results on a large-scale EEG dataset (N = 670) demonstrate that deep learning models outperform handcrafted approaches under standard evaluation. However, under confound-controlled settings, handcrafted models show a dual response to confound control: age residualization improves classification by removing feature-level noise (+20.3%), while age-matching collapses performance to chance (balanced accuracy, BA = 0.238) by eliminating demographic separability. Deep learning models retain partial robustness under both conditions. These findings highlight that conventional performance metrics may overestimate model validity in the presence of structured bias. The proposed framework provides a general mathematical approach for evaluating supervised learning models under confounding effects and is applicable to a wide range of data-driven systems beyond EEG.