A Novel Transfer Learning with Organic Computing in Deep Learning for Stress Classification

A Novel Transfer Learning with Organic Computing in Deep Learning for Stress Classification

Sudarsan Prabhakaran* Niranjil Kumar Ayyamperumal

Department of Electronics and Communication Engineering, Sri Shanmugha College of Engineering and Technology, Sankari 637304, Tamilnadu, India

Department of Electrical and Electronics Engineering, Paavai Engineering College, Namakkal 637018, Tamilnadu, India

Corresponding Author Email: 
sudarsanphd123@gmail.com
Page: 
1637-1643
|
DOI: 
https://doi.org/10.18280/ria.370628
Received: 
14 August 2023
|
Revised: 
2 October 2023
|
Accepted: 
20 October 2023
|
Available online: 
27 December 2023
| Citation

© 2023 IIETA. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

Nowadays, a stress classification system is essential to classify the psychological stress that impairs a person's socioeconomic life. Several Deep Learning (DL) models have been developed in recent years to classify stress using physiological signals, including electro-dermal activity (EDA) and electrocardiography (ECG). However, those models cannot handle concept drift during the training phase, which may struggle to adapt to changing data patterns, leading to unreliable predictions. Concept drift refers to changes in the characteristics or patterns of physiological signals used for stress classification. These changes could be due to various factors, including shifts in the data distribution, environmental conditions, or the subjects' behavior. Therefore, this article develops a novel Deep Transfer Learning with Organic Computing (DTLOC) model by integrating the Deep Convolutional Neural Network (DCNN) with the TL and OC mechanisms to handle concept drift and improve the accuracy of stress classification. The TL brings prior knowledge about EDA and ECG features, which enhances the model's initial capabilities and shortens the learning curve. Additionally, the OC provides a self-management system that oversees the structure and operation of the model. It dynamically adapts the DCNN in response to changing data patterns, ensuring that the model remains accurate and effective in classifying stress, even in the presence of concept drift. The experimental results demonstrate that the DTLOC model, utilizing EDA and ECG data from the WESAD dataset, achieves an accuracy of 93.53%. This is a significant improvement compared to the LIBSVM, LSTM, DNN, and CNN models, with increases of 15.63%, 13.15%, 10.37%, and 5.03% respectively. Thus, this model can enhance individuals' quality of life and safety by detecting stress-related illnesses at an earlier stage.

Keywords: 

stress classification, deep learning, EDA, ECG, transfer learning, organic computing

1. Introduction

Stress triggers an individual's immune system to respond to external stimuli, resulting in both mental and physical reactions [1]. Psychological inflammation can impair skin defense mechanisms and reduce immune and circulatory system effectiveness. Stress symptoms are less useful for stress analysis than non-intrusive elements like respiration rate, breathing patterns, or skin temperature [2, 3]. Hormone measurements are only monitored in laboratory settings, not in the human body [4]. Psychological inflammation is associated with chronic health conditions such as diabetes, arthritis, and heart disease. The respiratory system plays a role in regulating hormone levels and maintaining defense and heart function. Techniques are utilized to predict and quantify hormone production [5], but the overall effectiveness of integration remains a challenge. Studies frequently use physiological signals to identify emotional states, as the sympathetic nervous system regulates emotions such as fear, anger, and panic [6].

Typically, changes in an individual's emotional state are a direct reflection of their psychological state. EDA is used to describe this phenomenon [7, 8]. As well, ECG has also been used for stress classification in the past decades [9]. Stress classification using machine learning schemes such as Support Vector Machine (SVM), etc., has been investigated in previous years to learn various physiological signals and classify stress levels [10, 11]. On the contrary, such algorithms need the sophisticated and random signal processing of physiological information, which is unsuitable for designing classification frameworks using large-scale databases and the emergence of deep learning models. As a result, DL models have been extensively utilized in the field of stress classification through EDA and ECG since they process actual data and recognize the relevant characteristics with no preprocessing or attribute extraction processes [12, 13]. Even though DL models can learn characteristics, those models are data-hungry. Also, they cannot handle sudden concept drift. Concept drift refers to the phenomenon where the statistical properties of a dataset change over time. In the context of stress classification, it means that the patterns and relationships between physiological signals (such as EDA and ECG) and stress levels can evolve or shift due to various factors. This poses a significant challenge in real-time stress monitoring because a model trained on historical data may become less effective as new data patterns emerge.

The challenges of concept drift in deep learning-based stress classification models are the following:

  • Model degradation: As the relationship between physiological signals and stress levels changes, a model trained on older data may start making inaccurate predictions. This can lead to a decline in the model's performance.
  • Data labeling: When dealing with concept drift, it is essential to continuously label new data to reflect the current stress levels accurately. However, obtaining real-time labeled data can be resource-intensive and time-consuming.
  • Adaptation: Adapting to concept drift requires models to be dynamic and flexible. The challenge is to modify the model's structure or parameters to accommodate new data patterns effectively. This adaptation process needs to be automated and efficient.
  • Real-time responsiveness: Concept drift often involves sudden changes in data patterns, and models must respond promptly to these changes. Delays in adapting to new patterns can result in inaccurate stress classifications.

To address the above-mentioned challenges, the DL models should be dynamically adjusted in response to concept drift. This ensures that the model remains accurate and responsive even as the relationships between EDA, ECG, and stress levels change over time. Hence, in this paper, a novel DTLOC model is proposed to handle concept drift and obtain better accuracy from available data by using a self-managing system for adapting the DL structure according to the error rate during the training process. Initially, the EDA and ECG signal databases are collected from the available sources. A DCNN is proposed with an OC paradigm and TL algorithm. The TL process exchanges the learned weight value or knowledge about the features of EDA and ECG among convolutional layers. An OC-based self-managing system can dynamically reconfigure the DCNN structure to solve the problem of sudden concept drift during stress classification using large-scale real-time data. Thus, this innovative approach overcomes the limitations of traditional DL models and has the potential to significantly improve stress analysis in practical applications.

The remaining article is written as follows: Section 2 reviews the research on the categorization of human stress levels. The DTLOC model is described in Section 3, and its effectiveness is presented in Section 4. Further, this study is summarized in Section 5.

2. Literature Survey

Many studies aim to assess the impact of stress on an individual's life using physiological data. This section reviews the stress classification models based on machine learning and DL models using physiological data.

2.1 Stress classification using machine learning models

An ElectroOculoGraphy with Artificial Neural Network (EOG-ANN) [14] was presented for categorizing stress levels from EEG data. First, the pre-processing was conducted to remove noise from the EEG signal data using the auto-regressive filtering scheme. Afterward, the time-domain characteristics were retrieved and fed to the ANN for stress prediction. But it was time-consuming for such a massive quantity of data.

1D CNN and a Multi-Layer Perceptron (MLP) [15] were designed to detect human stress. Initially, stressed and non-stressed states were distinguished by a binary classification. Then, a 3-class classification was performed to classify emotions into neutral, stressed, and amused states. But the dataset used in this model was limited, which may not be sufficient to define the overall human population.

The method of classifying EEG emotions using the LIBSVM classifier has been proposed [16]. First, the Lempel-Ziv and wavelet coefficients were determined for the EEG signal. The coefficients were then classified into different emotional states by the LIBSVM. However, its success rate was lower when classifying multiple emotion classes.

Human emotion recognition was developed by learning multi-channel characteristics from the EEG signal [17]. In this method, multi-channel EEG and textual feature fusion were applied in the time domain to recognize various human emotions, wherein the statistical traits were concatenated to create a feature vector. Moreover, the SVM was trained to recognize human emotions. But the training process takes a long time while increasing the number of data points. To design an Analysis of Variance (ANOVA) classifier for classifying stress levels [18]. But it needs deep learning classifiers to increase the classification accuracy. A multi-objective evolutionary scheme, a fuzzy unkanked ruling generation scheme, and MLP [19] were used to analyze the database and detect the level of distress among students. But the number of instances in the database was not adequate.

To predict generalized anxiety levels based on the machine learning algorithm. In this analysis, 2-class and 3-class anxiety issues were categorized earlier by gathering the database during the COVID-19 epidemic in Saudi Arabia [20]. The information was gathered from every area of the UK through an online inspection comprising queries to recognize aspects impacting anxiety levels after queries from the GAD-17, a monitoring device for generalized anxiety diseases. Then, the estimation systems were constructed by the SVM and J48 decision tree classifiers. However, as the number of classes increased, the system complexity also increased.

According to these models, it can be inferred that the machine learning models are not fit for large-scale datasets due to their high computational complexity. Additionally, they are unable to learn the comprehensive characteristics necessary for accurately classifying stress based on physiological signals. To combat these problems, DL models have emerged for stress classification.

2.2 Stress classification using deep learning models

A deep learning-based approach [21] was developed for multimodal stress detection. This approach involved unsupervised feature learning and supervised stress classification. The unsupervised feature learning involved modality-based feature learning, which projects multimodal representations. The representation was processed using a Gated Recurrent Unit (GRU) to learn spatiotemporal features, and the resulting output was then fed into an auto-encoder for multimodal stress detection. However, the accuracy of the results was compromised due to the limited amount of data available. CNN model [22] was developed for categorizing acute cognitive stress into five distinct periods. However, it required significant computation and storage resources.

A subject-independent emotion recognition scheme from EEG data based on the Variational Mode Decomposition (VMD) and Deep Neural Network (DNN) [23]. First, the VMD was applied to determine the features from the EEG data. Then, such features were classified by the DNN into different emotional states. Conversely, its training speed was extremely slow.

A method was presented for emotion recognition from EEG signals by Bara et al. [24]. The zero-time windowing approach was used to extract instantaneous spectral features by utilizing the numerator group-delay function. This method allows for easy detection of epochs in all emotional states. The Quadratic Discriminant Recurrent Neural Network (QDRNN) was used to classify emotional states. However, accuracy was less because it considered only a limited signal and it did not handle the concept drift problem.

A novel approach for emotion recognition using EEG data was proposed by Gannouni [25], utilizing a three-dimensional CNN (3D-CNN). The 3D-CNN method extracts spatiotemporal features from EEG signals and captures the relationship between different channel positions by collecting data from multiple channels as input. Additionally, dimensional emotions were consolidated, saving computation time by processing multiple dimensional labels together. But, the concept drift issue may degrade the model performance.

Long Short-Term Memory (LSTM) network [26] was develoepd for categorizing stress levels from EEG data. First, the preprocessing was conducted to remove noise from the EEG signal data using the auto-regressive filtering scheme. Afterward, the time-domain characteristics were retrieved and fed to the LSTM for stress prediction. However, processing such a large amount of data was time-consuming.

Earlier DL models in the literature were incapable of addressing concept drift issues in real-time stress classification. This tends to degrade the model's adaptability and performance while varying data patterns, or the model's parameters during training. This study aims to address the concept drift problem in stress classification using a DL model by combining OC and TL strategies.

3. Materials and Methods

Figure 1. Architecture of DTLOC model for human stress classification

In this section, the proposed DTLOC model is explained for stress classification. In this model, 3 major processes are performed: (i) data acquisition; (ii) knowledge transfer (TL); and (iii) self-regulation (OC) for the DCNN classifier. Figure 1 illustrates the entire architecture of the DTLOC model.

3.1 Data acquisition

The first step is to obtain a publicly accessible multimodal dataset known as the WESAD (Wearable Stress and Affect Detection) database. The Trier Social Stress Test is used as a stress stimulus on 15 individuals (12 men and 3 women) during the data collection process. This data set focuses in particular on pregnant graduate students, heavy smokers, psychiatric illnesses, infectious diseases, and cardiovascular diseases. The 15 subjects examined had an average age of 27.5±2.4 years. Each subject's data is linked to many self-reports that, during an affective stimulus, represent the subjective experience. This dataset includes triaxial acceleration signals obtained at 700 Hz from two different devices, such as a chest-worn device (RespiBAN professional) and a wrist-worn device, along with physiological modalities of high resolution such as ECG, EDA, etc. The Respiban is applied to the subject's chest. The respiration is monitored via a respiratory inductive plethysmograph sensor. The ECG data is recorded using a typical three-point ECG. The rectus abdomens, which enables the individual to move as freely as possible, record the EDA signal. Both individuals also recorded BVP (64Hz) and EDA (4Hz) on their non-dominant hands using the Empatica E4. The computer receives the recorded data and stores it locally for further processing.

The EDA and ECG signal information is used to train the DTLOC model and classify human stress levels.

3.2 Transfer learning

Assume EDA characteristics $\mathcal{F}_{E D A}=\left\{\left(x_i^{E D A}, y_i^{E D A}\right)\right\}_{i=1}^{n_{E D A}}$ and ECG characteristics $\mathcal{F}_{E C G}=\left\{\left(x_i^{E C G}, y_i^{E C G}\right)\right\}_{i=1}^{n_{E C G}}$. Let $x_i^{n_{E D A}} \times \mathcal{y}_i^{n_{E D A}}$ is the feature space of $i^{\text {th }}$ EDA data where $x_i^{n_{E D A}}=\mathbb{R}^m$ and $y_i^{n_{E D A}}=\{-1,1\}$. Similarly, $x_i^{n_{E C G}} \times$ $y_i^{n_{E C G}}$ is the feature space of $i^{\text {th }}$ ECG data where $x_i^{n_{E C G}}=\mathbb{R}^m$ and $\mathcal{y}_i^{n_{E C G}}=\{-1,1\}$. Because the TL trains the DCNN categorizer, the convolution kernel function is represented as $k_1: \mathbb{R}^m \times \mathbb{R}^m \rightarrow \mathbb{R}$. The DCNN categorizer $h(x)$ for EDA and ECG data is defined in Eq. (1) and Eq. (2):

$h\left(x^{E D A}\right)=\sum_{i=1}^{n_{E D A}} y_i^{E D A} k_1\left(x_i^{E D A}, x\right)$                      (1)

$h\left(x^{E C G}\right)=\sum_{i=1}^{n_{E C G}} y_i^{E C G} k_1\left(x_i^{E C G}, x\right)$                       (2)

For the TL, the goal is to train certain activation functions $f \in \mathcal{H}_{k_1}$ on the ECG data from a sequence of instances $\left\{\left(x_{i, t}^{E C G}, y_{i, t}^{E C G}\right) \mid t=1, \ldots, T\right\}_{i=1}^{n_{E C G}}$ in a few feature space $x_i^{n_{E C G}} \times \mathcal{y}_i^{n_{E C G}}$ through online. In the TL stage, the trainer gets a sample $x_{i, t}^{E C G}$ at tth iteration of the learning process to determine a good activation function such that the categorized tag $f_t\left(x_{i, t}^{E C G}\right)$ can match its truth class label $y_{i, t}^{E C G}$. The key challenge of the TL is how to efficiently transfer the knowledge from the EDA data to the ECG data to increase the efficiency of human stress classification.

Consider the EDA and ECG data have an unequal feature space i.e., $x_i^{n_{E C G}} \neq x_i^{n_{E D A}}$ and $\mathcal{y}_i^{n_{E C G}} \neq \mathcal{y}_i^{n_{E D A}}$. The ECG data is denoted as $\left\{\left(x_{i, t}^{E C G}, y_{i, t}^{E C G}\right) \mid t=1, \ldots, T\right\}_{i=1}^{n_{E C G}}$ where $x_{i, t}^{E C G} \in x_i^{n_{E C G}}=\mathbb{R}^n \supset \mathbb{R}^m$ and $\mathcal{y}_{i, t}^{n_{E C G}}=\{-1,1\}$. Without loss of generalization, consider the first $m$ dimensions of $x_i^{n_{E C G}}$ denote the old feature space $x_i^{n_{E D A}}$. In this case, every data instance $x_{i, t}^{E C G}$ is partitioned into two instances $x_{i, t}^{E C G(1)} \in x_i^{n_{E D A}}$ and $x_{i, t}^{E C G(2)} \in x_i^{n_{E C G}} / x_i^{n_{E D A}}$. Also, a new kernel function is denoted by $k_2: \mathbb{R}^{n-m} \times \mathbb{R}^{n-m} \rightarrow \mathbb{R}$.

The key objective of this heterogeneous TL is to use a co-normalization policy of training 2 categorizers $f_t^{(1)}$ and $f_t^{(2)}$ concomitantly from the 2 views and categorizes a new ECG in Eq. (3):

$\hat{y}_{i, t}^{E C G}=\operatorname{sign}\left(\frac{1}{2}\left(f_t^{(1)}\left(x_{i, t}^{E(1)}\right)+f_t^{(2)}\left(x_{i, t}^{E(2)}\right)\right)\right)$                    (3)

Similarly, the unknown EDA data is classified in Eq. (4) by:

$\hat{y}_{i, t}^{E D A}=\operatorname{sign}\left(\frac{1}{2}\left(f_t^{(1)}\left(x_{i, t}^{S(1)}\right)+f_t^{(2)}\left(x_{i, t}^{S(2)}\right)\right)\right)$                  (4)

For a specified procedure, the DCNN is set for the primary and secondary view via configuring $f_t^{(1)}=h$ and $f_t^{(2)}=0$, correspondingly. For a new sample, the novel functions $f_{t+1}^{(1)}$ and $f_{t+1}^{(2)}$ are modified using below co-normalization optimization:

$\left(f_{t+1}^{(1)}, f_{t+1}^{(2)}\right)=\underset{f^{(1)} \in \mathcal{H}_{k_1}, f^{(2)} \in \mathcal{H}_{k_2}}{\operatorname{argmin}} \frac{\gamma_1}{2}\left\|f^{(1)}-f_t^{(1)}\right\|_{\mathcal{H}_{k_1}}^2+\frac{\gamma_2}{2}\left\|f^{(2)}-f_t^{(2)}\right\|_{\mathcal{H}_{k_2}}^2+C \mathcal{L}_t$                       (5)

In Eq. (5), γ1, γ2 and C are positive variables and the error $\mathcal{L}_t$ is calculated in Eq. (6) and Eq. (7) as:

$\mathcal{L}_t^{E C G}=\left[1-y_{i, t}^{E C G} \frac{1}{2}\left(f_t^{(1)}\left(x_{i, t}^{E C G(1)}\right)+f_t^{(2)}\left(x_{i, t}^{E C G(2)}\right)\right)\right]_{+}$                         (6)

$\mathcal{L}_t^{E D A}=\left[1-y_{i, t}^{E D A} \frac{1}{2}\left(f_t^{(1)}\left(x_{i, t}^{E D A(1)}\right)+f_t^{(2)}\left(x_{i, t}^{E D A(2)}\right)\right)\right]_{+}$                       (7)

This modification generates the modified ensemble categorizer for categorizing the new sample $\left(x_{i, t}^{E C G}, y_{i, t}^{E C G}\right)$ and $\left(x_{i, t}^{E D A}, y_{i, t}^{E D A}\right)$ correctly, and guiding 2-view categorizers with no inconsistent from earlier categorizers $\left(f_t^{(1)}, f_t^{(2)}\right)$ based on the primary 2 normalization terms.

Algorithm for TL

Input: DCNN categorizer $h\left(x^{E D A}\right), h\left(x^{E C G}\right), \gamma_1, \gamma_2$ and $C$

Initialize $f_t^{(1)}=h$ and $f_t^{(2)}=0$;

for $(t=1, \ldots, T)$

Acquire sample $x_{i, t}^{E C G} \in x_i^{n_{E C G}}$ and $x_{i, t}^{E D A} \in x_i^{n_{E D A}}$;

Classify $\hat{y}_{i, t}^{E C G}$ and $\hat{y}_{i, t}^{E D A}$ by Eqs. (3) & (4);

Obtain proper label: $y_{i, t}^{E C G} \in\{-1,1\}$ and $y_{i, t}^{E D A} \in\{-1,1\}$;

Compute loss $\mathcal{L}_t^{E C G}$ and $\mathcal{L}_t^{E D A}$ using Eqs. (6) & (7);

if $\left(\mathcal{L}_t^{E C G}>0\right)$

$\tau_t=\min \left\{C, \frac{4 \gamma_1 \gamma_2 \mathcal{L}_t^{E C G}}{k_{1, t} \gamma_2+k_{2, t} \gamma_1}\right\}$;

$f_{t+1}^{(1)}=f_t^{(1)}+\frac{\tau_t}{2 \gamma_1} y_{i, t}^{E C G} k_1\left(x_{i, t}^{E C G(1)}, \cdot\right)$;

$f_{t+1}^{(2)}=f_t^{(2)}+\frac{\tau_t}{2 \gamma_2} y_{i, t}^{E C G} k_2\left(x_{i, t}^{E C G(2)}, \cdot\right)$;

end if

if $\left(\mathcal{L}_t^{E D A}>0\right)$

$\tau_t=\min \left\{C, \frac{4 \gamma_1 \gamma_2 \mathcal{L}_t^{E D A}}{k_{1, t} \gamma_2+k_{2, t} \gamma_1}\right\} ;$

$f_{t+1}^{(1)}=f_t^{(1)}+\frac{\tau_t}{2 \gamma_1} y_{i, t}^{E D A} k_1\left(x_{i, t}^{E D A(1)}, \cdot\right)$;

$f_{t+1}^{(2)}=f_t^{(2)}+\frac{\tau_t}{2 \gamma_2} y_{i, t}^{E D A} k_2\left(x_{i, t}^{E D A(2)},\cdot\right)$;

end if

end for

Consider a binary categorization in a concept drift situation, wherein the trainer is easily reached with a sample over distinct intervals. At interval t, the process is performed using samples $x_t=\left\{x_{i, t}^{E C G}, x_{i, t}^{E D A}\right\} \in \mathbb{R}^m$ to categorize its label as $\hat{y}_t=\left\{\hat{y}_{i, t}^{E C G}, \hat{y}_{i, t}^{E D A}\right\}=\operatorname{sign}\left(f_t x_t\right) \in\{-1,1\}$ where ft indicates the present activation function. Afterward, the situation can expose the actual $\hat{y}_t$, therefore the trainer can obtain $\mathcal{L}_t=\left\{\mathcal{L}_t^{E C G}, \mathcal{L}_t^{E D A}\right\}=\mathcal{L}\left(\left(x_t, y_t\right) ; f_t\right)$. Moreover, the trainer can modify the activation function using the present sample concerning some conditions. A goal of this training is to lessen the overall error. On the other hand, in this situation, if the distribution extremely alters frequently over t, then the TL cannot working well.

To formulate the concept-drifting TL, a window dimension variable Pi is adopted, which is the quantity of samples obtained in the ith iteration. Additionally, the activation functions of 2 categorizers are kept. Therefore, at the tth iteration, for xt, its $\hat{y}_t$ is categorized by the ensemble function given in Eq. (8):

$\hat{y}_t=\operatorname{sign}\left(\omega_{1, t} \prod\left(h_t\left(x_t\right)\right)+\omega_{2, t} \prod\left(f_t\left(x_t\right)\right)-\frac{1}{2}\right)$                    (8)

The key issue is how to fine-tune the weight. It is evident that at the initial iteration, the DCNN-TL is recurrently 0, thus its activation function is weighted with 0, while the activation function of DTLOC is weighted with one in it. A below powerful exponential weighted modification is applied to adaptively alter the weights for the successive iterations: if mod(t, Pi)≠0:

$\omega_{1, t+1}=\frac{\omega_{1, t} * \delta_t\left(h_t\right)}{\omega_{1, t} * \delta_t\left(h_t\right)+\omega_{2, t} * \delta_t\left(f_t\right)}$                    (9)

$\omega_{2, t+1}=\frac{\omega_{2, t} * \delta_t\left(f_t\right)}{\omega_{1, t} * \delta_t\left(h_t\right)+\omega_{2, t} * \delta_t\left(f_t\right)}$                     (10)

Concept-Drifting TL

Initialize h1=0, f1=0, ω1,1=0, ω2,1=1, and i=1

for (t=1, …, T)

Get instance $x_t \in {X}$

Classify $\hat{y}_t$ using Eq. (8);

Obtain proper label: $y_t \in\{-1,1\}$;

Compute loss $\mathcal{L}_t=\max \left\{0,1-y_t f_t x_t\right\}$;

if $\left(\mathcal{L}_t>0\right)$

$\tau_t=\min \left\{C, \mathcal{L}_t / k_2\left\|x_t\right\|^2\right\}$

$f_{t+1}=f_t+\tau_t y_t x_t$;

end if

$h_{t+I}=h_t$;

$\omega_{1, t+1}=\frac{\omega_{1, t *} \delta_t\left(h_t\right)}{\omega_{1, t^* \delta_t\left(h_t\right)+\omega_{2, t^*} \delta_t(f t)}}, \omega_{2, t+1}=1-\omega_{1, t+1} ;$

if $\left(\bmod \left(\mathrm{t}, P_i\right)=0\right)$

$h_{t+1}=\left\{\begin{array}{lc}h_{t+1}, \quad \text { if } \omega_{1, t+1} \geq \omega_{2, t+1} \\ f_{t+1}, \quad \text { Or else }\end{array}\right.$

$f_{t+l}=0$ and $\omega_{\text {hut } t+l}=\omega_{2, t+l}=1 / 2$ and $i=i+1 ;$

end if

end for

3.3 Organic computing

Organic Computing (OC) is an approach to designing self-managing systems that takes inspiration from the self-regulation and adaptability found in natural systems. In OC, systems are designed to be dynamic and capable of adapting to changing conditions, similar to how living organisms adjust to their environments. The main concept is to develop self-managing systems that operate autonomously without constant human intervention.

In the context of the DTLOC model, OC is utilized to establish a self-managing system for classifying stress. The model can dynamically adjust its network structure and objectives in real time based on physiological signal information. This suggests that the model can adapt its configuration to effectively handle different stress conditions, similar to how a person adjusts their behaviour when faced with stress. Figure 2 represents structure of OC.

·Generalizability: The model is versatile and can be applied to classify various types of stress and emotions. It can be used with datasets of any size, making it suitable for a wide range of scenarios and applications.

·Abstraction level: The DTLOC model operates at a higher level of abstraction than traditional computational models. This means that it emphasizes objectives and goals rather than specific computational processes. This higher level of abstraction enables greater flexibility and adaptability.

·Scalability: The DTLOC model is scalable, allowing it to adapt its knowledge base as necessary. This adaptability makes it suitable for various environments and data sources, and it can continue to develop and expand to address emerging challenges.

Figure 2. 3-layer Structure

3.3.1 Component control

OC may involve monitoring the performance of individual components or subsystems of the DTLOC model. In this case, it could oversee the CNN architecture and parameters. If the CNN's performance starts to degrade or is not optimal for a given stress classification task, the component control module can trigger reconfiguration.

3.3.2 Change management

The change management module is next to the component controller, which is responsible for identifying the need for change and deciding how to adapt. When it detects that the DTLOC's (i.e., DCNN) architecture or parameters need adjustment, it can initiate the reconfiguration process. This might involve changing the number of layers, the size of convolutional filters, other architectural elements, or objective functions.

3.3.3 Goal management

OC systems often operate with predefined objectives. In this case, the goal of the DTLOC model is to accurately classify stress based on physiological signals. The goal management module can guide the reconfiguration by determining which architectural or parameter changes are most likely to improve stress classification performance.

These OC modules continuously monitor the input data and system performance in real-time. If the physiological signals change, indicating different stress conditions, the system can adapt the DCNN architecture and parameters to better fit the new data distribution.

4. Results and Discussion

The efficiency of the DTLOC model is assessed in MATLAB 2019b using the WESAD database and compared with the existing DL models: LSTM [26], DNN [23], LIBSVM [16], and CNN [22]. The comparison is conducted in terms of the following metrics:

·Accuracy: It is the percentage of precise classification over the total data instances tested.

Accuracy $=\frac{\text { True Positive }(T P)+\text { True Negative }(T N)}{T P+T N+\text { False Positive }(F P)+\text { False Negative }(F N)}$                     (11)

In Eq. (11), TP is the quantity of distress instances precisely categorized as distress, TN is the quantity of stress instances precisely categorized as stress, FP is the quantity of stress instances categorized as distress, and FN is the quantity of distress instances categorized as stress.

·Precision: It measures the appropriately classified data instances at TP and FP rates.

Precision $=\frac{T P}{T P+F P}$                  (12)

·Recall: It is the percentage of data instances that are appropriately classified at TP and FN rates.

Precision $=\frac{T P}{T P+F P}$                    (13)

·F-score (F): It is calculated by:

$F=\frac{2 \times \text { Precision } \times \text { Recall }}{\text { Precision }+ \text { Recall }}$                         (14)

Figure 3 portrays the efficiency of various stress classification models in the WESAD database. It is observed that the effectiveness of the DTLOC model based on precision, recall, and f-score is greater than that of the other classification models due to the development of a self-management system with TL for handling the sudden concept drift in real-time stress classification. Accordingly, this scrutiny shows that the precision of the DTLOC is 12.8% greater than the LIBSVM, 9.99% greater than the LSTM, 8.11% greater than the DNN, and 3.81% greater than the CNN models. The recall of the DTLOC is 13.54% higher than the LIBSVM, 10.96% higher than the LSTM, 8.9% higher than the DNN, and 3.75% higher than the CNN models.

Also, the f-measure of the DTLOC is 13.17% larger than the LIBSVM, 10.47% larger than the LSTM, 8.5% larger than the DNN, and 3.78% larger than the CNN models. Similarly, the accuracy of the DTLOC model is 15.63% superior to the LIBSVM, 13.15% superior to the LSTM, 10.37% superior to the DNN, and 5.03% superior to the CNN models.

Figure 3. Comparison of DTLOC with existing models on WESAD database for stress classification

4.1 Limitations, assumptions, and constraints

The DTLOC model outperforms other models in stress classification on the WESAD database, demonstrating higher precision, recall, F-score, and accuracy. It is important to consider the limitations, assumptions, and constraints that may affect the interpretation and generalizability of these findings.

·The results are based on the evaluation using the WESAD database, which is a specific dataset. The performance of the DTLOC model may not apply to other datasets that have different characteristics or data distributions. It is crucial to evaluate the model's performance on a wider variety of datasets to determine its ability to generalize.

·The DTLOC is designed to handle real-time concept drift in stress classification. The effectiveness of this model relies on the alignment between the concept drift in the dataset and real-world scenarios. The model's adaptability to different types of concept drift and its performance in dynamic, evolving environments should be further investigated.

·The model does not address overfitting issues. Overfitting can happen when a model performs extremely well on the training dataset but struggles to apply to new, unseen data. A thorough evaluation should assess both overfitting and generalization performance.

5. Conclusions

This paper introduces the DTLOC model, which uses DCNN with OC and TL to classify human stress levels based on psychological data. The experiments assessed the effectiveness of the DTLOC model using the WESAD database in MATLAB 2019b. The results show that the DTLOC model achieved an accuracy of 93.53%. On the WESAD dataset, the accuracy of the LIBSVM, LSTM, DNN, and CNN models were 80.89%, 82.66%, 84.74%, and 89.05%, respectively. The DTLOC model achieved precision, recall, and f-score values of 93.17%, 91.93%, and 92.55%, respectively. The values exceed those of current stress classification models.

This model can help identify individuals who are at risk of stress-related illnesses, such as anxiety, depression, and heart disease, enabling timely medical intervention. Identifying stress early can prevent post-traumatic stress disorder (PTSD) and improve overall mental health. This model has the potential to improve individuals' quality of life and enhance safety in various sectors. This model has the potential to be integrated into the cloud environment for real-time stress classification in the future. Additionally, future research can explore multi-modal fusion techniques to integrate different data sources, including social media text, images, audio, and physiological signals. This integration can lead to a more comprehensive classification of stress.

  References

[1] Traylor, C.S., Johnson, J.D., Kimmel, M.C., Manuck, T.A. (2020). Effects of psychological stress on adverse pregnancy outcomes and nonpharmacologic approaches for reduction: An expert review. American Journal of Obstetrics & Gynecology MFM, 2(4): 100229. https://doi.org/10.1016/j.ajogmf.2020.100229

[2] Nguyen, A.V., Soulika, A.M. (2019). The dynamics of the skin’s immune system. International Journal of Molecular Sciences, 20(8): 1811. https://doi.org/10.3390/ijms20081811

[3] Giannakakis, G., Grigoriadis, D., Giannakaki, K., Simantiraki, O., Roniotis, A., Tsiknakis, M. (2019). Review on psychological stress detection using biosignals. IEEE Transactions on Affective Computing, 13(1): 440-460. https://doi.org/10.1109/TAFFC.2019.2927337

[4] Smets, E., De Raedt, W., Van Hoof, C. (2018). Into the wild: the challenges of physiological stress detection in laboratory and ambulatory settings. IEEE Journal of Biomedical and Health Informatics, 23(2): 463-473. https://doi.org/10.1109/JBHI.2018.2883751

[5] Suárez, A., Núñez, F.,  Rodriguez-Fernandez, M. (2020). Circadian phase prediction from non-intrusive and ambulatory physiological data. IEEE Journal of Biomedical and Health Informatics, 25(5): 1561-1571. https://doi.org/10.1109/JBHI.2020.3019789

[6] Welch, K.C., Harnett, C., Lee, Y.C. (2019). A review on measuring affect with practical sensors to monitor driver behavior. Safety, 5(4): 72. https://doi.org/10.3390/safety5040072

[7] Li, S., Sung, B., Lin, Y., Mitas, O. (2022). Electrodermal activity measure: A methodological review. Annals of Tourism Research, 96: 103460. https://doi.org/10.1016/j.annals.2022.103460

[8] Zahari, Z.L., Mustafa, M., Zain, Z.M., Abdubrani, R., Tripathi, A., Choudhury, T. (2023). EEG based emotion recognition using long short term memory network with improved Rat Swarm Optimization Algorithm. Revue d'Intelligence Artificielle, 37(2): 281-289. https://doi.org/10.18280/ria.370205  

[9] Hickey, B.A., Chalmers, T., Newton, P., Lin, C.T., Sibbritt, D., McLachlan, C.S., Lal, S. (2021). Smart devices and wearable technologies to detect and monitor mental health conditions and stress: A systematic review. Sensors, 21(10): 3461. https://doi.org/10.3390/s21103461

[10] AlShorman, O., Masadeh, M., Heyat, M.B.B., Akhtar, F., Almahasneh, H., Ashraf, G.M., Alexiou, A. (2022). Frontal lobe real-time EEG analysis using machine learning techniques for mental stress detection. Journal of Integrative Neuroscience, 21(1): 20. https://doi.org/10.31083/j.jin2101020

[11] Wen, T.Y., Aris, S.A.M., Jalil, S.Z.A., Usman, S. (2021). Electroencephalogram stress classification of single electrode using k-means clustering and support vector machine. In: IEEE International Conference on Signal and Image Processing Applications, Kuala Terengganu, Malaysia, pp. 77-82. https://doi.org/10.1109/ICSIPA52582.2021.9576794

[12] Castro-García, J.A., Molina-Cantero, A.J., Gómez-González, I.M., Lafuente-Arroyo, S., Merino-Monge, M. (2022). Towards human stress and activity recognition: A review and a first approach based on low-cost wearables. Electronics, 11(1): 155. https://doi.org/10.3390/electronics11010155

[13] Shermadurai, P., Thiyagarajan, K. (2023). Deep learning framework for classification of mental stress from multimodal datasets. Revue d'Intelligence Artificielle, 37(1): 155-163. https://doi.org/10.18280/ria.370119

[14] Jawharali, B., Arunkumar, B. (2019). Efficient human stress level prediction and prevention using neural network learning through EEG signals. International Journal of Engineering Research and Technology, 12(1): 66-72.

[15] Li, R., Liu, Z. (2020). Stress detection using deep neural networks. BMC Medical Informatics and Decision Making, 20: 1-10. https://doi.org/10.1186/s12911-020-01299-4

[16] Chen, T., Ju, S., Ren, F., Fan, M., Gu, Y. (2020). EEG emotion recognition model based on the LIBSVM classifier. Measurement, 164: 108047. https://doi.org/10.1016/j.measurement.2020.108047

[17] Liu, Y., Fu, G. (2021). Emotion recognition by deeply learned multi-channel textual and EEG features. Future Generation Computer Systems, 119: 1-6. https://doi.org/10.1016/j.future.2021.01.010

[18] Memar, M., Mokaribolhassan, A. (2021). Stress level classification using statistical analysis of skin conductance signal while driving. SN Applied Sciences, 3(1): 64. https://doi.org/10.1007/s42452-020-04134-7

[19] Billah, M.A.M., Raihan, M., Alvi, N., Akter, T., Bristy, N.J. (2021). A data mining approach to identify the stress level based on different activities of human. In: IEEE International Conference on Information and Communication Technology for Sustainable Development, Dhaka, Bangladesh, pp. 31-34. https://doi.org/10.1109/ICICT4SD50815.2021.939689

[20] Albagmi, F.M., Alansari, A., Al Shawan, D.S., AlNujaidi, H.Y., Olatunji, S.O. (2022). Prediction of generalized anxiety levels during the Covid-19 pandemic: A machine learning-based modeling approach. Informatics in Medicine Unlocked, 28: 100854. https://doi.org/10.1016/j.imu.2022.100854

[21] Salama, E.S., El-Khoribi, R.A., Shoman, M.E., Shalaby, M.A.W. (2018). EEG-based emotion recognition using 3D convolutional neural networks. International Journal of Advanced Computer Science and Applications, 9(8): 329-337. https://doi.org/10.14569/IJACSA.2018.090843

[22] He, J., Li, K., Liao, X., Zhang, P., Jiang, N. (2019). Real-time detection of acute cognitive stress using a convolutional neural network from electrocardiographic signal. IEEE Access, 7: 42710-42717. https://doi.org/10.1109/ACCESS.2019.2907076

[23] Wei, C., Chen, L.L., Song, Z.Z., Lou, X.G., Li, D.D. (2020). EEG-based emotion recognition using simple recurrent units network and ensemble learning. Biomedical Signal Processing and Control, 58: 101756. https://doi.org/10.1016/j.bspc.2019.101756

[24] Bara, C.P., Papakostas, M., Mihalcea, R. (2020). A deep learning approach towards multimodal stress detection. In: Proceedings of the Workshop on Affective Content Analysis, New York, pp. 67-81.

[25] Gannouni, S., Aledaily, A., Belwafi, K., Aboalsamh, H. (2021). Emotion detection using electroencephalography signals and a zero-time windowing-based epoch estimation and relevant electrode identification. Scientific Reports, 11(1): 1-17. https://doi.org/10.1038/s41598-021-86345-5

[26] Phutela, N., Relan, D., Gabrani, G., Kumaraguru, P., Samuel, M. (2022). Stress classification using brain signals based on LSTM network. Computational Intelligence and Neuroscience, 2022: 7607592. https://doi.org/10.1155/2022/7607592