In this work, we investigate the problem of recognizing mental stress using electroencephalography (EEG) and machine learning, with the explicit objective of developing an interpretable and effective model across different task conditions. To this end, we implement a supervised learning pipeline on two publicly available EEG datasets, SAM40 and WAUC, the latter of which involves controlled tasks with varying cognitive and physical demands. Following standard preprocessing, we extract a broad range of well-established EEG-derived features -including spectral power, entropy-based complexity measures, and hemispheric asymmetries- and train an XGBoost classifier to distinguish between stress levels. To interpret the model’s decision process, we employ SHAP (SHapley Additive exPlanations), which quantifies the contribution of each feature to the model’s predictions at both individual and population levels. Our results reveal that a restricted subset of features, particularly gamma-band asymmetries and entropy measures, consistently dominates the decision process across subjects. Moreover, the set of important features varies systematically with changes in physical load, suggesting the existence of condition-specific EEG patterns associated with stress.

EEG-Based Mental Stress Detection: A Comparative and Explainable Study Across Tasks and Subjects / F. Agnelli, G. Blandano, J. Burger, A. D'Amelio, G. Facchi, O. Ghezzi, R. Lanzarotti, L. Schmid (LECTURE NOTES IN COMPUTER SCIENCE). - In: Image Analysis and Processing[s.l] : Springer, 2026. - ISBN 9783032113160. - pp. 17-28 (( ICIAP Workshops : Proceedings Part I : International Conference : September 15 – 19 Roma 23 [10.1007/978-3-032-11317-7_2].

EEG-Based Mental Stress Detection: A Comparative and Explainable Study Across Tasks and Subjects

F. Agnelli
Primo
;
G. Blandano
Secondo
;
J. Burger
;
A. D'Amelio;G. Facchi;R. Lanzarotti
Penultimo
;
L. Schmid
Ultimo
2026

Abstract

In this work, we investigate the problem of recognizing mental stress using electroencephalography (EEG) and machine learning, with the explicit objective of developing an interpretable and effective model across different task conditions. To this end, we implement a supervised learning pipeline on two publicly available EEG datasets, SAM40 and WAUC, the latter of which involves controlled tasks with varying cognitive and physical demands. Following standard preprocessing, we extract a broad range of well-established EEG-derived features -including spectral power, entropy-based complexity measures, and hemispheric asymmetries- and train an XGBoost classifier to distinguish between stress levels. To interpret the model’s decision process, we employ SHAP (SHapley Additive exPlanations), which quantifies the contribution of each feature to the model’s predictions at both individual and population levels. Our results reveal that a restricted subset of features, particularly gamma-band asymmetries and entropy measures, consistently dominates the decision process across subjects. Moreover, the set of important features varies systematically with changes in physical load, suggesting the existence of condition-specific EEG patterns associated with stress.
EEG; Interpretability; SHAP; Stress; PhysiologicalSensing;
Settore INFO-01/A - Informatica
2026
Book Part (author)
File in questo prodotto:
File Dimensione Formato  
978-3-032-11317-7_2.pdf

accesso riservato

Tipologia: Publisher's version/PDF
Licenza: Nessuna licenza
Dimensione 639.78 kB
Formato Adobe PDF
639.78 kB Adobe PDF   Visualizza/Apri   Richiedi una copia
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2434/1210215
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
  • OpenAlex 0
social impact