Investigating lightweight and interpretable machine learning models for efficient and explainable stress detection
Authors:
Open Access
- 13 August 2025
- journal article
- research article
- Published by Frontiers Media SA in Frontiers in Digital Health
- Vol. 7, 1523381
Abstract
Stress is a common human reaction to demanding circumstances, and prolonged and excessive stress can have detrimental effects on both mental and physical health. Heart rate variability (HRV) is widely used as a measure of stress due to its ability to capture variations in the time intervals between heartbeats. However, achieving high accuracy in stress detection through machine learning (ML), using a reduced set of statistical features extracted from HRV, remains a significant challenge. In this study, we aim to address these challenges by proposing lightweight ML models that can effectively detect stress using minimal HRV features and are computationally efficient enough for IoT deployment. We have developed ML models incorporating efficient feature selection techniques and hyper-parameter tuning. The publicly available SWELL-KW dataset has been utilized for evaluating the performance of our models. Our results demonstrate that lightweight models such as -NN and Decision Tree can achieve competitive accuracy while ensuring lower computational demands, making them ideal for real-time applications. Promisingly, among the developed models, the -nearest neighbors (-NN) algorithm has emerged as the best-performing model, achieving an accuracy score of 99.3 using only three selected features. To confirm real-world deployability, we benchmarked the best model on an 8 GB NVIDIA Jetson Orin Nano edge device, where it retained 99.26% accuracy and completed training in 31 s. Furthermore, our study has incorporated local interpretable model-agnostic explanations to provide comprehensive insights into the predictions made by the -NN-based architecture.
Keywords
This publication has 34 references indexed in Scilit:
- Classification of Mental Stress from Wearable Physiological Sensors Using Image-Encoding-Based Deep Neural NetworkBiosensors, 2022
- Real-time mental stress detection using multimodality expressions with a deep learning frameworkFrontiers in Neuroscience, 2022
- MuLHiTA: A Novel Multiclass Classification Framework With Multibranch LSTM and Hierarchical Temporal Attention for Early Detection of Mental StressIEEE Transactions on Neural Networks and Learning Systems, 2022
- Estimating Left Ventricle Ejection Fraction Levels Using Circadian Heart Rate Variability Features and Support Vector Regression ModelsIEEE Journal of Biomedical and Health Informatics, 2020
- Heart and Brain Interaction of Psychiatric Illness: A Review Focused on Heart Rate Variability, Cognitive Function, and Quantitative ElectroencephalographyClinical Psychopharmacology and Neuroscience, 2019
- An Overview of Heart Rate Variability Metrics and NormsFrontiers in Public Health, 2017
- Biological and psychological markers of stress in humans: Focus on the Trier Social Stress TestNeuroscience & Biobehavioral Reviews, 2014
- Autonomic nervous system activity in emotion: A reviewBiological Psychology, 2010
- The Elements of Statistical Learning2009
- Logistic regression and artificial neural network classification models: a methodology reviewJournal of Biomedical Informatics, 2002