Implementation of a Stress Biomarker and Development of a Deep Neural Network-Based Multi-Mental State Classification Model
Abstract
1. Introduction
2. Materials and Methods
2.1. Data Source and Composition
2.2. Data Preprocessing
2.3. Modeling Approach
2.4. Performance Evaluation Indicators
2.5. Model Analysis Techniques
3. Results
3.1. Model Performance Evaluation
3.1.1. Classification Model Results
3.1.2. Regression Model Results
3.2. Model Interpretation
4. Discussion
4.1. Model Performance Interpretation
4.2. Biomarker Interpretation
4.3. Advantages of Deep Learning Time Series Models
4.4. Future Research Directions
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Immanuel, S.; Teferra, M.N.; Baumert, M.; Bidargaddi, N. Heart Rate Variability for Evaluating Psychological Stress Changes in Healthy Adults: A Scoping Review. Neuropsychobiology 2023, 82, 187–202. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Lazarou, E.; Exarchos, T.P. Predicting stress levels using physiological data: Real-time stress prediction models utilizing wearable devices. AIMS Neurosci. 2024, 11, 76–102. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Pinge, A.; Gad, V.; Jaisighani, D.; Ghosh, S.; Sen, S. Detection and monitoring of stress using wearables: A systematic review. Front. Comput. Sci. 2024, 6, 1478851. [Google Scholar] [CrossRef]
- Saddaf Khan, N.; Qadir, S.; Anjum, G.; Uddin, N. StresSense: Real-Time detection of stress-displaying behaviors. Int. J. Med. Inf. 2024, 185, 105401. [Google Scholar] [CrossRef] [PubMed]
- Cano, S.; Cubillos, C.; Alfaro, R.; Romo, A.; García, M.; Moreira, F. Wearable Solutions Using Physiological Signals for Stress Monitoring on Individuals with Autism Spectrum Disorder (ASD): A Systematic Literature Review. Sensors 2024, 24, 8137. [Google Scholar] [CrossRef]
- Wen, Q.; Zhou, T.; Zhang, C.; Chen, W.; Ma, Z.; Yan, J.; Sun, L. Transformers in time series: A survey. arXiv 2022, arXiv:2202.07125. [Google Scholar]
- Lim, B.; Zohren, S. Time-series forecasting with deep learning: A survey. Philos. Trans. R. Soc. A 2021, 379, 20200209. [Google Scholar] [CrossRef] [PubMed]
- Kim, H.G.; Song, S.; Cho, B.H.; Jang, D.P. Deep learning-based stress detection for daily life use using single-channel EEG and GSR in a virtual reality interview paradigm. PLoS ONE 2024, 19, e0305864. [Google Scholar] [CrossRef]
- Waters, S.H.; Clifford, G.D. Comparison of deep transfer learning algorithms and transferability measures for wearable sleep staging. BioMed Eng. OnLine 2022, 21, 66. [Google Scholar] [CrossRef] [PubMed]
- Pölz, A.; Blaschke, A.P.; Komma, J.; Farnleitner, A.H.; Derx, J. Transformer Versus LSTM: A Comparison of Deep Learning Models for Karst Spring Discharge Forecasting. Water Resour. Res. 2024, 60, e2022WR032602. [Google Scholar] [CrossRef]
- Lundberg, S.M.; Erion, G.; Chen, H.; DeGrave, A.; Prutkin, J.M.; Nair, B.; Katz, R.; Himmelfarb, J.; Bansal, N.; Lee, S.-I. From local explanations to global understanding with explainable AI for trees. Nat. Mach. Intell. 2020, 2, 56–67. [Google Scholar] [CrossRef]
- Ponce-Bobadilla, A.V.; Schmitt, V.; Maier, C.S.; Mensing, S.; Stodtmann, S. Practical guide to SHAP analysis: Explaining supervised machine learning model predictions in drug development. Clin. Transl. Sci. 2024, 17, e70056. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Moser, M.K.; Ehrhart, M.; Resch, B. An Explainable Deep Learning Approach for Stress Detection in Wearable Sensor Measurements. Sensors 2024, 24, 5085. [Google Scholar] [CrossRef]
- Jaber, D.; Hajj, H.; Maalouf, F.; El-Hajj, W. Medically-oriented design for explainable AI for stress prediction from physiological measurements. BMC Med. Inform. Decis. Mak. 2022, 22, 38. [Google Scholar] [CrossRef] [PubMed]
- Byun, S.; Kim, A.Y.; Shin, M.-S.; Jeon, H.J.; Cho, C.-H. Automated classification of stress and relaxation responses in major depressive disorder, panic disorder, and healthy participants via heart rate variability. Front. Psychiatry 2025, 15, 1500310. [Google Scholar] [CrossRef]
- Siirtola, P.; Röning, J. Comparison of regression and classification models for user-independent and personal stress detection. Sensors 2020, 20, 4402. [Google Scholar] [CrossRef] [PubMed]
- Liu, Y.; Qin, X.; Gao, Y.; Li, X.; Feng, C. SETransformer: A Hybrid Attention-Based Architecture for Robust Human Activity Recognition. arXiv 2025, arXiv:2505.19369v1. [Google Scholar] [CrossRef]
- Hasan, K.; Saquer, J.; Ghosh, M. Advancing Mental Disorder Detection: A Comparative Evaluation of Transformer and LSTM Architectures on Social Media. arXiv 2025, arXiv:2507.19511. [Google Scholar]
- Xia, P.; Zeng, W.; Ni, Y.; Jin, Y. Pressure Classification Analysis on CNN-Transformer-LSTM Hybrid Model. J. Artif. Intell. 2024, 6, 361–377. [Google Scholar] [CrossRef]
- Chrousos, G.P. Stress and disorders of the stress system. Nat. Rev. Endocrinol. 2009, 5, 374–385. [Google Scholar] [CrossRef]
- Agorastos, A.; Mansueto, A.C.; Hager, T.; Pappi, E.; Gardikioti, A.; Stiedl, O. Heart Rate Variability as a Translational Dynamic Biomarker of Altered Autonomic Function in Health and Psychiatric Disease. Biomedicines 2023, 11, 1591. [Google Scholar] [CrossRef]
- Pulopulos, M.M.; Vanderhasselt, M.A.; De Raedt, R. Association between changes in heart rate variability during the anticipation of a stressful situation and the stress-induced cortisol response. Psychoneuroendocrinology 2018, 94, 63–71. [Google Scholar] [CrossRef] [PubMed]
- Stefenon, S.F.; Matos-Carvalho, J.P.; Leithardt, V.R.Q.; Yow, K.-C. CNN-TFT explained by SHAP with multi-head attention weights for time series forecasting. arXiv 2025, arXiv:2510.06840. [Google Scholar]
- Sadashiva, S.; Manjunath, K.G. Multimodal Deep Learning Framework Using Transformer and LSTM Models for Suicide Risk Detection from Social Media and Voice Data. Int. J. Saf. Secur. Eng. 2025, 15, 1445–1459. [Google Scholar] [CrossRef]
- Alghieth, M. DeepECG-Net: A hybrid transformer-based deep learning model for real-time ECG anomaly detection. Sci. Rep. 2025, 15, 20714. [Google Scholar] [CrossRef]
- Liu, C.; Guan, Q.; Zhang, W.; Sun, L.; Wang, M.; Dong, X.; Xu, S. MultiScaleSleepNet: A Hybrid CNN–BiLSTM–Transformer Architecture for Single-Channel EEG Sleep Stage Classification. Sensors 2025, 25, 6328. [Google Scholar] [CrossRef] [PubMed]
- Jadav, J.; Chauhan, U. Heart Rate Variability Based LSTM Model for Stress Detection with Explainable AI Insights. Int. J. Intell. Syst. Appl. Eng. 2024, 12, 1918–1927. [Google Scholar]
- Radha, M.; Fonseca, P.; Moreau, A.; Ross, M.; Cerny, A.; Anderer, P.; Long, X.; Aarts, R.M. Sleep stage classification from heart-rate variability using long-short-term memory neural networks. Sci. Rep. 2019, 9, 14149. [Google Scholar] [CrossRef]
- Gandin, I.; Scagnetto, A.; Romani, S.; Barbati, G. Interpretability of time-series deep learning models: A study in cardiovascular patients admitted to Intensive care unit. J. Biomed. Inform. 2021, 121, 103876. [Google Scholar] [CrossRef]
- Jallow, J.; Hurtig, T.; Kerkelä, M.; Miettunen, J.; Halt, A.H. Prenatal maternal stress, breastfeeding and offspring ADHD symptoms. Eur. Child. Adolesc. Psychiatry 2024, 33, 4003–4011. [Google Scholar] [CrossRef]
- Ruiru, D.K.; Jouandeau, N.; Odhiambo, D. LSTM versus Transformers: A Practical Comparison of Deep Learning Models for Trading Financial Instruments. In Proceedings of the 2023 International Conference on Signal Processing and Information Security (ICSPIS), Dubai, United Arab Emirates, 8–9 November 2023; pp. 1–6. [Google Scholar]
- Gabrielli, D.; Prenkaj, B.; Velardi, P. Seamless Monitoring of Stress Levels Leveraging a Foundational Model for Time Sequences. arXiv 2024, arXiv:2407.03827. [Google Scholar]
- Kasnesis, P.; Chatzigeorgiou, C.; Feidakis, M.; Gutiérrez, Á.; Patrikakis, C. TranSenseFusers: A temporal CNN-Transformer neural network family for explainable PPG-based stress detection. Biomed. Signal Process. Control 2025, 102, 107248. [Google Scholar] [CrossRef]
- Lu, Z.; Ozek, B.; Kamarthi, S. Transformer encoder with multiscale deep learning for pain classification using physiological signals. Front. Physiol. 2023, 14, 1294577. [Google Scholar] [CrossRef] [PubMed]
- Johnson, A.E.W.; Bulgarelli, L.; Shen, L.; Gayles, A.; Shammout, A.; Horng, S.; Pollard, T.J.; Hao, S.; Moody, B.; Gow, B.; et al. MIMIC-IV, a freely accessible electronic health record dataset. Sci. Data 2023, 10, 1. [Google Scholar] [CrossRef] [PubMed]
- Mouadili, M.; En-Naimi, E.M.; Koulissi, M. Advancing Stress Detection and Health Monitoring with Deep Learning Approaches. Comput. Sci. Math. Forum 2025, 10, 10. [Google Scholar] [CrossRef]
- Stojchevska, M.; Steenwinckel, B.; Van Der Donckt, J.; De Brouwer, M.; Goris, A.; De Turck, F.; Van Hoecke, S.; Ongenae, F. Assessing the added value of context during stress detection from wearable data. BMC Med. Inform. Decis. Mak. 2022, 22, 268. [Google Scholar] [CrossRef]
- Bolpagni, M.; Pardini, S.; Dianti, M.; Gabrielli, S. Personalized Stress Detection Using Biosignals from Wearables: A Scoping Review. Sensors 2024, 24, 3221. [Google Scholar] [CrossRef]







| Hyperparameters | Settings |
|---|---|
| Number of encoder layers | 4 |
| Number of self-attention heads | 8 |
| Embedding dimension | 128 |
| Feedforward layer dimension | 512 |
| Dropout ratio | 0.1 |
| Optimizer (optimization algorithm) | Adam |
| Initial learning rate | 0.001 |
| Learning rate decay (scheduler) | Apply (decrease by 0.1 every 10 epochs) |
| Number of epochs | 50 |
| Batch size | 64 |
| Loss function | Mean Squared Error (MSE) |
| Hyperparameter tuning method | Validation Set-Based Search (Random Search) |
| Model | Accuracy | F1-Score | ROC AUC | PR AUC | R2 |
|---|---|---|---|---|---|
| Random Forest | 0.940 | 0.935 | 0.980 | 0.970 | 0.910 |
| Light GBM | 0.962 | 0.960 | 0.992 | 0.988 | 0.931 |
| LSTM | 0.974 | 0.973 | 0.994 | 0.992 | 0.942 |
| Transformer | 0.982 | 0.981 | 0.997 | 0.995 | 0.951 |
| Validation Method | Accuracy (Mean ± Std) | F1-Score (Mean ± Std) | ROC-AUC (Mean ± Std) |
|---|---|---|---|
| LOSO CV (by subject) | 94.0 ± 16.8% | 92.0 ± 20.0% | 99.0 ± 1.0% |
| Repeated 5 × 10 CV | 91.0 ± 0.5% | 90.0 ± 0.6% | 99.1 ± 0.2% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lee, S.; Jo, J.; Bang, S.; Jeong, J. Implementation of a Stress Biomarker and Development of a Deep Neural Network-Based Multi-Mental State Classification Model. Bioengineering 2025, 12, 1352. https://doi.org/10.3390/bioengineering12121352
Lee S, Jo J, Bang S, Jeong J. Implementation of a Stress Biomarker and Development of a Deep Neural Network-Based Multi-Mental State Classification Model. Bioengineering. 2025; 12(12):1352. https://doi.org/10.3390/bioengineering12121352
Chicago/Turabian StyleLee, Sangsik, Jaehyun Jo, Sohyeon Bang, and Jinhyoung Jeong. 2025. "Implementation of a Stress Biomarker and Development of a Deep Neural Network-Based Multi-Mental State Classification Model" Bioengineering 12, no. 12: 1352. https://doi.org/10.3390/bioengineering12121352
APA StyleLee, S., Jo, J., Bang, S., & Jeong, J. (2025). Implementation of a Stress Biomarker and Development of a Deep Neural Network-Based Multi-Mental State Classification Model. Bioengineering, 12(12), 1352. https://doi.org/10.3390/bioengineering12121352

