Wei YG, Yang LH, Qin SS, Chen YL, Yan JN, Liu RX, Ma YM, Wang C, Song ZJ, Wang F, Ji GJ. Mental stress recognition using interpretable machine learning models with heart rate variability among Chinese university students. World J Psychiatry 2026; 16(6): 116013 [DOI: 10.5498/wjp.v16.i6.116013]
Corresponding Author of This Article
Guang-Jun Ji, PhD, Chief Physician, Head, Professor, Department of Early Intervention, The Second Affiliated Hospital of Xinxiang Medical University, Qianjin Road, Xinxiang 453002, Henan Province, China. jiguangjun@163.com
Research Domain of This Article
Psychiatry
Article-Type of This Article
research-article
Open-Access Policy of This Article
This article is an open-access article which was selected by an in-house editor and fully peer-reviewed by external reviewers. It is distributed in accordance with the Creative Commons Attribution Non Commercial (CC BY-NC 4.0) license, which permits others to distribute, remix, adapt, build upon this work non-commercially, and license their derivative works on different terms, provided the original work is properly cited and the use is non-commercial. See: http://creativecommons.org/licenses/by-nc/4.0/
Baishideng Publishing Group Inc, 7041 Koll Center Parkway, Suite 160, Pleasanton, CA 94566, USA
Share the Article
Wei YG, Yang LH, Qin SS, Chen YL, Yan JN, Liu RX, Ma YM, Wang C, Song ZJ, Wang F, Ji GJ. Mental stress recognition using interpretable machine learning models with heart rate variability among Chinese university students. World J Psychiatry 2026; 16(6): 116013 [DOI: 10.5498/wjp.v16.i6.116013]
Yan-Ge Wei, Department of Psychiatry, The Second Affiliated Hospital of Xinxiang Medical University, Xinxiang 453002, Henan Province, China
Lu-Han Yang, Shi-Sen Qin, Yuan-Le Chen, Jin-Nan Yan, Yi-Meng Ma, Chao Wang, Zhen-Jie Song, Guang-Jun Ji, Department of Early Intervention, The Second Affiliated Hospital of Xinxiang Medical University, Xinxiang 453002, Henan Province, China
Rong-Xun Liu, School of Public Health, Xinxiang Medical University, Xinxiang 453002, Henan Province, China
Fei Wang, Department of Psychiatry, Yale University, School of Medicine, New Haven, CT 06511, United States
Co-corresponding authors: Fei Wang and Guang-Jun Ji.
Author contributions: Wei YG and Yang LH conceptualized and designed the study; Qin SS, Chen YL, Yan JN, and Liu RX collected and managed the data; Ma YM, Wang C, and Song ZJ conducted the statistical analysis; Wei YG and Yang LH wrote the original draft; Ji GJ and Wang F reviewed and edited the manuscript, and they contributed equally to this manuscript and are co-corresponding authors. All authors have read and approved the final manuscript.
Supported by the Young and Middle-aged Health Science and Technology Innovation Talents Project of Henan Province, No. JQRC2025014; Graduate Education Reform Project of Henan Province, No. 2023SJGLX063Y and No. 2023SJGLX010Y; General Project of Henan Province Education Science, No. 2023YB0135; and Henan Provincial University Humanities and Social Science Research General Project, No. 2025-ZZJH-317.
Institutional review board statement: The study was approved by the Research Ethics Committee of the Second Affiliated Hospital of Xinxiang Medical University (Approval Code: XYEFYLL-2023-35-4). The study was conducted according to the Declaration of Helsinki. Written informed consent was obtained from all participants and their legal guardians.
Informed consent statement: Written informed consent was obtained from all individual participants included in the study. All data were anonymized to protect participant privacy.
Conflict-of-interest statement: All the authors report no relevant conflicts of interest for this article.
STROBE statement: The authors have read the STROBE Statement-checklist of items, and the manuscript was prepared and revised according to the STROBE Statement-checklist of items.
Data sharing statement:
The data that support the findings of this study are available on request from the corresponding author (jiguangjun@163.com). The data are not publicly available due to privacy or ethical restrictions.
Corresponding author: Guang-Jun Ji, PhD, Chief Physician, Head, Professor, Department of Early Intervention, The Second Affiliated Hospital of Xinxiang Medical University, Qianjin Road, Xinxiang 453002, Henan Province, China. jiguangjun@163.com
Received: October 31, 2025 Revised: December 31, 2025 Accepted: February 9, 2026 Published online: June 19, 2026 Processing time: 209 Days and 16.5 Hours
Abstract
BACKGROUND
Chinese university students face significant stressors that impact mental health and academic performance, highlighting the need for reliable assessment tools. Self-report scales, while useful, are susceptible to biases. Heart rate variability (HRV) offers an objective measure of autonomic nervous system activity under stress. This study combined HRV with interpretable machine learning to improve stress detection. We hypothesized that stressed students would show altered HRV parameters and that machine learning models could effectively classify stress status, with specific HRV features being key contributors.
AIM
To investigate the utility of HRV-based interpretable machine learning models for identifying mental stress.
METHODS
In this study, conducted at the Second Affiliated Hospital of Xinxiang Medical University, China, 65 students with stress (Perceived Stress Scale score > 26) and 142 controls were recruited. Resting-state HRV parameters were collected. Eleven HRV parameters showing significant inter-group differences were used to train six machine learning classifiers. Model performance was evaluated via 10-fold cross-validation using area under the curve, accuracy, precision, recall, and F1 score. SHapley Additive exPlanations analysis interpreted feature contributions.
RESULTS
Compared to controls, the stress group showed significantly higher values in eight HRV parameters [e.g., Diastolic Pressure-Time Index (DPTI)/Systolic Pressure-Time Index (SPTI): 0.46 ± 0.17 vs 0.40 ± 0.13, P = 0.019] and lower values in three parameters (e.g., significantly lower values in compliance of arterial vascular volume: 11.71 ± 1.66 mL/mmHg vs 12.2 ± 1.41 mL/mmHg, P = 0.029). Among the classifiers, random forest achieved the best performance with an area under the curve of 0.733 (95% confidence interval: 0.655-0.811), accuracy of 0.689, precision of 0.705, recall of 0.665, and F1 score of 0.675. SHapley Additive exPlanations analysis identified DPTI/SPTI as the most important feature for classification.
CONCLUSION
Integrating HRV with interpretable machine learning, particularly random forest, provides an objective tool for stress assessment, with DPTI/SPTI being a key physiological indicator.
Core Tip: This study integrated heart rate variability (HRV) parameters with six machine learning algorithms to distinguish between individuals with and without mental stress among Chinese university students. The random forest classifier exhibited the optimal classification performance. Among eleven significantly altered HRV parameters in the stress group, the SHapley Additive exPlanations analysis identified the Diastolic/Systolic Pressure-Time Index of the heart as the most significant parameter. Combining HRV parameters and a random forest model provides an objective methodology to enhance early stress detection and personalized mental health monitoring in the Chinese university students.
Citation: Wei YG, Yang LH, Qin SS, Chen YL, Yan JN, Liu RX, Ma YM, Wang C, Song ZJ, Wang F, Ji GJ. Mental stress recognition using interpretable machine learning models with heart rate variability among Chinese university students. World J Psychiatry 2026; 16(6): 116013
University students in China experience considerable stress due to academic, career, interpersonal, and self-worth pressures[1,2], which can adversely affect their well-being, academic performance, and mental health[3]. Given that university students are in a critical transitional phase of life, effective stress management is crucial for their academic success and overall growth. There is an urgent need to develop reliable tools for stress assessment. Currently, stress evaluation predominantly depends on self-report psychological scales, such as the Perceived Stress Scale (PSS)[4,5]. Although these measures have well-established psychometric properties and clinical utility, they are inherently limited by factors such as recall bias, social desirability bias, and transient emotional states, which can undermine the validity of stress assessments[6,7]. Therefore, integrating psychological scales with objective physiological measures, such as heart rate variability (HRV), represents a promising avenue for enhancing the precision and reliability of stress evaluation within this population.
HRV is a non-invasive, objective indicator of mental stress, reflecting autonomic nervous system (ANS) activity[8,9]. An established inverse relationship exists between stress and HRV, where increased stress leads to decreased HRV, signaling ANS imbalance[9,10]. Under mental stress, there is an increase in sympathetic nervous system activity and a decrease in parasympathetic activity, leading to a reduction in HRV[10]. From a physiological perspective, stress disrupts the integrative functions of central autonomic networks and induces hyperactivity in the hypothalamic-pituitary-adrenal axis. This results in a reduced release of gamma-aminobutyric acid, an inhibitory neurotransmitter, and an increased secretion of adrenocorticotropic hormone, thereby disrupting the equilibrium between the sympathetic and vagus nerves[11]. Such autonomic dysregulation has a direct impact on cardiac rhythmicity, which is reflected in alterations in HRV parameters[12]. Previous studies have demonstrated a strong correlation between HRV-based algorithms and self-reported stress levels[13]. Consequently, this study selected HRV as a non-invasive, objective tool for assessing mental stress levels and monitoring associated health risks. Recent advancements in computational methodologies, particularly in machine learning algorithms, show considerable promise in stress detection[14]. The integration of machine learning techniques into mental health has opened new avenues for the detection, prediction, and monitoring of stress.
A comprehensive scoping review underscores the efficacy of various machine learning algorithms, including random forest (RF), neural networks, and support vector machines (SVM), which have consistently demonstrated superior accuracy and robustness in stress detection tasks[15]. These models employ physiological parameters, such as heart rate and skin response, as stress predictors due to their substantial explanatory power and the ease with which data can be acquired[15,16]. Chen and Lee[17] used convolutional neural networks to analyze photoplethysmography (PPG) and electrocardiogram (ECG) signals collected during stress-inducing tasks. Ahuja et al[18] employed SVM and RF algorithms to detect stress among university students using HRV parameters; SVM achieved the highest accuracy. While machine learning holds significant potential for stress detection, these models often operate as “black boxes” that necessitate further interpretation[18]. In this context, SHapley Additive exPlanations (SHAP) is a well-established post-hoc interpretability method that ranks selected features based on their contributions, with larger values indicating a greater contribution[19,20]. The majority of existing research on stress predominantly emphasizes group differences and utilizes one or more machine learning techniques. However, the integration of HRV and multiple machine learning models with SHAP interpretability analysis among Chinese university students is rarely reported.
Therefore, this study aimed to evaluate the utility of interpretable machine learning models based on HRV parameters for identifying mental stress among Chinese university students. We specifically addressed three questions: (1) Do HRV parameters differ between stressed and non-stressed students? (2) Can machine learning models effectively classify stress status using these parameters? And (3) Which HRV parameter contributes most to the classification? We hypothesized that an interpretable machine learning framework would provide an objective and effective tool for stress detection. To the best of our knowledge, this is among the first studies to integrate multiple interpretable machine learning algorithms with SHAP analysis for mental stress assessment based on HRV in Chinese university students.
MATERIALS AND METHODS
Participants
A cohort of 207 participants comprising 65 individuals experiencing mental stress and 142 controls was recruited from Xinxiang Medical University, Henan province, China. The inclusion criteria for the mental stress group were: (1) Aged between 18 years old and 25 years old; (2) A PSS score exceeding 26; and (3) Willing and able to complete psychological assessments and HRV. The control group was selected based on the following inclusion criteria: (1) Aged 18 years old to 25 years old; and (2) A PSS score of 25 or below. Exclusion criteria for all participants were: (1) The presence of suicidal ideation; (2) A history of alcohol or drug abuse and dependence; (3) A history of severe physical illnesses, such as hypertension or metastatic tumors; and (4) A history of neurological abnormalities, including head trauma seizures, cerebrovascular diseases or brain tumors, and neurodegenerative diseases. All participants provided written informed consent approved by the institutional review boards of the Second Affiliated Hospital of Xinxiang Medical University (No. XYEFYLL-2023-35-4), in accordance with the Declaration of Helsinki’s Ethical Principles of Medical Research Involving Human Subjects. Figure 1 summarizes the design of this study.
Figure 1 The flowchart of this study.
A: A cohort of 207 Chinese university students was recruited for participation in this cross-sectional study. Psychological questionnaires and resting-state heart rate variability (HRV) data were collected from each student; B: Following data preprocessing, we extracted 72 standard HRV parameters for analysis. A statistical comparison was performed between the stress and control groups; C: These HRV parameters were subsequently used as input variables for the development of six machine learning-based classification models, which were constructed using ten-fold cross-validation. The performance was evaluated, and the importance of the selected HRV parameters was assessed. aP < 0.05; PSS: Perceived Stress Scale; PHQ-9: Patient Health Questionnaire-9; GAD-7: Generalized Anxiety Disorder-7; ISI: Insomnia Severity Index; HRV: Heart rate variability; SHAP: SHapley Additive exPlanations; RF: Random Forest; XGBoost: EXtreme Gradient Boosting; KNN: K-Nearest Neighbors; LightGBM: Light Gradient Boosting Machine; SVC: Support Vector Machine; NB: Naive Bayes.
Psychological assessment
All psychological questionnaires, general information, living conditions, and lifestyle information were administered via the official WeChat-based platform. The PSS was employed to evaluate participants’ stress levels, comprising 14 items that assess individuals’ feelings and experiences over the preceding month. Each item is scored on a scale from 0 to 4, with higher scores indicating greater perceived stress. In this study, a PSS total score exceeding 26 was defined as stress[21,22]. Depression was assessed by the self-rated Patient Health Questionnaire-9. Severity of anxiety was assessed by the Generalized Anxiety Disorder-7, and sleep quality was evaluated using the Insomnia Severity Index. To mitigate potential biases inherent in self-assessment, a rigorous quality control protocol was implemented. All participants submitted their questionnaires through an encrypted WeChat platform, ensuring anonymity and minimizing social desirability bias. Field investigators underwent standardized training to ensure consistent supervision of data collection. After data collection, two researchers independently reviewed the data to eliminate duplicate submissions, logical inconsistencies (e.g., extreme age values or uniform responses), and ambiguous responses (e.g., “don’t know”).
Physiological measurement
HRV was measured using a dedicated device (Sichuan Credit Pharmaceutical Co., Ltd., Sichuan, China) in the Department of Neuroelectrophysiology, the Second Affiliated Hospital of Xinxiang Medical University. Data collection took place between March 1, 2024, and April 1, 2024. To accommodate participants’ academic schedules, HRV measurements were conducted within a daily time window of 9:00 AM to 9:00 PM. This HRV device supports dual-channel physiological data collection, including PPG and ECG, and permits the adjustment of measurement duration according to specific testing requirements. The associated stress analysis system quantifies ANS activity, thereby providing a digital representation of participants’ stress states and evaluating mental stress through quantitative psychophysiological parameters. To ensure data accuracy, participants were instructed to abstain from vigorous physical activities, tobacco, caffeine, alcohol, and certain medications on the day of the physiological assessments. Upon arrival at the examination room, participants were required to rest for a minimum of 10 minutes to stabilize their emotional state and acclimate to the environment prior to undergoing HRV measurement, which was conducted under the supervision of research staff. The HRV measurements were conducted in a quiet environment with the temperature maintained between 23 °C and 27 °C and adequate lighting. During the measurement process, spot electrodes were placed on each participant’s chest for ECG recording. Concurrently, a finger clip sensor was attached to the index finger of one hand, with it positioned downward and resting above the thigh, to facilitate PPG measurement. Participants were seated comfortably in a semi-reclined position and instructed to relax. They were asked to refrain from speaking or moving during the 5-minute resting HRV data collection. A researcher was present throughout the measurement process to provide necessary guidance and support.
In this study, physiological parameters were systematically categorized into two primary groups: HRV parameters and cardiovascular system parameters[22,23]. The HRV parameters were further subdivided into frequency domain parameters, which are utilized to evaluate the ANS’s regulatory capacity on cardiac function, typically through the application of Fourier transform to analyze the spectral characteristics of heart rate signals. Additionally, time-domain parameters were utilized to capture the temporal characteristics of HRV, primarily by directly measuring successive heartbeat interval changes to evaluate the responsiveness of the ANS. Furthermore, cardiovascular system parameters were included to evaluate the health status and physiological function of the cardiovascular system, including metrics such as blood pressure, cardiac output, and vascular resistance. As a result, this methodology produced a total of 72 standard HRV parameters. The detailed information is shown in Supplementary Table 1.
Statistical analysis
The sample size was calculated with the G*Power 3.1 software, employing the following parameters: (1) Test family: T tests; (2) Statistical test: Difference between two independent means (two groups); (3) Type of power analysis: A priori compute required sample size; and (4) An α-error probability of 0.05, power (1-β error probability) of 0.80. Multiple imputation was utilized to maintain dataset completeness and enhance the reliability and validity of the results. The normality of continuous variables was assessed using the Kolmogorov-Smirnov one-sample test, which confirmed that all variables were normally distributed. Continuous data conforming to a normal distribution were expressed as mean ± SD, while non-normally distributed continuous data were reported as medians with interquartile ranges. Categorical data were presented as frequencies and percentages. Independent samples t-tests were employed to compare continuous variables, whereas χ2 tests were used for categorical variables. Data analysis was conducted using SPSS version 25.0, with statistical significance set at a two-tailed P-value of < 0.05. Multiple comparisons were corrected using the false discovery rate.
Classification of stress using six machine learning algorithms
In this study, we employed six distinct machine learning algorithms for classification: RF, eXtreme Gradient Boosting (XGBoost), K-Nearest Neighbors (KNN), Light Gradient Boosting Machine (LightGBM), Support Vector Classification (SVC), and Naive Bayes (NB). For feature selection, we hypothesized that HRV parameters exhibiting significant changes might possess enhanced discriminative capabilities. Consequently, we utilized two-tailed Student’s t-tests to identify statistically significant HRV parameters for input. Prior to model training, feature standardization was performed using Z-score normalization to achieve a mean of zero and a unit variance, thereby facilitating accelerated convergence and reducing feature bias. We employed the imbalanced-learn package, implementing a hybrid sampling strategy that combined K-SMOTE oversampling for the minority class with random undersampling for the majority class. The parameters of six machine learning algorithms are as follows. RF: Number of trees (n - estimators: 10, 100, 200, 500, 1000), maximum depth (max - depth: None, 5). SVC: Regularization parameter (C: 0.1, 1, 10, 100, 1000), kernel types (“linear”, “rbf”, “poly”), gamma set to default. LightGBM: Number of boosting iterations (n - estimators: 100, 200, 500, 1000), learning rate (0.1, 0.05, 0.025, 0.01). XGBoost: Number of boosting iterations (n - estimators: 100, 200, 500, 1000), learning rate (0.1, 0.05, 0.025, 0.01). KNN: Number of neighbors (n - neighbors: 3, 5, 7, 9), weighting scheme (“uniform”, “distance”), search algorithms (“auto”, “ball-tree”, “kd-tree”, “brute”). NB: Variance smoothing parameter (var - smoothing: 1e-9, 1e-8, 1e-7, 1e-6). A 10-fold cross-validation framework was utilized to ensure robust training and testing partitions. Within each fold, hyperparameter optimization was conducted via nested stratified 10-fold cross-validation using GridSearchCV. Model performance was evaluated using the area under the receiver operating characteristic curve (AUC), accuracy, precision, recall, and F1 score. To interpret model predictions and assess feature contributions, SHAP was employed to rank features according to their impact on classification outcomes, thereby providing a deeper understanding of the relationship between HRV parameters and stress. All implementations were carried out in Python 3.10 using the scikit-learn library.
RESULTS
Demographic characteristics
The sample size calculation indicated that a minimum of 128 participants was necessary to achieve sufficient statistical power. In the study, 65 students experiencing stress and 142 controls were involved to strengthen the statistical power and ensure the reliability of the results. The normality of the data was evaluated using the Shapiro-Wilk W-test (P > 0.05). Compared to controls, the stress group exhibited higher scores on the PSS, Patient Health Questionnaire-9, Generalized Anxiety Disorder-7 score, and ISI score (P < 0.05). The characteristics of subjects are described in detail in Table 1.
Table 1 Demographic variables and heart rate variability parameters of control and stress groups among Chinese university students, mean ± SD.
Significant changes in HRV parameters in the stress group
The stress group demonstrated significantly higher values in time domain index (TDI), standard deviation of NN intervals (SDNN), SDNN5, frequency domain index (FDI), total power spectrum (TPS), total power (TP), very low frequency (VLF), Diastolic/Systolic Pressure-Time Index of the heart (DPTI/SPTI); significantly lower values in compliance of arterial vascular volume (C1), ejection elasticity index (EEI), and augmentation index (AI), in comparison to the control group (Figure 2 and Table 1). To assess whether the identified HRV alterations were confounded by tobacco and alcohol use, we subdivided the stress group into two subgroups according to their tobacco and alcohol use information: Smoker vs. non-smoker subgroups and drinkers vs non-drinkers. No significant differences in HRV values were observed between the tobacco and alcohol use subgroups after false discovery rate correction.
Figure 2 Significant differences in the heart rate variability parameters between the stress and control groups among Chinese university students.
Significance level was set at P < 0.05. aP < 0.05; TSP: Total power spectrum; TDI: Time domain index; FDI: Frequency domain index; SDNN: Standard deviation of NN intervals; SDNN5: 5-minute mean of standard deviation of NN intervals; VLF: Very low frequency; TP: Total power; DPTI/SPTI: Diastolic/systolic pressure-time index of the heart; C1: Compliance of arterial vascular volume; AI: Augmentation index; EEI: Ejection elasticity index.
Classification results
Based on the above results, eleven HRV parameters with significant alterations were selected as inputs for the machine learning algorithm. Prior to model training, Z-score normalization was applied to mitigate feature biases. The RF model demonstrated superior classification performance, with an AUC of 0.733 [95% confidence interval (CI): 0.655-0.811], accuracy of 0.689, precision of 0.705, recall of 0.665, and F1 score of 0.675, outperforming XGBoost, KNN, LightGBM, SVC, and NB. The performance of other models, in terms of AUC (95%CI), was as follows: XGBoost [0.722 (0.635-0.809)], KNN [0.711 (0.639-0.783)], LightGBM [0.700 (0.623-0.777)], SVC [0.693 (0.607-0.779)], and NB [0.648 (0.566-0.730)] (Figure 3 and Table 2).
Machine learning model feature contribution analysis (SHAP)
To interpret the predictions of the optimal RF model and identify the most influential HRV parameters, we employed SHAP. The summary plot (Figure 4A) ranks the 11 input features by their mean absolute SHAP value, which represents the average impact of each feature on the model output magnitude across all samples. In this plot, longer horizontal bars indicate greater overall importance. DPTI/SPTI emerged as the most important feature. The accompanying beeswarm plot (Figure 4B) details the distribution of SHAP values for each feature. In this plot, each point represents an individual, with the horizontal position indicating the impact of that feature’s value on the prediction. Positive SHAP values shift the prediction towards the “stress” class, while negative values shift it towards “non-stress”. The color represents the raw feature value, with red indicating high values and blue indicating low values. For DPTI/SPTI, a clear pattern is observed: Higher values (red points) are predominantly associated with positive SHAP values, contributing to a “stress” classification, whereas lower values (blue points) are associated with negative SHAP values. The contributions of other significant features from the statistical comparison (e.g., TSP, VLF, C1, AI) are also visualized, with their directions of effect consistent with the univariate group differences reported in Table 1.
Figure 4 Feature importance analysis based on SHapley Additive exPlanations method.
The heart rate variability parameters identified by SHapley Additive exPlanations (SHAP) for the random forest model are ranked according to their importance, from most to least. A: Mean absolute SHAP values (bar plot). Feature importance is assessed by computing the mean of the absolute SHAP values for each feature. A bar plot illustrates the mean absolute SHAP values for the heart rate variability parameters, with larger bars indicating greater importance in distinguishing between stress and non-stress states; B: SHAP value distribution (beeswarm plot). Each point represents the SHAP value for an individual sample, red and blue colors indicating higher and lower values, respectively. DPTI/SPTI: Diastolic/Systolic Pressure-Time Index of the Heart; TDI: Time Domain Index; FDI: Frequency Domain Index; SDNN: Standard Deviation of NN Intervals; VLF: Very Low Frequency; SDNN5: 5-Minute Mean of Standard Deviation of NN Intervals; C1: Compliance of arterial vascular volume; AI: Augmentation Index; TSP: Total Power Spectrum; TP: Total Power; EEI: Ejection Elasticity Index; SHAP: SHapley Additive exPlanations.
DISCUSSION
This study incorporated HRV parameters with six interpretable machine learning algorithms to differentiate between individuals with and without mental stress among Chinese university students. The research yielded three principal findings. Firstly, university students experiencing mental stress exhibited elevated values in TDI, SDNN, SDNN5, FDI, TSP, TP, VLF, and DPTI/SPTI, reduced values in C1, EEI, and AI, suggesting autonomic dysfunction and early cardiovascular maladaptation. Secondly, the integration of HRV parameters with RF algorithms demonstrated superior performance in detecting mental stress, achieving a higher AUC of 0.733. Thirdly, SHAP analysis identified DPTI/SPTI as the most significant parameter in the optimal model, potentially reflecting stress-induced myocardial oxygen supply-demand imbalance with sensitivity. Therefore, these findings support the integration of HRV parameters with six interpretable machine learning algorithms as an effective approach for identifying mental stress among university students in China.
The current study identified increased levels of TDI, SDNN, SDNN5, FDI, TSP, TP, VLF, and DPTI/SPTI, alongside decreased levels of C1, EEI, and AI among Chinese university students experiencing mental stress. These alterations may indicate distinct physiological mechanisms underlying chronic academic stress as opposed to acute stress. Chronic stress may not provoke intense, transient antagonism between the sympathetic and vagal nerves; instead, it may lead to a depletion of the overall “reserve function” of the ANS, manifested as higher values in TSP and SDNN. Specifically, increased TSP suggests enhanced global autonomic outflow and systemic neurohormonal activation under stress[24]. Higher VLF is strongly associated with sympathetic overdrive and reflects vasomotor instability as well as cortisol-mediated cardiovascular strain[10,25]. VLF signifies impaired baroreflex sensitivity and reduced parasympathetic modulation, indicating a decline in vagal tone during prolonged psychological stress[26,27]. TSP and VLF are widely used indices for assessing shifts in sympathovagal balance, and their alterations here align with the autonomic profile expected during a “fight-or-flight” response[12,28]. Elevated SDNN and SDNN5 values may indicate a shift in the physiological regulatory system from rapid compensation to long-term decompensation under chronic stress[26,29]. The DPTI/SPTI ratio may possess greater discriminative value for assessing stress, as it also signifies the transition of the physiological regulatory system from rapid compensation to long-term decompensation under chronic stress[26,29]. Stress affects not only ANS activity but also myocardial perfusion and systolic performance[30,31]. Under stress conditions, university students exhibited decreased C1, EEI, and AI, indicating reduced vascular elasticity and diminished cardiovascular adaptive capacity[32,33]. A decline in C1 suggests arterial stiffening, often resulting from sustained sympathetic activation and elevated cortisol levels, which impairs the artery’s ability to buffer pulsatile pressure[30]. Reduced EEI indicates decreased ventricular ejection efficiency, potentially linked to increased cardiac afterload and altered ventricular-arterial coupling due to stress[34,35]. A reduction value in AI, coupled with a diminished amplitude of wave reflection, may indicate peripheral vasoconstriction and microcirculatory dysfunction[36,37]. Collectively, these alterations in HRV parameters could represent underlying physiological mechanisms associated with circadian autonomic dysfunction and early cardiovascular maladaptation triggered by mental stress, which may have implications for early intervention.
The robustness of the identified HRV signature is further supported by its specificity within the stressed population. The absence of significant differences in key HRV parameters between substance users and non-users within the stress group suggests that the observed autonomic dysregulation is more directly attributable to the physiological impact of psychological stress itself, rather than being a secondary effect of correlated lifestyle factors.
Among the six machine learning algorithms evaluated, the RF classifier demonstrated superior and most stable performance in distinguishing between stress and non-stress states, achieving the highest AUC of 0.733. The 95%CI for RF’s AUC was 0.655-0.811. Notably, this CI was relatively narrow compared to other top-performing models (e.g., XGBoost: 0.635-0.809), indicating a more precise and reliable estimate of its performance. Furthermore, the substantial overlap in the CIs of RF, XGBoost, and KNN suggests that while RF had the highest point estimate, the performance differences among these models may not be statistically significant. In contrast, the NB classifier had the lowest and widest CI (0.566-0.730), with its lower bound falling well below that of all other models, confirming its comparatively poor and unstable fit for this task. The superior performance of RF is largely attributable to its inherent suitability for managing complex, multidimensional physiological data such as HRV[38]. RF could capture potential non-linear interactions among HRV parameters (e.g., frequency-domain metrics like VLF and time-domain features like SDNN), which may reflect the intricate regulatory dynamics of the ANS under stress[9].
By implementing an ensemble learning approach that constructs multiple decorrelated decision trees and synthesizes their predictions, RF significantly reduces overfitting, making it particularly advantageous for modeling limited physiological datasets[39-41]. Furthermore, its resilience to class imbalance - achieved through bootstrapping and the use of randomized feature subsets - complements our hybrid K-SMOTE oversampling and random undersampling strategy, thereby enhancing model stability[42]. As a non-parametric method, RF requires no strict assumptions regarding data distribution and efficiently handles high-dimensional feature spaces without explicit feature scaling, which aligns with its growing application in HRV-based mental state assessment[43]. RF emerges as a computationally efficient and interpretable algorithm, well-suited for identifying autonomic patterns and enhancing classification accuracy in objective stress assessment. Therefore, utilizing HRV measurement through machine learning methodologies could enhance the detection and classification of stress among Chinese university students.
SHAP analysis identified DPTI/SPTI as the most significant HRV parameter in the RF model, providing insights into the cardiovascular underpinnings of mental stress. DPTI/SPTI is a hemodynamic index that reflects the balance between myocardial oxygen supply and demand[44]. Alterations in DPTI/SPTI values suggest an imbalance towards increased myocardial oxygen demand, likely due to sympathetic nervous system-induced tachycardia and enhanced contractility, in conjunction with potentially reduced coronary perfusion[45], a well-documented consequence of chronic sympathetic activation[24]. This finding is consistent with existing physiological evidence indicating that stress induces sympathetic overactivation, which accelerates heart rate and shortens diastole, thereby compromising coronary perfusion and altering the DPTI/SPTI ratio. Mental stress activates the sympathetic nervous system, resulting in the release of norepinephrine and epinephrine, which in turn increase heart rate and enhance myocardial contractility. This hemodynamic marker’s significance highlights the substantial influence of stress beyond neural autonomic regulation, extending to cardiovascular dysfunction characterized by altered cardiac timing and perfusion efficiency. Furthermore, the relevance of the DPTI/SPTI ratio extends to the disruption of circadian rhythms. The model’s dependence on this ratio may indicate the potential disturbance of circadian ANS regulation under chronic stress conditions[46]. The ANS naturally exhibits an inherent circadian rhythm, characterized by sympathetic dominance during daytime activity and parasympathetic dominance during nighttime rest[47]. Chronic stress disrupts this rhythm, resulting in circadian autonomic dysfunction, where excessive sympathetic activation persists into periods typically characterized by vagal nerve dominance[48,49]. The loss of rhythmic variability in autonomic tone subsequently compromises coronary perfusion dynamics[50,51]. The DPTI/SPTI ratio directly reflects impaired diastolic perfusion duration relative to systolic load, a condition further exacerbated by stress-induced tachycardia and the loss of protective nocturnal vagal activity. In conclusion, the significant role of DPTI/SPTI in the RF model is linked to chronic stress-induced circadian autonomic dysfunction and its adverse impact on coronary perfusion. DPTI/SPTI may serve as a sensitive HRV parameter that enhances the objective assessment of stress[52].
Several limitations warrant consideration. Firstly, the modest sample size (n = 207) and recruitment from a single site may limit the generalizability of the findings. Although the university attracts students from across the nation, the single-site sampling limits demographic diversity. Secondly, HRV was measured solely at rest, which does not capture physiological responses during actual stress. Future studies should incorporate acute stress paradigms (e.g., social stress tasks) or ecological scenarios (e.g., exam periods) to enable a dynamic assessment of stress reactivity. Third, although measurements were conducted under standardized conditions within a defined daytime window to accommodate participants’ schedules, the potential influence of diurnal variation on HRV cannot be fully excluded. Further studies employing a more restricted measurement timeframe are warranted to verify this finding. Fourthly, the model was evaluated only through internal validation, and the absence of external validation restricts insights into its generalizability and clinical utility. Future research should prioritize the external validation of findings by utilizing larger, multidimensional datasets from diverse regions and populations to verify predictive performance and translational potential.
CONCLUSION
Chinese university students experiencing stress showed higher TDI, SDNN, SDNN5, FDI, TSP, TP, VLF, and DPTI/SPTI values, and lower C1, EEI, and AI values, indicating autonomic dysfunction and early cardiovascular maladaptation under mental stress. RF classifier demonstrated superior classification performance relative to five other machine learning algorithms. Furthermore, DPTI/SPTI was the most important HRV parameter in the RF model, highlighting its critical role in reflecting myocardial oxygen supply-demand imbalance under stress conditions. Overall, integrating HRV parameters with interpretable machine learning provides an objective approach for educators and mental health professionals to facilitate early stress detection and personalized mental health monitoring among the Chinese university population. Further, this integration also offers valuable insights into the physiological mechanisms underlying stress.
ACKNOWLEDGEMENTS
The authors thank all the members of the Mental Health and Artificial Intelligence Research Center.
Stallman HM, Hurst CP. The University Stress Scale: Measuring Domains and Extent of Stress in University Students.Aust Psychol. 2016;51:128-134.
[PubMed] [DOI] [Full Text]
Razavi M, Ziyadidegan S, Mahmoudzadeh A, Kazeminasab S, Baharlouei E, Janfaza V, Jahromi R, Sasangohar F. Machine Learning, Deep Learning, and Data Preprocessing Techniques for Detecting, Predicting, and Monitoring Stress and Stress-Related Mental Disorders: Scoping Review.JMIR Ment Health. 2024;11:e53714.
[RCA] [PubMed] [DOI] [Full Text][Cited by in RCA: 16][Reference Citation Analysis (0)]
Zafar F, Fakhare Alam L, Vivas RR, Wang J, Whei SJ, Mehmood S, Sadeghzadegan A, Lakkimsetti M, Nazir Z. The Role of Artificial Intelligence in Identifying Depression and Anxiety: A Comprehensive Literature Review.Cureus. 2024;16:e56472.
[RCA] [PubMed] [DOI] [Full Text][Cited by in RCA: 14][Reference Citation Analysis (0)]
Wu M, Qin X, Luo X, Yang Y, Wu S, Ma J, Zheng R. Study on the stress level and coping channels of Chinese urban and rural senior high school students learning on-campus after their return to school during the post-COVID-19 pandemic period.Psychosom Med Res. 2022;4:17.
[PubMed] [DOI] [Full Text]
Benítez-Agudelo JC, Restrepo D, Navarro-Jimenez E, Clemente-Suárez VJ. Longitudinal effects of stress in an academic context on psychological well-being, physiological markers, health behaviors, and academic performance in university students.BMC Psychol. 2025;13:753.
[RCA] [PubMed] [DOI] [Full Text][Cited by in RCA: 14][Reference Citation Analysis (0)]
Vaccarino V, Sullivan S, Hammadah M, Wilmot K, Al Mheid I, Ramadan R, Elon L, Pimple PM, Garcia EV, Nye J, Shah AJ, Alkhoder A, Levantsevych O, Gay H, Obideen M, Huang M, Lewis TT, Bremner JD, Quyyumi AA, Raggi P. Mental Stress-Induced-Myocardial Ischemia in Young Patients With Recent Myocardial Infarction: Sex Differences and Mechanisms.Circulation. 2018;137:794-805.
[RCA] [PubMed] [DOI] [Full Text][Cited by in Crossref: 163][Cited by in RCA: 186][Article Influence: 23.3][Reference Citation Analysis (0)]
Tabara Y, Kohara K, Nakagawa S, Handa J, Hayashi M, Hamada C, Miyaguchi M, Shigemi Y, Miki T, Konishi M. Effects of obesity and smoking on mental stress-induced blood pressure and augmentation index responses in normotensive young males: the J-SHIPP study.Hypertens Res. 2008;31:1219-1224.
[RCA] [PubMed] [DOI] [Full Text][Cited by in Crossref: 16][Cited by in RCA: 17][Article Influence: 0.9][Reference Citation Analysis (0)]
Antoniadis A, Lambert-lacroix S, Poggi J. Random forests for global sensitivity analysis: A selective review.Reliab Eng Syst Saf. 2021;206:107312.
[PubMed] [DOI] [Full Text]
Gul N, Mashwani WK, Aamir M, Aldahmani S, Khan Z. Optimal model selection for k-nearest neighbours ensemble via sub-bagging and sub-sampling with feature weighting.Alex Eng J. 2023;72:157-168.
[PubMed] [DOI] [Full Text]