Detecting Cognitive Stress in Knowledge Work Using Keyboard and Mouse Interaction Behavior
Publication Date : Jul-08-2026
Author(s) :
Volume/Issue :
Abstract :
Cognitive stress is a common obstacle in knowledge-requiring workspaces and is recognized to influence both performance and motor control. The most established stress-detection systems require complex hardware including physiological and wearable sensors that detect the following factors: heart rate, electrodermal activity, respiratory activity, skin temperature, and pupil/eye measures. Systems have rarely been created with the purpose of stress detection through behavioral interaction signals alone. This study explores this lacuna by investigating whether cognitive stress can be detected from keyboard and mouse behavior alone. Keyboard and mouse interaction offers a minimal-sensing alternative. Using the publicly available SWELL-KW dataset, the study extracts nine interaction features (five keyboard and four mouse features) over one-minute intervals. Logistic regression and random forest classifiers are trained then evaluate the nine features under a leave-one-participant-out cross-validation against a majority-class baseline. The accuracy under simple behaviors is below that of complex multi-modal systems, which is the cost of looking at the feasibility of the model. The behavioral signal is genuine but weak: pooled ROC-AUC reaches 0.58-0.61 (above the 0.50 chance level) and PR-AUC 0.66-0.70 (above the 0.615 prevalence baseline), and macro-F1 0.54-0.58. Both modalities performed comparably, with total mouse-movement distance as the strongest single predictor. Combining the modalities produces a statistical gain for both models. Aggregating predictions to the task-block level improved discrimination (ROC-AUC up to 0.72). Behavior-only stress detection is feasible and non-intrusive, but currently provides weak, highly person-dependent accuracy.
