An interpretable machine learning approach to multimodal stress detection in a simulated office environment

Mara Naegelin, Raphael P Weibel, Jasmine I Kerr, Victor R Schinazi, Roberto La Marca, Florian von Wangenheim, Christoph Hoelscher, Andrea Ferrario

Research output: Contribution to journalArticleResearchpeer-review

9 Citations (Scopus)


BACKGROUND AND OBJECTIVE: Work-related stress affects a large part of today's workforce and is known to have detrimental effects on physical and mental health. Continuous and unobtrusive stress detection may help prevent and reduce stress by providing personalised feedback and allowing for the development of just-in-time adaptive health interventions for stress management. Previous studies on stress detection in work environments have often struggled to adequately reflect real-world conditions in controlled laboratory experiments. To close this gap, in this paper, we present a machine learning methodology for stress detection based on multimodal data collected from unobtrusive sources in an experiment simulating a realistic group office environment (N=90).

METHODS: We derive mouse, keyboard and heart rate variability features to detect three levels of perceived stress, valence and arousal with support vector machines, random forests and gradient boosting models using 10-fold cross-validation. We interpret the contributions of features to the model predictions with SHapley Additive exPlanations (SHAP) value plots.

RESULTS: The gradient boosting models based on mouse and keyboard features obtained the highest average F1 scores of 0.625, 0.631 and 0.775 for the multiclass prediction of perceived stress, arousal and valence, respectively. Our results indicate that the combination of mouse and keyboard features may be better suited to detect stress in office environments than heart rate variability, despite physiological signal-based stress detection being more established in theory and research. The analysis of SHAP value plots shows that specific mouse movement and typing behaviours may characterise different levels of stress.

CONCLUSIONS: Our study fills different methodological gaps in the research on the automated detection of stress in office environments, such as approximating real-life conditions in a laboratory and combining physiological and behavioural data sources. Implications for field studies on personalised, interpretable ML-based systems for the real-time detection of stress in real office environments are also discussed.

Original languageEnglish
Article number104299
Pages (from-to)104299
JournalJournal of Biomedical Informatics
Early online date30 Jan 2023
Publication statusPublished - Mar 2023


Dive into the research topics of 'An interpretable machine learning approach to multimodal stress detection in a simulated office environment'. Together they form a unique fingerprint.

Cite this