EEG-Based Acute Stress Detection for Post-Trauma Rehabilitation and Biofeedback: Limits of Cross-Dataset Generalisation
Abstract
Objective. EEG stress classifiers are usually trained and tested on a single dataset, and accuracies above 90% are common in the literature. We asked how much of this performance holds for participants the model has never seen, and for a dataset recorded with other hardware and another stress protocol. Approach. Two open datasets were processed with one pipeline: SAM40 (40 participants; Stroop, arithmetic and mirror-image tasks versus relaxation; 32-channel Emotiv, 128 Hz) and EEGMAT (36 participants; serial subtraction versus rest; 19-channel clinical system, 500 Hz). Four compact classifiers (logistic regression, random forest and RBF-SVM on band power, and a Riemannian tangent-space classifier) were evaluated with leave-one-subject-out (LOSO) validation, with cross-corpus transfer in both directions on ten shared electrodes, and with two unsupervised alignment methods, Riemannian re-centring and CORAL. Main results. Within SAM40, the best LOSO macro-F1 for one stressor against relaxation was 70.3% (best AUROC 0.804). Cross-corpus transfer lowered macro-F1 significantly in 22 of 24 model–direction–stressor settings (pairedWilcoxon test, ???? < 0.01), by up to 37.6 percentage points. Transfer was asymmetric: classifiers trained on EEGMAT reached an AUROC below 0.5 on SAM40 in 9 of 12 settings, so the learned decision direction was reversed. Re-centring improved within-corpus performance (EEGMAT macro-F1 from 0.690 to 0.728) but not transfer, whereas CORAL raised the EEGMAT→SAM40 AUROC of band-power models by 0.04–0.19. Removing ocular components with ICA reduced band-power macro-F1 by only 1.1–3.0 points. Significance. Stress labels defined by the task carry protocol-specific information that does not survive a change of dataset. Cross-corpus testing should come before any claim that an EEG stress detector is ready for everyday or biofeedback use.