Acute Stress Detection through Typing Behaviors, Smartphone Sensors and Machine Learning Techniques

Objectives: To examine whether acute stress can be recognised from smartphone typing behaviour and device motion without wearable sensors, and to identify the classifier family best suited to such data. Method: A browser-based application recorded keystroke events together with accelerometer and gyroscope readings (2 Hz) while 288 participants typed simple number series (calm condition) and mental-arithmetic sequences (stress condition), yielding 2,016 samples. Five keystroke timing features and the inertial features were combined, and ten supervised classifiers were trained and tested on the same stratified 80:20 split using accuracy, AUC and weighted and macro precision, recall and F1-score. Findings: Ensemble methods outperformed the linear, probabilistic, distance-based and neural models. XGBoost achieved the best result, with 89.30% accuracy and an AUC of 95.42%, and Random Forest was close behind (88.72%, 95.32%); Naïve Bayes was weakest (57.98%). Weighted and macro F1 scores of the leading models differed by less than 0.3 points, indicating balanced detection of both classes. The accuracy exceeds the 87.56% reported by the closest smartphone motion-sensor study on 46 participants, and the ranking of XGBoost ahead of Random Forest agrees with recent wearable-sensor studies. Unlike deep models applied to dense physiological signals, the multilayer perceptron performed poorly on these compact behavioural features, which indicates that tree ensembles suit this type of data better. Novelty: Keystroke dynamics and smartphone inertial sensing are combined in one installation-free, synchronised protocol and benchmarked with ten classifiers on a cohort six times larger than the closest smartphone study. Keywords: Acute Stress Detection, Keystroke Dynamics, Smartphone Sensing, Machine Learning, Behavioural Biometrics

Authors

Institutions

Publication Details

Journal
Indian Journal of Science and Technology
Published
2026-11-03
DOI
https://doi.org/10.17485/ijst/v19i38.1223
Primary Topic
Emotion and Mood Recognition
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Acute Stress Detection through Typing Behaviors, Smartphone Sensors and Machine Learning Techniques

Sandip Dutta, Utpal Roy, Soumen Roy, Purba Banerjee
2 links
Indian Journal of Science and Technology
Emotion and Mood Recognition
article

Acute Stress Detection through Typing Behaviors, Smartphone Sensors and Machine Learning Techniques

Sandip Dutta, Utpal Roy, Soumen Roy, Purba Banerjee
article en

Abstract

Objectives: To examine whether acute stress can be recognised from smartphone typing behaviour and device motion without wearable sensors, and to identify the classifier family best suited to such data. Method: A browser-based application recorded keystroke events together with accelerometer and gyroscope readings (2 Hz) while 288 participants typed simple number series (calm condition) and mental-arithmetic sequences (stress condition), yielding 2,016 samples. Five keystroke timing features and the inertial features were combined, and ten supervised classifiers were trained and tested on the same stratified 80:20 split using accuracy, AUC and weighted and macro precision, recall and F1-score. Findings: Ensemble methods outperformed the linear, probabilistic, distance-based and neural models. XGBoost achieved the best result, with 89.30% accuracy and an AUC of 95.42%, and Random Forest was close behind (88.72%, 95.32%); Naïve Bayes was weakest (57.98%). Weighted and macro F1 scores of the leading models differed by less than 0.3 points, indicating balanced detection of both classes. The accuracy exceeds the 87.56% reported by the closest smartphone motion-sensor study on 46 participants, and the ranking of XGBoost ahead of Random Forest agrees with recent wearable-sensor studies. Unlike deep models applied to dense physiological signals, the multilayer perceptron performed poorly on these compact behavioural features, which indicates that tree ensembles suit this type of data better. Novelty: Keystroke dynamics and smartphone inertial sensing are combined in one installation-free, synchronised protocol and benchmarked with ten classifiers on a cohort six times larger than the closest smartphone study. Keywords: Acute Stress Detection, Keystroke Dynamics, Smartphone Sensing, Machine Learning, Behavioural Biometrics

Indian Journal of Science and TechnologyVol. 19(38)
Visva-Bharati University (IN), Adamas University (IN)
Good health and well-being
Openalex Percentile: Top 11%
Emotion and Mood Recognition
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon