Using Deep Learning Techniques to Study the Effects of Psychological Stress on College Students’ Performance in Physical Education Classes
Published Online: Mar 19, 2025
Received: Oct 24, 2024
Accepted: Feb 19, 2025
DOI: https://doi.org/10.2478/amns-2025-0549
Keywords
© 2025 Li Zhang, published by Sciendo
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Mental health is a prerequisite for the overall promotion of human development as well as economic and social progress, and one of the important symbols of national wealth and national rejuvenation is a long and healthy life. College students, as a special group, will be under pressure from various aspects such as academics, interpersonal relationships, love and family during their school years [1-4]. Moreover, with the worldwide outbreak of the new Crown pneumonia (COVID-19) epidemic at the end of 2019, the employment pressure of college students has shown a significant upward trend. Excessive or prolonged stress can lead to anxiety and depression symptoms, and may even lead to serious psychological disorders [5-8]. A large number of studies have shown that many diseases, such as coronary heart disease, hypertension, hypoglycemia and so on, are related to long-term psychological stress. In the context of the rapid development of society and the increasingly serious mental health problems of college students, research on psychological stress intervention for college students has become an urgent need to ensure the physical and mental health of college students [9-12].
Physical education is an important part of all stages of education, and is also a part of education, which is a valuable educational means to realize the cultivation of the successor of the all-round development of morality, intellectuality, physical fitness, aesthetics and labor. Physical education classes in schools mainly play a role in improving students’ physical health, physical health and social adaptability, and the essential attribute of physical education classes is to enhance physical fitness [13-15]. Physical education teaching effect is a measure of physical education teachers’ teaching and students’ physical education learning results, and it is an important basis for physical education teachers to carry out physical education teaching reform [16-17]. Physical education teaching effect will be subject to multiple factors, such as teaching objectives, teaching content, teaching environment, teaching process, etc. In terms of human factors, physical education teachers and students are important influencing factors, and students, as the main participants, their mental health status has a more obvious impact on the effect of physical education teaching [18-20]. Therefore, it is necessary to use deep learning technology to study the impact of college students’ psychological pressure on the performance of physical education classes, in order to put forward countermeasures and improve the views of the relevant problems, which is of great significance to create a good teaching atmosphere, improve the teaching effect of physical education and promote the overall development of students [21-24].
The article introduces the basic characteristics of PPG signals and their traditional HRV feature extraction methods, including the features commonly used in pressure recognition research such as time domain features, frequency domain features, and nonlinear features and their extraction methods. Subsequently, the Transformer model in deep learning is deeply interpreted, and a Transformer-based pressure HRV signal recognition model is proposed, which is described in detail, including the overall architecture of the model and the functions of each module, and the implementation process of the model is also introduced. The method used in this paper was used to assess the psychological stress of college students at that university and to analyze the correlation between physiological data and subjective scores. To further understand the relationship between psychological stress and performance in physical education classes among college students.
The photovolumetric pulse signal (PPG) is a physiological signal measured using the photovolumetric pulse tracing technique. Pulse wave PPG is formed when the heart beat propagates down the arterial vessels and blood to the periphery, and a typical PPG signal waveform is shown in Fig. 1. A typical PPG signal waveform has four important characteristic embodiment points, A, B, C, and D, including two periods, diastole and systole. Among them, A is referred to as the main wave, B is the tidal wave, C is the repulsive wave trough, and D is the repulsive wave peak. The curve from the onset of the pulse wave to the peak of the main wave at point A is called the ascending branch, which belongs to the systolic period, and its amplitude and slope reflect the ventricular ejection. The descending branch is a diastolic phase that defines the curve between the peak of the main wave at point A and the baseline of the pulse wave. The AC segment belongs to the first part of the descending branch, which is caused by the fact that after the ventricular ejection has gradually ended, the blood flow to the aorta is less than the blood flow out of the aorta to the periphery, and the dilated aorta turns into a state of retraction, and the arterial blood pressure gradually decreases. The latter part of the descending waveform is called the repulsor waveform, which reflects the functioning of the aorta and blood flow. [25]. The variation of the PPG waveform contains a wealth of information related to the human cardiopulmonary system, reflecting the changes in the human body’s physiopathology, and therefore a series of clinical parameters such as the heart rate variability, respiratory rate and so on can be obtained from it. For this reason, the PPG signal has been considered to contain a lot of information related to human psychology, and has been shown to be useful for emotion recognition or stress recognition, so the PPG signal is often used to extract relevant features for recognising people’s stress or emotional state.

Typical PPG signal waveform
The basis and key to establishing a stress recognition model with good classification accuracy is to identify an effective set of features that can distinguish individual stress states. Heart rate variability (HRV), refers to the subtle fluctuation of instantaneous heart rate that occurs during the continuous sinus heart rate in human body, and a large number of studies have shown that HRV has a close connection with the autonomic nerve activity in human body, and HRV contains a large amount of information related to the stress state of the human body, so the HRV features are often used as the feature engineering for identifying the psychological stress state [26]. The traditional HRV features mainly include time-domain features, frequency-domain features, and nonlinear features, and these three major categories of features describe the changing characteristics of human physiological information from different perspectives, and these features and their mathematical formulas will be briefly introduced in the following in order to extract the HRV features from PPG signals.
SDNN: Standard deviation of consecutive normal RR intervals reflecting overall changes in HRV.
SDSD: standard deviation of the difference between two consecutive RR intervals, reflecting the overall change in HRV at a finer level of granularity.
RMSSD: root mean square of the difference between adjacent RR intervals, reflecting the effect of high frequency on HRV.
Ratio of
Ratio of
CVSD: Coefficient of variation of continuous difference.
CVNNI: coefficient of variation.
It has been pointed out that the components of different frequency bands in the HRV spectrum reflect the changing conditions of the sympathetic and vagus nervous systems, and the specific approach is to decompose the HRV energy signal into different frequency components, in which the focus is on the signals distributed in the frequency band of 0-0.4 Hz, with 0.003-0.04 Hz as the very low frequency (VLF), 0.04-0.15 Hz as the low frequency (LF), and 0.15-0.4 Hz belonging to the high frequency (HF) band. (LF), and 0.15-0.4Hz belongs to the high frequency band (HF). Analysing from the perspective of frequency domain is important for the identification of human psychological stress state. The frequency domain features extracted in this paper are:
where
Since the use of only linear analysis methods poses certain limitations and does not reflect all the information embedded in HRVs, nonlinear analysis methods are introduced to analyse HRVs. The nonlinear features extracted in this paper are as follows:
The Transformer model utilizes a self-attention mechanism that weighs the significance of each part of the input data based on various values, and compresses all the necessary information into a single vector to create an efficient representation. Unlike recurrent neural networks, Transformer processes the entire input at once and uses a multi-head attention mechanism to compute the relationships between positions in the sequence in parallel, thus requiring less training time, high parallelism, and high model efficiency [27]. The Transformer model’s exceptional handling of long sequences has made it widely used in a number of domains, and it is now a more general framework for learning sequence data. The Transformer model framework is shown in Figure 2.

Transformer model framework
The detailed structure of the Transformer model is shown in Figure 3. The Transformer model uses an encoder-decoder architecture. The encoder is used to encode the input data, which maps the input data to a fixed-size coding space, generating an efficient representation of the sequence that allows the computer to recognise something objectively present in the human world in a more rational way for further subsequent processing. The purpose of the encoder is to capture important information about the data and simplify the representation of the data to improve the efficiency of the model. Since the encoder side is computed in parallel, the training time is greatly reduced. The decoder receives the output of the encoder and generates the final output.

Detailed Transformer model structure
The Transformer-based psychological stress recognition model for stress is shown in Figure 4. Cognitive behaviour in the human brain does not occur in instantaneous reactions. Convolutional neural networks, which are local networks determined by kernel sizes and respective step sizes, are difficult to model long sequences, require complex connectivity operations if the sampling points are far apart, and the convolution operation destroys the spatial properties of EEG signals. Long-term dependencies may not be taken into account by long-term memory networks due to forgetting factors.

Stress - stress identification model based on transformer
The psychological stress signal is first fed into the embedding layer to get the embedding and generate the class labels for classification. The model does not use recursion and convolution, and completely uses the self-attention mechanism. In this paper, Gaussian embedding is used, and Gaussian embedding is defined as:
where
There are
where

Encoder structure diagram
The normalisation layer of the encoder is designed to prevent overfitting, which ensures the stability of the data feature distribution and accelerates the convergence of the model. The formula is as follows:
where both
The multi-head attention layer is the core of the model. Each of these heads independently generates different query tensor Q, key tensor K and value tensor V, which are all tensors. The query tensor Q, key tensor K and value tensor V are transformed by learning different projection matrices, and then the transformed query tensor Q, key tensor K and value tensor V are sent to the attention layer in parallel. Finally, these outputs are combined and transformed by linear projection to produce the final output. That is, the output is a weighted sum of each attention layer. The weight of each value tensor V is calculated based on the similarity between the key tensor K and the query tensor Q corresponding to that value. As the query tensor Q changes, the weights will be different and the output will be different. That is, a set of tensor query tensor Q, key tensor K and value tensor V goes through different linear layers, then through an attention layer, then splices the outputs of the attention layer, and finally through a linear layer to get the final output.
where the projection is the parameter matrix
Each attention head scores different locations of the input data, the scoring is based on the features of the input data and the weights of the attention heads, and finally the attention scores are aggregated together to generate the final prediction results. The multi-head attention layer pays close attention to the information of different locations, performs the averaging calculation of one attention, realises the global attention extraction, and extends the ability of the model to pay attention to different locations, so the model has a good parallel processing ability. The multi-head attention attention layer consists of multiple attention layers, i.e., it is computed independently for many times. The schematic structure of multi-head attention is shown in Fig. 6.

Multi-head attention structure chart
The multilayer perceptron in the encoder includes a linear layer, an activation layer, and a random deactivation layer. In this, the parameters of each layer are different. The formulae are as follows:
The PyTorch framework used in this chapter is a Torch-based open source machine learning framework for Python for natural language processing, among other things. The framework provides graph-based execution, distributed training, mobile deployment and quantisation. In this chapter the activation function is chosen as Gaussian error linear unit to avoid the problem of vanishing gradient. The formula is given below:
where Φ(
The loss function is a cross-entropy loss function with the following formula:
Where,
The optimiser uses Adam optimiser. The training process is as follows:
Step 1: First order moment estimation and second order moment estimation of the gradient.
The first order moments of the gradient are estimated as:
where
where
Step 2: Correct the first-order moment estimates and the second-order moment estimates.
Corrections are made to the first-order moment estimates:
where
where
Step 3: Dynamic constraints on the learning rate. The formula is as follows:
Where,
Step 4: Update the parameters and perform iterative training. After training the test set input is tested to get the classification correctness and output.
Due to the small dataset of psychological stress signals, this chapter uses the attention layer of
This chapter uses K-fold cross validation to determine the generalisation ability of a model when it comes to new data that was not considered in the training model or encountered.The schematic of K-fold cross validation is shown in Fig. 7.

Schematic diagram of K-fold cross-validation
The K-fold cross-validation process is: first the original dataset is randomly split into
The actual collected pulse and skin resistance signals usually contain three kinds of noise, such as low-frequency baseline drift, high-frequency signal burr and industrial frequency interference, and the original signal amplitude spectra of pulse and skin resistance are shown in Fig. 8 (Fig. a is the original signal amplitude spectrum of the pulse, and Fig. b is the original signal amplitude spectrum of the skin resistance). Remove the baseline drift is mainly to remove the low-frequency part of the inhibition of the high-frequency part of the signal can be filtered out of high-frequency noise, this paper, because the effective frequency range of the pulse and skin resistance are smaller than the industrial frequency noise, so directly through the low-pass filtering to remove the high-frequency noise and the industrial frequency interference together. The pulse signal denoising is shown in Fig. 9. From top to bottom of the figure is the original signal collected, the signal after filtering out high-frequency noise and the signal after filtering out low-frequency interferences (baseline drift), retaining the part of the signal with a frequency of 0.2~20Hz. After filtering out the high-frequency part above 20Hz, the signal becomes obviously smooth, and then filtering out the low-frequency part on top of that, the upward drifting part of the signal obviously falls back to basically the same height. Similarly, for the skin resistance signal, the 0.2~5Hz part is retained, and the denoising of the skin electrical signal is shown in Figure 10. The original noisy skin electrical signal is almost impossible to see the change of skin electrical response, after filtering out the high-frequency noise, the protrusion of the elevated skin electrical level caused by external stimulation is clearly visible, and then after filtering and removing the limiting drift, the signal falls back as a whole.

The pulse and the original signal amplitude of the skin resistance

Pulse signal

The skin electric signal denoising
The different frequency components contained in the pulse signal are decomposed using the fast Fourier transform, and the frequency amplitude spectral curve is plotted to analyze the frequency components of the pulse signal. The changes of the pulse signal in the time domain curve can be visually reflected in the shape of the corresponding spectral line. The typical characteristics of different physiological states can be reflected by the distribution patterns of different frequency components in the spectrum, especially by observing and analysing whether there are continuous spectral bands in the spectrogram, which can qualitatively analyse and distinguish the nonlinear characteristics of different physiological stress situations. After the original pulse signal is denoised, a segment of the sampled signal is intercepted to perform a fast Fourier transform, and its amplitude spectrum is plotted. The following figure shows the amplitude spectrum of different psychological stress test experiments and different subjective stress scores for one subject. The amplitude spectra of the pulse signals of a subject with different subjective stress scores are shown in Figure 11. Comparing and analysing the amplitude spectra, there are more obvious differences between the amplitude spectra corresponding to the pulse waveforms under different psychological stress states, and these differences may not be observed by the naked eye in the time series waveforms. The amplitude spectra corresponding to pulse signals under different psychological stress states have rich spectral components, with obvious differences in the peaks corresponding to each frequency, as well as the presence of a certain amount of noise and broad peaks, the amplitude of the main peaks differs under different psychological stress states, and the distribution of the frequencies is also different. Comparison of examples shows that the spectral components are slightly more complex under a certain state of psychological stress, but there is a situation in which the spectral components become less when a higher level of stress is reached, and this change may vary from person to person and from time to time.

Pulse signal amplitude spectrum
The pulse scatterplot of a subject under different subjective ratings of stress is shown in Figure 12. The figure demonstrates the scatter plot of the pulse cross-section of a subject in different psychological stress-evoking experiments, and it can be seen that there is a naked eye difference between the shapes of the distribution of dots in different stress states, which to some extent indicates that the stimulus is effective and that there is some difference in the pulse signals between different stress states.

A pulse of a subject under subjective stress
The system collects the raw PPG signal through MAX30101 sensor, and the master control module sends the raw signal to the host computer through WIFI module. Due to the presence of noise such as baseline drift, the original signal is denoised by using db4 wavelet base with filtering characteristics, considering the integrity and smoothness of the signal. To solve the problem of baseline drift, the signal was de-baselined. HRV is the small change between heart beat cycles, and the PPG method was used to obtain the RR interval to calculate the HRV characteristics. Firstly, the peaks of the P-wave of the pulse wave signal are extracted in the time domain, and the interval between the peaks of two adjacent P-waves is the RR interval, so that the HRV characteristics can be analysed according to the RR interval.
Considering the prediction rate of neural network to predict psychological stress and the variability of different individuals, the public dataset HRV dataset forresearch on stress and user modelling is adopted, which is from kaggle’s SWELL dataset, contains multiple HRV features, and is commonly used for human psychological stress modelling. This system uses this dataset combined with a BP neural network based on the TensorFlow architecture to train the model, and the data in the dataset is divided into two parts for processing, the sample is multiple HRV features and the label is the level of psychological stress, so as to classify the sample data. The model was trained for 300 iterations and the test set was used to test the model. The accuracy and loss rate of the training and test sets are shown in Fig. 13. The accuracy and loss rate of the training set reached 80.01% and 52.35% respectively. It can be seen that with the increase in the number of iterations, the accuracy of the test set gradually increased to 78.26%, which can meet the expected training requirements of this model, so the model can be used to predict human psychological stress. The calculated HRV multinomial features are input to the input layer of BP neural network to classify human psychological stress, and the results of human psychological stress can be classified into three stress levels: no stress, mild stress, and severe stress.

Accuracy and loss rate of training set and test set
In this section of the experiment, six subjects of a university were assessed for psychological stress, and the results of the correct rate of mental arithmetic and the degree of psychological stress of the subjects are shown in Table 1. It can be seen that in the six subjects, the degree of psychological stress is lower in subjects with a higher rate of correct mental arithmetic and higher in subjects with a lower rate of correct mental arithmetic, and the degree of psychological stress decreases with an increase in the rate of correct mental arithmetic, which indicates that this experiment is able to reasonably induce psychological stress, and the use of this system is able to well realise the assessment of psychological stress on the human body and to observe the assessment feedback in real time on the host computer side and query a number of HRV data, and at the same time, it is able to provide health warning to the subjects. In practical application scenarios, subjects can be continuously monitored for psychological stress.
The subjects were accurate and psychological stress
Trial number | Gender | Age | The accuracy rate of the mind is /% | Degree of stress |
---|---|---|---|---|
1 | Man | 22 | 72 | Mild pressure |
2 | Female | 21 | 48 | Severe pressure |
3 | Female | 23 | 89.6 | No pressure |
4 | Female | 21 | 73.5 | Mild pressure |
5 | Man | 21 | 76 | Mild pressure |
6 | Man | 22 | 63.5 | Severe pressure |
In this section, an empirical test was conducted with students from a university to analyze the correlation between psychological stress and performance in physical education classes among college students. The correlations between performance in physical education classes and psychological stress and each dimension of college students are shown in Table 2 (*p < 0.05, **p < 0.01, ***p < 0.001). As can be seen from the table, a significant negative correlation of p < 0.001 was observed between psychological stress and physical exercise, intensity of exercise, duration of exercise, and frequency of exercise, with correlation coefficient values of -0.363, -0.279, -0.355, and -0.193, respectively. A significant negative correlation of p < 0.001 was observed between personal annoyance and physical exercise, intensity of exercise, duration of exercise, and frequency of exercise, with correlation coefficient values of -0.388, -0.331, -0.412, and -0.262, respectively. Study annoyance showed a significant negative correlation of p < 0.001 with physical exercise, intensity of exercise, duration of exercise, and frequency of exercise with correlation coefficient values of -0.269, -0.185, -0.236, and -0.087 and frequency of exercise with a significant negative correlation of p < 0.01 with correlation coefficient value of -0.087, respectively. A significant negative correlation of p < 0.001 was presented between negative life events and physical exercise, exercise intensity, and exercise time, with correlation coefficient values of -0.226, -0.196, -0.221, and -0.031, respectively, while a significant correlation between negative life events and exercise frequency would not be presented, with a correlation coefficient value close to 0, indicating that there is no There is no correlation relationship.
Research shows that physical exercise is negatively correlated with the psychological stress level of college students, and is consistent with the results of previous studies. Physical exercise is an effective means of relieving psychological stress, and research on the physiological mechanisms involved has confirmed that “dopamine, serotonin, and
The correlation between physical education performance and psychological pressure
Psychological pressure | Personal nuisance | Learning nuisance | Negative life events | |
---|---|---|---|---|
Physical exercise | -0.363*** | -0.388*** | -0.269*** | -0.226*** |
Intensity of exercise | -0.279*** | -0.331*** | -0.185*** | -0.196*** |
Exercise time | -0.355*** | -0.412*** | -0.236*** | -0.221*** |
Exercise frequency | -0.193*** | -0.262*** | -0.087** | -0.031 |
The psychological pressure as the independent variable and the four dimensions of physical education class performance as the dependent variable were analyzed by regression equations, and the regression analyses of physical education class performance with college students’ psychological pressure and the dimensions are shown in Table 3 (*p < 0.05, **p < 0.01, ***p < 0.001). As can be seen from the table, college students’ psychological stress significantly and negatively predicted exercise in physical education class
According to the cognitive interaction theory of stress, the main cause of stress is the combination of stressor and individual cognition, through physical exercise can make the individual’s attention diverted from the stressful events, which can play a role in relieving the stress, but in order to fundamentally reduce the stress, it mainly relies on the individual’s cognitive evaluation of the stressful stimuli. In the process of physical education performance, not only exercise the individual’s will, at the same time, it will produce a strong sense of pleasantness, so that the bad emotions are cathartic, and the sensitivity to the psychological pressure generated in daily life will be reduced, which can promote the individual to improve the level of cognition, so that the individual reevaluation of the stressor, thus playing a role in relieving the pressure.
Regression analysis of physical education and psychological stress
Physical exercise | Intensity of exercise | Exercise time | Exercise frequency | |||||
---|---|---|---|---|---|---|---|---|
Psychological pressure | -0.358 | -14.632*** | -0.385 | -15.054 | -0.315 | -9.751*** | -0.204 | -8.031*** |
F | 182.624*** | 225.678*** | 97.311*** | 62.036*** | ||||
R2 | 0.132 | 0.163 | 0.082 | 0.052 |
This paper explores the influence of deep learning technology on the psychological stress of college students and their performance in physical education classes. Fully considering the psychological stress feature extraction and signal analysis methods used in college students, the research results show that:
The raw pulse and skin resistance signals were filtered, and then the data were visualized and analyzed from the perspective of frequency domain and nonlinear analysis, and the experiment showed that there was a difference between the physiological signals under different subjective ratings; College students’ performance in physical education classes showed a significant negative correlation with psychological stress, and the correlation coefficient values between psychological stress and physical exercise, exercise intensity, exercise time, and exercise frequency were -0.363, -0.279, -0.355, and -0.193, respectively. Enhancing psychological interventions for college students has a facilitating effect on improving their performance in physical education classes.