Content area
Brain-Computer Interfaces provide promising alternatives for detecting stress and enhancing emotional resilience. This study introduces a lightweight, subject-independent method for detecting stress during arithmetic tasks, designed for low computational cost and real-time use. Stress detection is performed through ElectroEncephaloGraphy (EEG) signal analysis using a simplified processing pipeline. The method begins with preprocessing the EEG recordings to eliminate artifacts and focus on relevant frequency bands (, , and ). Features are extracted by calculating band power and its deviation from a baseline. A statistical thresholding mechanism classifies stress and no-stress epochs without the need for subject-specific calibration. The approach was validated on a publicly available dataset of 36 subjects and achieved an average accuracy of 88.89%. The method effectively identifies stress-related brainwave patterns while maintaining efficiency, making it suitable for embedded and wearable devices. Unlike many existing systems, it does not require subject-specific training, enhancing its applicability in real-world environments.
Introduction
Stress symptom has been identified as one of the main contributors to mental and physical health issues. Several techniques are used in detecting stress symptoms, like Heart Rate Variability (HRV) [1, 2], Galvanic Skin Response (GSR) [3], Speech Analysis [4], computer vision by using facial expression analysis [5] and ElectroEncephaloGraphy (EEG) [6]. EEG offers a unique advantage for stress detection as it directly measures cognitive activity in the brain, providing deeper insights into stress mechanisms compared to peripheral signals such as GSR and HRV. Unlike these modalities, which mainly capture secondary physiological responses, EEG enables the identification of neural patterns that are closely linked to cognitive stress. However, this benefit comes with added complexity, since EEG acquisition typically requires the placement of multiple electrodes and more careful preparation, making it less convenient than GSR or HRV sensors, which are easier to wear and less invasive.
Furthermore, EEG holds an added advantage through its high temporal resolution and neuro anatomical specificity. Unlike GSR and HRV, which provide generalized markers of autonomic arousal, EEG captures millisecond-level neural dynamics and links them to distinct brain regions, such as frontal alpha asymmetry or theta/beta ratios in the prefrontal cortex, well-established indicators of cognitive and emotional stress. This allows stress detection with greater precision and interpretability, directly tying physiological signals to underlying neural mechanisms rather than indirect downstream responses.
From a research standpoint, advancements in neuroscience pave the way for researchers to adapt Brain-Computer Interfaces (BCIs) technology to detect stress symptoms through the analysis of EEG signals [6]. These EEG-based systems shift the focus from traditional physiological indicators to capturing cognitive stress directly from brain activity [6, 7]. The implications of EEG-based stress detection extend beyond academic inquiry; they hold the potential to inform tailored interventions for individuals suffering from stress-related disorders, such as anxiety and Post-Traumatic Stress Disorder (PTSD). EEG-based stress detection has emerged as a compelling field due to its non-invasive monitoring of brain dynamics and its capacity to reveal cognitive and emotional fluctuations in real time. While earlier research demonstrated EEG’s role in capturing stress-induced neural activity, recent advances in signal processing and machine learning have enhanced its sensitivity and broadened its applicability. In particular, techniques such as phase synchrony, coherence, and connectivity analyses now complement traditional frequency-domain measures, providing deeper insights into stress-specific brain dynamics [8, 9].
Recently, stress detection using non-invasive BCIs has garnered significant attention. BCIs measure electrical activity associated with stress via sensors placed on the scalp. By examining EEG patterns, it becomes possible to identify specific brainwave frequencies associated with varying stress levels, thereby providing an objective assessment of stress without the need for invasive procedures like surgical [10]. Most of the current research is focused on improving the accuracy and speed of EEG-based stress detection to make it compatible with real-time systems, such as wearable devices [11]. This evolution includes a shift from simple classifiers like K-Nearest Neighborss (KNNs) and Decision Trees toward more sophisticated deep learning architectures, including Deep Neural Networks (DNNs) and Attention-based Transformers [12]. Such models better capture spatial-temporal EEG dynamics, while transfer learning techniques offer solutions to inter-subject variability by improving generalizability across diverse user profiles. However, EEG-based systems still face notable limitations. Signal artifacts and inter-subject variability continue to hinder the robustness of classification. Recent work suggests that embedding artifact-resilient features into learning models can improve reliability without the need for aggressive preprocessing [13]. Additionally, the recognition of stress as a multifaceted phenomenon-encompassing physiological, behavioral, and psychological components-has led to the emergence of multimodal systems. These integrate EEG with complementary signals such as HRV, electrodermal activity, or voice analysis, thus enhancing both accuracy and interpretability [14]. Looking to the future, the integration of BCIs with wearable EEG devices presents a promising avenue for continuous, real-time stress monitoring, stress management strategies by providing real-time feedback to users, thus fostering a proactive approach to mental wellness [15]. This intersection of neuroscience and technology not only enriches our understanding of stress but also paves the way for innovative therapeutic solutions that can transform mental health care while introducing new challenges related to privacy, signal stability, and the personalization of feedback in dynamic environments [16]. Future systems are expected not only to detect stress but to anticipate it through contextual awareness (e.g., via environment sensors or activity logs), enabling earlier interventions and individualized support mechanisms.
From a technical standpoint, arithmetic calculations are commonly used in psychological research to induce cognitive load and stress as they require concentration and problem-solving skills, which can increase stress, especially under timed or challenging conditions. The generated brain activities are acquired during the execution of these tasks through specific acquisition devices such as GUSBAMP, OpenBCI, and Emotive [17]. The EEG acquisition devices are part of the BCI systems, which track specific patterns by leveraging machine learning algorithms to detect stress symptoms [18], such as increased theta wave activity in the frontal lobe, associated with higher cognitive load, and alpha wave variations indicating changes in attention levels. By analyzing these EEG characteristics, researchers can conclude the presence and magnitude of stress.
However, existing literature reveals several research gaps in designing BCIs for stress detection. The inter-subject variability is the main obstacle and restricts the applicability of the existing technology [19, 20]. Most existing approaches rely on a customized model where the system is calibrated for each subject, rendering the system inoperable or limiting its use in the real world. A secondary obstacle is the lack of a large dataset, which is essential to improve the model accuracy, especially in addressing the over-fitting problem, and guaranteeing robustness across varied populations. Lastly, the artifact removal and preprocessing methods still provide difficulties, especially in noisy environments where precise feature extraction is required to develop a highly accurate signal processing chain [21, 22–23].
This study focuses on developing subject-independent stress detection models by analyzing EEG band power differences before and during cognitive tasks. Using signal processing algorithms in conjunction with statistical analysis, we identify thresholds to classify stress without requiring subject-specific training. By comparing standard deviations of EEG band power across channels, we compute maximum differences, enabling efficient and adaptable stress classification without individual calibration. The proposed signal processing chain is validated according to the off-line approach for the purpose of comparison. It is designed for real-time application due to its computational efficiency as it is composed of very simple algorithms including preprocessing, feature extraction, and classification. The selected algorithms can be easily integrated within a low-power Central Processing Unit (CPU) of any acquisition system. The benefit of this integration manifests itself in reducing the throughput as the size of the transmitted signal is significantly reduced. So, by offloading preliminary computations, the central CPU can process a smaller set of samples, ensuring real-time stress monitoring feasibility in practical applications. The novelty in our approach is detecting the EEG patterns related to stress symptoms using non-computational signal processing algorithms, which offer a real-time solution that can be integrated into both clinical and everyday settings.
The following is the structure of this paper: In Sect. 2, an overview of related work in various applications of stress symptom detection is provided. Section 3 presents the methodology, including the proposed framework, feature extraction, classification techniques, and the used dataset. In Sect. 4, we present and discuss the results of the proposed approach. Finally, Sect. 5 concludes the paper and discusses potential future research directions.
Related work
Stress detection using EEG signal shows great interest as it is based on non-invasive technology, allows monitoring of brain activity, and identifies stress-related neural patterns. This literature review synthesizes findings from several studies, highlighting methodologies, machine learning models, and challenges in EEG based stress detection. It underscores the potential of EEG in real-time stress management applications, while also addressing the limitations and future directions of this technology. Furthermore, it emphasizes the need for standardized protocols and larger datasets to enhance model accuracy and generalizability across diverse populations. In addition, the integration of multimodal approaches, combining EEG with other physiological signals such as heart rate variability and galvanic skin response, may offer a more comprehensive understanding of stress responses and improve detection accuracy [24].
EEG signals are characterized by different frequency bands, such as alpha (: 8-13 Hz ), beta (: 14-30 Hz), and gamma (: 31-50 Hz), which provide insights into mental states and stress levels. Frequency analysis and feature extraction remain essential for isolating brainwave patterns associated with stress responses. Recent studies further demonstrate that deep learning approaches, which can automatically learn discriminative features from these frequency components, outperform traditional machine learning methods (e.g., KNN) in EEG-based stress detection, with accuracy reported as the primary evaluation metric [25]. These advancements could pave the way for innovative interventions tailored to individual stress profiles, ultimately fostering better mental health outcomes. The development of algorithms that can accurately interpret these signals in real-time, allows for timely and personalized responses to stressors.
Preprocessing techniques, including artifact removal and feature extraction methods like Principal Components Analysis (PCA), Independent Components Analysis (ICA), and Discrete Cosine Transform (DCT), are essential for enhancing the accuracy of stress detection models. These methods help in reducing noise and improving the quality of EEG data [25, 26]. Statistical features such as mean and standard deviation of EEG channels have been shown to outperform other feature sets in stress classification tasks, indicating their importance in EEG signal processing [27]. Moreover, integrating machine learning techniques can further refine these models, enabling them to adapt and learn from individual user patterns over time, thus enhancing their predictive capabilities.
Various machine learning models, including KNN, Support Vector Machine (SVM), and gradient boosting methods, have been employed for stress detection. Among these, LightGBM has been reported to achieve the best performance in terms of classification accuracy [28]. Deep learning models, particularly Convolutional Neural Networkss (CNNs) and Long Short-Term Memory networkss (LSTMs), have also been widely explored for EEG-based stress detection, with CNNs being the most used and hybrid architectures showing additional promise [29]. The integration of deep learning with EEG data, using spectral and topographical representations, has achieved classification accuracies of up to 88%, highlighting the potential of these models in stress detection [28]. Furthermore, the adoption of transfer learning techniques, as opposed to adaptive (online) learning approaches that continuously update the model based on new data or feedback [30], has emerged as a valuable strategy in EEG-based stress analysis. Transfer learning enables models pre-trained on large-scale datasets to be fine-tuned for specific stress detection tasks, thereby enhancing performance while reducing the reliance on extensive labeled data. In parallel, the integration of multimodal data fusion, combining EEG signals with complementary physiological measures such as HR and GSR, has further strengthened the robustness and generalizability of stress detection systems, facilitating a more comprehensive and reliable assessment of individual stress levels. For example, recent research studies showed that EEG has strong potential for stress detection, achieving high accuracy in real-world classroom environments [31] and showing robust performance on benchmark datasets using deep learning frameworks [32]. In the context of an academic setting, recent classroom-based work demonstrates that frontal-channel EEG signals processed with online artifact removal and a suitable classifier can distinguish elevated stress levels in students with balanced accuracy around 78% in a real academic environment [33], and network- and time-series analyses of EEG recorded during examinations reveal that academic stress correlates with dynamic interactions between emotion states such as focus, interest, and anxiety [34].
EEG-based stress detection has applications in clinical diagnosis, occupational stress evaluation, and BCIs. The development of wearable EEG devices for continuous monitoring is a promising area of research [35]. Challenges in EEG-based stress detection include data quality, artifact reduction, and the need for robust models that can generalize across different subjects. The variability in individual responses to stress necessitates personalized models [36]. The use of multimodal data sources, such as physiological signals and behavioral data, alongside EEG, is suggested to improve the accuracy and reliability of stress detection systems [35].
While EEG-based stress detection shows significant promise, it is important to consider the limitations of current methodologies. The variability in EEG signal interpretation and the need for personalized approaches highlight the complexity of stress detection. Additionally, the integration of EEG with other biosignals and the development of user-friendly wearable devices are essential for advancing this field. EEG-based stress detection might also offer a new research venue for understanding neuroplasticity, which focuses on brain changes by transferring chemical signals (neurons) and structure (the connection between them).
Future research should focus on developing comprehensive datasets and exploring advanced Artificial Intelligence (AI) techniques, such as transfer learning and Graph Convolutional Networks (GCN), to enhance the effectiveness of stress detection systems [37]. Addressing practical challenges in deploying wearable technologies, such as data privacy and computational efficiency, is crucial for the real-world application of EEG-based stress detection [37]. One of the main challenges of such systems is the generalizability of models across different subjects due to inter-subject variability. Innovative approaches like EEG data image representations and GCNs are suggested to address this issue [28]. Furthermore, integrating multimodal data sources, such as physiological signals and contextual information, could significantly improve the robustness of stress detection systems and provide a more holistic understanding of stress responses [36]. Additionally, leveraging machine learning techniques to analyze these multimodal datasets can enhance predictive accuracy and facilitate personalized stress management interventions.
Methodology
This section presents a general overview of the BCIs and outlines the methodology followed to design and validate the EEG-based stress detection system. The proposed approach integrates data visualization, feature extraction, and statistical analysis to detect stress.
Background
Figure 1 presents the pipeline of the BCIs, which can be validated according to the offline and online approaches. The offline approach consists of the validation of EEG signal processing chain using a public dataset (provided in different formats such as EDF file), which is usually used for comparison purposes. The online approach is validated accordingly using the gathered data using a set of electrodes, denoted , characterized by their labels and unique serial numbers within brain lobes and are placed on the scalp using the international location 10-20 system. In this study, we discriminate between two states : no-stress () and stress (). The EEG signal corresponding to each state is called a trial t. The set of all trials, , captures brain activity across different subjects (). The EEG signals are lengthy, with hundreds of samples for every trial t. As a result, the data is divided into fixed-duration periods called epochs () to make the analysis more doable and targeted.
[See PDF for image]
Fig. 1
EEG signal processing pipeline for stress detection: The pipeline begins with reading raw EEG data from an EDF file, followed by a pre-processing block utilizing a band-pass filter to isolate relevant frequency bands. Feature extraction is then performed to derive informative signal characteristics, which are subsequently fed into a classification block for stress state prediction. This modular framework is designed for efficiency and compatibility with real-time applications
After reading the EEG and the corresponding parameters such as the electrode location, sampling frequency, and labels, a filtering process is applied to remove unwanted signals. The spectrums outside are removed as they are considered artifacts. Consequently, useful information should be kept, reducing the size of the EEG signals. Finally, the extracted features are used in a classification model to detect stress symptoms. The training of the model is performed using labeled trials ( and ) to ensure a highly accurate classification model. The testing of the system is performed on new trials by hiding the labels and comparing at the end the predicted labels with the real ones to measure the error rate committed by the classification model.
Description of the dataset
The dataset contains EEG recordings of 36 subjects (ages 16–26, 28 females and 8 males), denoted by () [38]. Among them, 10 subjects are labeled as stressed and 26 as normal. Each subject performed two sessions: a baseline recording before the arithmetic task (no-stress, suffix _1) and a recording during the task (stress, suffix _2). EEGs were acquired using a Neurocom EEG system with 23 silver/silver chloride electrodes (), placed according to the International 10/20 scheme. Each session lasted 60 s and was sampled at 500 Hz. Signals were pre-filtered with a 60 Hz high-pass filter and a 50 Hz notch filter, and artifacts were removed using ICA [38].
For stressed subjects, all epoch windows () were retained, whereas for normal subjects only the first 12 were kept, ensuring that the number of epochs was approximately balanced between the two classes. This procedure resulted in 300 epochs for the stressed group and 312 epochs for the normal group, giving a total of 612 epochs across all subjects. However, the dataset remains relatively small (36 subjects, with 10 stressed and 26 normal), which may affect generalizability. To address this limitation, we additionally applied Synthetic Minority Oversampling Technique (SMOTE) at the subject level, as detailed in the results, to further validate robustness under balanced conditions. Table 1 shows an overview of the dataset structure and balancing procedure.
Table 1. Summary of dataset structure
Subjects | Condition | Epoch length (s) | Epochs per subject |
|---|---|---|---|
26 | No-stress (baseline, suffix _1) | 2 | 12 |
10 | Stress (arithmetic task, suffix _2) | 2 | 30 |
Total no-stress epochs | 26 12 = 312 | ||
Total stress epochs | 10 30 = 300 | ||
Grand total (after balancing) | 612 | ||
Visualization and interpretation
The EEG is deeply examined in both the temporal and spectral domains. This phase was crucial to confirm that the data was coherent, consistent, and devoid of any noticeable artifacts that might distort the analysis.
We initiated our analysis by plotting the tempo-frequency domain of many trials t across different channels to visualize and interpret the data comprehensively. In this study, analysis was conducted on all EEG channels for robustness, but we present results from the frontal electrodes ( and ) for clarity, as they are most sensitive to stress and cognition-related activity [10, 39]. These examples are illustrative, while the full statistical analysis includes all channels. Figure 2 shows an illustration epoch () of 2 s where the blue color represents the signal before the arithmetic task and the red is during the arithmetic task. We focused only on as they contain useful information regarding the stress symptoms [39]. In parallel, the signals are analyzed in the frequency domain, as depicted in Fig. 3, with the primary objective of investigating the distribution of power across , and bands. This analysis was particularly valuable in identifying any irregularities, discrepancies, or changes within the frequency components that could potentially correlate with the stress caused by the execution of the arithmetic task. To validate our findings, we visualized the band power across for different channels and compared them with the baseline. This step helped in interpreting the results and understanding the specific EEG patterns associated with stress symptoms.
[See PDF for image]
Fig. 2
Temporal EEG representations at Fp1 and Fp2 Channels before and during arithmetic tasks. Blue traces correspond to the baseline (no-stress) condition, while red traces represent EEG activity recorded during the task, reflecting the presence of stress. Noticeable temporal differences are observed between baseline and task periods for both channels, indicating potential EEG markers for stress identification during cognitive load induced by subtraction tasks
[See PDF for image]
Fig. 3
Power spectral density plots at Fp1 and Fp2 Channels. Blue lines correspond to the baseline (no-stress) condition, while red lines represent EEG activity during the arithmetic task, associated with stress. The variations in spectral profiles between baseline and arithmetic task phases suggest shifts in cognitive state, reinforcing the relevance of frequency-based features in stress detection
The methodology outlined above enabled us to systematically analyze the EEG data, providing a robust framework for detecting stress during cognitive tasks. This approach offers significant potential for applications in stress management and mental health monitoring.
Feature extraction
Algorithm 1 presents the implemented steps to track the power within , , and , which are associated with the cognitive load and stress responses [40]. This block is the main core of our analysis to detect stress based on EEG signals. Figure 4 presents an illustration of the power variation of two epochs , during and before the execution of the arithmetic task, in the two channels and for Subject_0, who is diagnosed with stress. As observed, the band power across all frequency bands is generally lower before the arithmetic task compared to during the task, indicating the presence of stress when the subject is performing mental arithmetic. Specifically, as shown in 4b, the band power levels before and after the task are nearly identical, suggesting that stress might not have been detected in this channel () or that there was no induced stress at this point of measurement.
[See PDF for image]
Fig. 4
Band power analysis of at and channels before and during a mental arithmetic task. Blue bars indicate baseline (no-stress) values, while red bars represent task-induced (stress) values. The figure presents power values across standard EEG sub-bands: , , , , and . As observed in the temporal domain, the frequency domain reveals notable differences in band power between baseline and task periods, supporting the identification of stress-related neural patterns
The response variability among subjects is one of the notable features of EEG signals. Some participants may stress even before engaging in mental arithmetic, emphasizing the need for individualized data analysis. From this point of view, we calculated the average band power of the three bands (, , and ) across all channels for trials t with suffix . Figure 5 shows an illustration of the computed average band power in three sub-bands. It serves as a reference, and it is used to identify areas where stress is present in trials t with suffix . Subsequently, we segmented t into multiple epochs and assessed the corresponding band power for each in each sub-band and channel (e).
[See PDF for image]
Algorithm 1
Feature extraction
[See PDF for image]
Fig. 5
Reference band power distribution for subject00: This figure presents the computed average power across three selected EEG sub-bands, serving as a baseline reference. These values are used to detect deviations in subsequent trials, enabling the identification of segments associated with stress responses during cognitive tasks
Epoch division and signal segmentation
The EEG signals with suffix "" were segmented into an ensemble of epoch with a length of 2 s to analyze stress at finer temporal resolutions. This approach allows the instantaneous examination of changes in band power. We tested different epoch lengths, and overlapping epochs were also considered to maximize data utilization and improve the robustness of the analysis.
Let be the signal recorded at each electrode e, with a total length of samples. We divide into M overlapping epochs computed according to equation (Eq. 1), each of duration 2 s. M is computed according to equation (Eq. 2).
1
where L is the number of samples in each epoch and O is the overlap between successive in samples. The total number of M is given by:2
Statistical analysis for stress detection
The computation of the stress and no-stress features in each epoch is followed by a statistical analysis block. It permits the identification of the specific time window or correlated with heightened stress responses. For every epoch , the band power was contrasted with the baseline () to calculate the standard deviation across the , , bands. The deviations were subsequently examined to pinpoint epochs where the deviation surpassed a set threshold, signifying possible stress.
Figure 6 shows an example of standard deviation computed at the electrodes and for subject_00, who is stressed. We note that the standard deviation is computed similarly for all channels. Stress was identified and acknowledged during a specific timeframe when the standard deviation of any given frequency band exceeded a predetermined threshold, denoted as . It is determined by calculating the maximum difference in standard deviation for each channel to set a threshold that accurately reflects variations in the dataset.
[See PDF for image]
Fig. 6
Standard deviation of EEG band power at and channels: This figure illustrates the variability of power across different EEG sub-bands, providing insight into signal fluctuations at each channel, which may reflect cognitive load and stress-related dynamics during task execution
[See PDF for image]
Algorithm 2
Stress detection logic
Algorithm 2 outlines the steps to compute and compare the maximum difference in standard deviation across channels . It outlines the various steps taken after computing the statistical features to detect stress. It involves several steps, starting with computing the maximum difference in standard deviation () for each channel (e) to measure and fix the threshold required to train the model. Consequently, the average maximum difference across all channels () is estimated by averaging among the different subjects the obtained maximum difference of , , and bands for similar channels. The estimated threshold separates between the feature value of the two trials, where the tested trial will be classified as when exceeds the average standard deviation; otherwise, it will be labeled as . Finally, stress is predicted for each subject based on whether the number of ’stress’ labels exceeds half of the total number of epochs.
As shown, the proposed stress detection model is designed to be subject-independent, eliminating the need for individual calibration. By integrating data from multiple subjects, our approach aims to create a more adaptable and practical framework suitable for real-world applications where rapid and reliable stress detection is crucial. In contrast, for example, to [41], which identifies sensitive electrodes for each subject, our model is designed to assess electrode sensitivity across all subjects collectively. This universal approach enhances the model’s versatility and scalability, making it more practical for widespread deployment without the need for personalized adjustments.
The threshold was established by calculating the maximum difference in standard deviations of band power between baseline and task conditions. This criterion was chosen because it effectively identifies the most significant deviations linked to the onset of stress while remaining computationally straightforward and applicable to various subjects. Unlike machine learning methods that require subject-specific calibration or iterative optimization, this statistical approach enables efficient, real-time application on resource-constrained platforms.
The proposed approach avoids extensive calibration and instead relies on the short pre-task baseline that acts as a statistical reference to identify deviations during the arithmetic task. This step may be considered a lightweight calibration, but it is fundamentally different from the training phase in machine learning models, which usually involves subject-specific classifiers, iterative optimization, and recalibration to handle inter-subject variability.
An additional advantage of this lightweight calibration approach is its potential for scalability in uncontrolled, real-world environments. Traditional EEG-based stress detection often suffers from inter-subject variability, requiring repeated training and recalibration to maintain accuracy [42]. In contrast, statistical thresholding based on short baselines minimizes this dependency, allowing consistent performance across diverse users. Recent studies have shown that simplified EEG metrics combined with universal thresholds can achieve reliable stress detection in applied settings such as driving or multitasking simulations, with accuracy comparable to more complex subject-specific models [43]. This suggests that calibration-light methods not only reduce user burden but also improve reproducibility and generalization, making them more suitable for widespread deployment on wearable and mobile platforms.
Results and discussion
In this study, the EEG signals were examined for initial exploration in both the time and frequency domains. In the time domain, signals across channels were plotted to confirm coherence, while in the frequency domain, the power distribution across critical EEG frequency bands , , and was analyzed to detect cognitive load and stress levels. Furthermore, to improve transparency and reproducibility, we have clarified the hierarchical labeling process from epochs to subject-level data and specified criteria for excluding artifact-heavy segments. This ensures that the dataset construction-balancing stress and no-stress conditions is clear and can be reliably replicated in future EEG-based stress studies.
To summarize the key findings, variations in band power within the , , and ranges were effective indicators of stress across different time periods. Notably, deviations observed in the frontal channels (specifically and ) demonstrated a strong sensitivity to stress. However, we also noted significant inter-subject variability, as some channels did not clearly differentiate between baseline and task conditions. These results are consistent with prior neuroscience research, which has also highlighted wave activity as a reliable marker of stress [44], supporting the validity of using simple statistical measurements for stress detection.
The system was evaluated using standard performance metrics, including accuracy, precision, recall, F1-score, and specificity, calculated from the confusion matrix with True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN). Because the dataset is unbalanced, the F1-score is highlighted as a trustworthy performance indicator, while accuracy is also provided to facilitate comparison with earlier studies on EEG stress detection that mainly rely on this metric. Table 2 presents the results before and after applying SMOTE. In the original dataset (Table 2a), class imbalance was evident with 10 stressed and 26 normal subjects, yielding an accuracy of 88.89% with precision, recall, and F1-score all equal to 80%. This dual reporting highlights that while the proposed method achieves high accuracy, the F1-score better reflects the trade-off between false positives and false negatives. The higher specificity compared to recall in the original dataset indicates that the system was more reliable in detecting non-stress cases than stress. This stems from the class imbalance, where non-stressed subjects outnumber stressed subjects (26 vs. 10). After applying SMOTE at the subject level to balance the dataset (Table 2b), recall increased to 84.6% and matched specificity, confirming that the asymmetry was primarily due to data imbalance rather than a limitation of the method. This comparison highlights the robustness of the proposed method, showing that performance remains competitive under both imbalanced and balanced conditions.
Table 2. Confusion matrices and performance metrics of the proposed system before (left) and after (right) applying SMOTE at the subject level
(True) | (True) | |
|---|---|---|
(a) Confusion matrix (Original) | ||
(pred) | TP = 8 | FP = 2 |
(pred) | FN = 2 | TN = 24 |
Performance metrics | ||
Accuracy: | ||
Precision: | ||
Recall: | ||
F1-score: | ||
(pred) | TP = 22 | FP = 4 |
(pred) | FN = 4 | TN = 22 |
(b) Confusion matrices (SMOTE) | ||
Performance metrics | ||
Accuracy: | ||
Precision: | ||
Recall: | ||
F1-score: | ||
The comparative analysis of stress detection methods underscores significant differences in accuracy, resource efficiency, and adaptability among various studies. Table 3 summarizes the performance of our method (average accuracy across 36 subjects) alongside representative approaches from the literature, highlighting differences in accuracy, computational efficiency, and adaptability. This comparison is intended as a contextual benchmark, since the cited studies are based on different datasets and experimental protocols, which strongly influence reported accuracy [45].
For example, in [46], the suggested chain reached an accuracy of 98%, attributed to its use of advanced techniques including Discrete Wavelet Transform (DWT), CNN, a Bidirectional LSTM (BiLSTM), and Gated Recurrent Unit (GRU). However, this high accuracy comes with a significant computational cost, as reflected in its considerable resource demands. Additionally, the system doesn’t take into consideration the subject inter-variability. In contrast, the method proposed in this study achieves an accuracy of 88.89% but offers notable advantages in terms of computational efficiency. It requires minimal resources, making it a practical choice for environments with limited computational power, especially for embedded implementation. This efficiency is complemented by the method’s strong adaptability; it does not require subject-specific training and can be universally applied across different subjects.
Similarly, other methods reviewed, such as those by [47] and [48], also involve significant computational resources and subject-specific training, which can limit their practicality in diverse settings. For instance, [47] employs a range of complex techniques, resulting in high resource usage, while [48] relies on simpler methods with moderate resource demands but still requires individual training for each subject.
In summary, the proposed method offers a balance between acceptable accuracy and minimal computational demands, making it well-suited for scenarios where computational resources are constrained. Deep learning can achieve higher accuracy, but it requires large datasets and significant computational power, making it hard to use in real-time applications. Our method, however, strikes a balance between moderate accuracy and low computational cost, enabling it to run on wearable devices without requiring retraining. This makes it ideal for ongoing stress monitoring in real-world situations.
Table 3. Comparison of stress detection approaches between the proposed method (average accuracy across 36 subjects) and representative studies from the literature. Since different datasets and experimental protocols were used, this table provides a contextual benchmark rather than a definitive statistical comparison
References | Dataset/ subjects | Class distribution | Inter-subject variability | Algorithms | Accuracy (%) | Ressources (CPU) |
|---|---|---|---|---|---|---|
[49] | DEAP/ 32 | : 208; : 201; Neutral: 231 | Reccurent Neural Network (RNN), GRU, FFT | 88.86 | ||
[50] | Online/ 7 | & : 600 | FFT, Back-propagation neural network | 70 | ||
[46] | STEW/ 48 | & : 150 | DWT, CNN, BiLSTM, and GRU | 98 | ||
[47] | DEAP/32 | & : 40 | DWT, Electrode selection, Pearson coefficient, ADASYN, ANN | 86 | ||
[51] | Online/26 | :71 & : 21 | Subspace Reconstruction, ICA, LDA | 77 | ||
[48] | DEAP/32 | & : 40 | DWT, KNN | 73.83 | ||
Proposed method | Physionet, 36 subjects | :10 & : 26 | Statistical feature, Threshold | 88.89 |
: Minimal; : Low; : Moderate; : High; : Extensive
This method is highly effective in identifying stress episodes by focusing on the significant changes in EEG activity compared to baseline measurements taken before the stress event. It is convenient for embedded applications, where computational efficiency and real-time information processing are crucial for optimal performance. The runtime of the proposed approach reached 0.012s to make a decision using 23 electrodes, demonstrating its feasibility for fast deployment.
The comparison of the proposed method with existing methods is limited by factors such as the number of classes, subjects, and channels. A key challenge is the small dataset size, which restricts the generalizability of the training models. The reported accuracy is based on only 36 subjects, with just ten classified as stressed, as shown in Table 3. As additional classes are added, accuracy may decrease; however, this can be mitigated through retraining and threshold updates. The dataset development required subjects with normal visual acuity and no cognitive impairments, excluding those on psychoactive medication. Subjects needed to be fully aware and focused to isolate stress responses. The timing of the experiment is crucial for controlling external stress factors, such as fatigue and distractions. Future studies should aim to expand the dataset, introduce more task variability, and include more participants.
Consideration should be given to adjusting the difficulty of stress-inducing tasks, particularly through more complex arithmetic problems, to gain a deeper understanding of stress detection through EEG. Previous EEG studies have shown that increased frontal theta and reduced alpha activity accompany higher cognitive workload, which shares neurophysiological characteristics with stress-related brain activity [52, 53–54]. By introducing more complex problems, we may uncover additional cognitive stress responses and affect the accuracy of EEG-based models. Future studies should explore how task complexity influences EEG signals and predictive accuracy, potentially enhancing our understanding of stress responses. Applying this approach to diverse learner groups, like university students, could help generalize findings and improve the adaptability of EEG-based stress monitoring systems.
The model’s generalizability and inter-subject variability should not hinder the use of EEG-based stress detection in the real world, given its potential. While current solutions rely on customized models, limiting scalability, incorporating multimodal data offers a solution. Adding biosignals like skin conductance and HRV to EEG could enhance the system’s understanding of stress responses. Additionally, developing wearable, user-friendly stress monitoring technologies is crucial. Investigating the link between neuroplasticity and EEG-based stress detection may also inform future studies on the effects of prolonged stress on the brain, filling gaps in current research.
Overall, the proposed system demonstrates promising potential for applications in mental health monitoring and stress management, particularly by supporting early recognition of stressors. Stress can significantly impact cognitive tasks, affecting memory, attention, problem-solving, and decision-making. Additionally, excessive stress often impairs short-term memory, reduces attention span, and hinders creative problem-solving. It can also lead to impulsive decision-making, prioritizing immediate rewards over long-term outcomes [55, 56].
Future studies might consider different types of cognitive tasks used in EEG which are also designed to elicit specific brainwave patterns corresponding to various mental processes. Examples include memory tasks like the n-back and recognition tasks, attention tasks such as the oddball paradigm and Continuous Performance Task (CPT), and language tasks like the lexical decision and verbal fluency tasks. Problem-solving is often studied with the Stroop and Iowa Gambling tasks, while motor control is assessed through motor imagery and finger-tapping tasks. Emotion-related cognitive tasks include the emotional Stroop and facial emotion recognition, while multitasking and mental arithmetic tasks help examine cognitive load and brain resource allocation. These tasks produce distinct EEG signals, including , , and waves, tied to different cognitive functions [57].
Conclusion
This study presents a subject-independent EEG-based stress detection approach that effectively identifies stress onset during arithmetic tasks. Notably, the proposed method achieves an average accuracy of 88.89% and 84.6% using the SMOTE method. Beyond accuracy, the method offers significant advantages in computational efficiency. It relies on simple yet effective statistical features and a lightweight threshold-based classifier, requiring no subject-specific calibration. This adaptability enhances its applicability across diverse users, eliminating the need for personalized training while maintaining competitive performance.
While the results are encouraging, some limitations must be noted. The dataset is relatively small (36 subjects, including 10 stressed), and the imbalance between stress and non-stress cases influenced recall in the original results. By applying SMOTE, recall was improved and balanced with specificity, demonstrating that the method remains robust under more equitable conditions. These findings suggest that with larger and more diverse datasets, the proposed approach has strong potential to generalize further.
Future research will focus on expanding the dataset, exploring multimodal biosignals to complement EEG, and testing on more complex cognitive tasks. These steps will help refine the approach, improve robustness, and ensure broader applicability in real-world stress monitoring.
Author contributions
K.B. and A.A. wrote the main manuscript text and developed the signal processing methodology. S.M. and R.D. contributed to the design of the evaluation framework and reviewed the statistical analysis. K.B. supervised the project and provided critical revisions to the manuscript. All authors reviewed and approved the final version of the manuscript.
Funding
The authors declare that no funds, grants, or other support were received during the preparation of this manuscript. This work was supported by the University of Sharjah under Research Project No. (2502150165).
Data availability
No datasets were generated or analysed during the current study.
Declarations
Competing interest
The authors declare no Conflict of interest.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
1. Immanuel, S; Teferra, MN; Baumert, M; Bidargaddi, N. Heart rate variability for evaluating psychological stress changes in healthy adults: a scoping review. Neuropsy; 2023; 82,
2. Jeroh, OE; Powers, LS; Roveda, JM. Determination of stress in humans using data fusion of off-the-shelf wearable sensors data for electrocardiogram and galvanic skin response. J Biomed Sci; 2018; [DOI: https://dx.doi.org/10.4172/2254-609x.100090]
3. Satapathy C, Gokhale H, Syed AZ, Nersisson R (2024) Galvanic skin response based stress level detection using supervised machine learning approach. In: AIP Conference Proceedings, vol. 2966. AIP Publishing
4. Kumar, A; Shaun, MA; Chaurasia, BK. Identification of psychological stress from speech signal using deep learning algorithm. e-Prime - Adv Electr Eng Electron Energy; 2024; 9, 100707. [DOI: https://dx.doi.org/10.1016/j.prime.2024.100707]
5. Saadon, JR; Yang, F; Burgert, R; Mohammad, S; Gammel, T; Sepe, M; Rafailovich, M; Mikell, CB; Polak, P; Mofakham, S. Real-time emotion detection by quantitative facial motion analysis. PLoS ONE; 2023; 18,
6. Jyothirmy S, Ahamed SF, A RR, Geethika G, Sai SB, Saiteja B (2023) Stress monitoring in humans using biomedical signal analysis. In: 2023 Second International Conference on Electrical, Electronics, Information and Communication Technologies (ICEEICT), pp. 1–7. https://doi.org/10.1109/ICEEICT56924.2023.10156948
7. Lee JH, Gamper H, Tashev I, Dong S, Ma S, Remaley J, Holbery JD, Yoon SH (2020) Stress monitoring using multimodal bio-sensing headset. In: Extended Abstracts of the 2020 CHI Conference on Human Factors in Computing Systems. CHI EA ’20, pp. 1–7. Association for Computing Machinery, New York, NY, USA. https://doi.org/10.1145/3334480.3382891
8. Sanei, S; Chambers, JA. EEG Signal Processing; 2007; Chichester, UK, Wiley: [DOI: https://dx.doi.org/10.1002/9780470511923]
9. Bouallegue, G; Djemal, R; Belwafi, K. Artificial EEG signal generated by a network of neurons with one and two dendrites. Results Phys; 2021; 20, 103699. [DOI: https://dx.doi.org/10.1016/j.rinp.2020.103699]
10. Gannouni, S; Aledaily, A; Belwafi, K; Aboalsamh, H. Electroencephalography based emotion detection using ensemble classification and asymmetric brain activity. J Affect Disord; 2022; 319, pp. 416-427. [DOI: https://dx.doi.org/10.1016/j.jad.2022.09.054]
11. De Vries S, Smits R, Tataj M, Ronckers M, Van Der Pol M, Van Oost F, Adam E, Smaling H, Meinders E (2022) Accurate stress detection from novel real-time electrodermal activity signals and multi-task learning models. In: Cognitive Computing and Internet of Things. AHFE 2022. AHFE International, New York, USA. https://doi.org/10.54941/ahfe1001845
12. Bashivan P, Rish I, Yeasin M, Codella N (2015) Learning Representations from EEG with Deep Recurrent-Convolutional Neural Networks. arXiv. https://doi.org/10.48550/ARXIV.1511.06448. arxiv:1511.06448
13. Islam, MK; Rastegarnia, A; Yang, Z. Methods for artifact detection and removal from scalp EEG: a review. Neurophys Clin/Clin Neurophy; 2016; 46,
14. Yin, Z; Zhao, M; Wang, Y; Yang, J; Zhang, J. Recognition of emotions using multimodal physiological signals and an ensemble deep learning model. Comput Methods Programs Biomed; 2017; 140, pp. 93-110. [DOI: https://dx.doi.org/10.1016/j.cmpb.2016.12.005]
15. Premchand, B; Liang, L; Phua, KS; Zhang, Z; Wang, C; Guo, L; Ang, J; Koh, J; Yong, X; Ang, KK. Wearable EEG -based brain–computer interface for stress monitoring. NeuroSci; 2024; 5,
16. Casson, AJ. Wearable EEG and beyond. Biomed Eng Lett; 2019; 9,
17. Juez, JY; Moumane, H; Nassar, M; Molina-Salcedo, I; Enrique Segura-Quijano, F; Valderrama, M; Le Van Quyen, M. Ear-EEG devices for the assessment of brain activity: a review. IEEE Sens J; 2024; 24,
18. Tonacci, A; Dellabate, A; Dieni, A; Bachi, L; Sansone, F; Conte, R; Billeci, L. Can machine learning predict stress reduction based on wearable sensors’ data following relaxation at workplace? a pilot study. Process; 2020; 8,
19. Saha, S; Baumert, M. Intra- and inter-subject variability in EEG -based sensorimotor brain computer interface: a review. Front Comput Neurosci; 2020; 13, 87. [DOI: https://dx.doi.org/10.3389/fncom.2019.00087]
20. Gonzalez-Carabarin, L; Castellanos-Alvarado, EA; Castro-Garcia, P; Garcia-Ramirez, MA. Machine learning for personalised stress detection: Inter-individual variability of EEG -ECG markers for acute-stress response. Comput Methods Programs Biomed; 2021; 209, 106314. [DOI: https://dx.doi.org/10.1016/j.cmpb.2021.106314]
21. Huang, X; Xu, Y; Hua, J; Yi, W; Yin, H; Hu, R; Wang, S. A review on signal processing approaches to reduce calibration time in EEG -based brain-computer interface. Front Neurosci; 2021; 15, 733546. [DOI: https://dx.doi.org/10.3389/fnins.2021.733546]
22. Liang, S; Li, L; Zu, W; Feng, W; Hang, W. Adaptive deep feature representation learning for cross-subject EEG decoding. BMC Bioinform; 2024; 25,
23. Brophy, E; Redmond, P; Fleury, A; De Vos, M; Boylan, G; Ward, T. Denoising EEG signals for real-world BCI applications using gans. Front Neuroergonomics; 2022; 2, 805573. [DOI: https://dx.doi.org/10.3389/fnrgo.2021.805573]
24. Bobade P, Vani M (2020) Stress detection with machine learning and deep learning using multimodal physiological data. In: 2020 Second International Conference on Inventive Research in Computing Applications (ICIRCA), pp. 51–57. https://doi.org/10.1109/ICIRCA48905.2020.9183244
25. Sahithi R, Siddarth JJ, Monisha HM, Ashok Kumar R 2024) A survey of EEG-based stress detection using machine learning and deep learning techniques. In: 2024 1st International Conference on Communications and Computer Science (InCCCS), pp. 1–6 https://doi.org/10.1109/InCCCS60947.2024.10593592
26. Bakare S, Kuge S, Sugandhi S, Warad S, Panguddi V (2024) Detection of mental stress using EEG signals - alpha, beta, theta, and gamma bands. In: 2024 5th International Conference for Emerging Technology (INCET), pp. 1–9. https://doi.org/10.1109/INCET61516.2024.10592994
27. Singh AR, Singh G, Saluja N (2024). Stress detection using EEG signals a review on current strategies and future aspects. https://doi.org/10.1109/icemps60684.2024.10559253
28. Fernandez J, Martínez R, Innocenti B, López B (2024) Contribution of EEG biosignals for stress detection. https://doi.org/10.36227/techrxiv.171709835.51370876/v1
29. Dhake D, Angal Y (2023) A comparative analysis of EEG-based stress detection utilizing machine learning and deep learning classifiers with a critical literature review. Int. J. Recent Innovat. Trends Comput. Commun. https://doi.org/10.17762/ijritcc.v11i8s.7175
30. Ibrahim S, AlSharabi K, Djemal R, Alsuwailem A (2016) An adaptive learning approach for eeg-based computer aided diagnosis of epilepsy. In: 2016 International Seminar on Intelligent Technology and Its Applications (ISITIA), pp. 55–60. https://doi.org/10.1109/ISITIA.2016.7828633
31. Wang S, Zhang S, Chen W-L, Truong D, Jung T-P (2025) From theory to application: Fine-tuning large EEG model with real-world stress data. arXiv preprint arXiv:2505.23042. [Online]. Available: https://arxiv.org/abs/2505.23042
32. Mynoddin M, Dev T, Chakma R (2025) Brain2vec: a deep learning framework for EEG-based stress detection using CNN-LSTM-attention. arXiv preprint arXiv:2506.11179. [Online]. Available: https://arxiv.org/abs/2506.11179
33. Konstantinidis, I; Avdimiotis, S; Sapounidis, T. Evaluation of academic stress employing network and time series analysis on EEG data. Information; 2025; 16,
34. Chang C-Y, Hsu C, Wu YC, Wang S, Tsui D, Jung T-P (2024) Online Mental Stress Detection Using Frontal-channel EEG Recordings in a Classroom Scenario. arXiv. https://doi.org/10.48550/ARXIV.2405.11394. https://arxiv.org/abs/2405.11394
35. Pathak, K; Haneef, F. EEG based stress analysis through feature extraction. Int J Recent innov trends comput commun; 2023; 11, pp. 140-144. [DOI: https://dx.doi.org/10.17762/ijritcc.v11i8.7931]
36. Bolpagni, M; Pardini, S; Dianti, M; Gabrielli, S. Personalized stress detection using biosignals from wearables: A scoping review. Sensors; 2024; 24,
37. Jamaluddin, R; Mazlan, M; Adom, A; Abdull Sukor, AS. Review of analysis of EEG signals for stress detection. AIP Conf Proceed; 2024; 10,
38. Zyma, I; Tukaev, S; Seleznov, I; Kiyono, K; Popov, A; Chernykh, M; Shpenkov, O. Electroencephalograms during mental arithmetic task performance. Data; 2019; 4,
39. Bali, A; Gupta, S; Singh, N; Jaggi, AS. Implicating the role of plasma membrane localized calcium channels and exchangers in stress-induced deleterious effects. Eur J Pharmacol; 2013; 714,
40. Paithane, AN; Alagirisamy, M. Electroencephalogram signal analysis using wavelet transform and support vector machine for human stress recognition. Biomed Pharmacol J; 2022; 15,
41. Gannouni, S; Aledaily, A; Belwafi, K; Aboalsamh, H. Emotion detection using electroencephalography signals and a zero-time windowing-based epoch estimation and relevant electrode identification. Scientific Reports; 2021; 11,
42. Wu, D; Lawhern, VJ; Gordon, S; Lance, BJ; Lin, CT. Driver drowsiness estimation from EEG signals using online weighted adaptation regularization for regression. IEEE Trans Hum Mach Syst; 2017; 47,
43. Sciaraffa, N; Di Flumeri, G; Germano, D; Giorgi, A; Di Florio, A; Borghini, G; Vozzi, A; Ronca, V; Varga, R; Gasteren, M; Babiloni, F; Aricò, P. Validation of a light EEG-based measure for real-time stress monitoring during realistic driving. Brain Sci; 2022; 12,
44. Pomer-Escher AG, Souza MDP, Filho TFB (2014) Methodology for analysis of stress level based on asymmetry patterns of alpha rhythms in EEG signals. In: 5th ISSNIP-IEEE Biosignals and Biorobotics Conference (2014): Biosignals and Robotics for Better and Safer Living (BRC), pp. 1–5. https://doi.org/10.1109/BRC.2014.6880963
45. Walther, D; Viehweg, J; Haueisen, J; Mäder, P. A systematic comparison of deep learning methods for EEG time series analysis. Front Neuroinf.; 2023; 17, 1067095. [DOI: https://dx.doi.org/10.3389/fninf.2023.1067095]
46. Roy, B; Malviya, L; Kumar, R; Mal, S; Kumar, A; Bhowmik, T; Hu, JW. Hybrid deep learning approach for stress detection using decomposed EEG signals. Diagnostics; 2023; 13,
47. Saranya, K; Jayanthy, S. An efficient ap-ANN-based multimethod fusion model to detect stress through EEG signal analysis. Comput intell Neurosci; 2022; 2022, pp. 1-18. [DOI: https://dx.doi.org/10.1155/2022/7672297]
48. Hasan, MJ; Kim, J-M. A hybrid feature pool-based emotional stress state detection algorithm using EEG signals. Brain Sci; 2019; 9,
49. Mhaouch, A; Fradi, M; Gtifa, W; Abdelali, AB; Machhout, M. Deep learning based recurrent neural network model for stress detection in EEG signals. Rev d’Intell Artif; 2024; 38,
50. Liao C-Y, Chen R-C, Tai S-K (2018) Emotion stress detection using EEG signal and deep learning technologies. In: 2018 IEEE International Conference on Applied System Invention (ICASI). IEEE, Chiba, Japan. https://doi.org/10.1109/icasi.2018.8394414
51. Chang C-Y, Hsu C, Wu YC, Wang S, Tsui D, Jung T-P (2024) Online Mental Stress Detection Using Frontal-channel EEG Recordings in a Classroom Scenario. arXiv. https://doi.org/10.48550/ARXIV.2405.11394. https://arxiv.org/abs/2405.11394
52. Chikhi, S; Lefebvre, A; D’Hondt, F; Delorme, A; Wascher, E. EEG power spectral measures of cognitive workload: a meta-analysis. Psychophys; 2022; 59,
53. Klimesch, W. EEG alpha and theta oscillations reflect cognitive and memory performance: a review and analysis. Brain Res Rev; 1999; 29,
54. Gärtner, M; Grimm, S; Bajbouj, M. Frontal midline theta oscillations during mental arithmetic: effects of stress. Front Behav Neurosci; 2015; 9, 96. [DOI: https://dx.doi.org/10.3389/fnbeh.2015.00096]
55. Shields, GS; Sazma, MA; McCullough, AM; Yonelinas, AP. The effects of acute stress on episodic memory: a meta-analysis and integrative review. Psychol Bull; 2017; 143,
56. Lupien, SJ; Maheu, F; Tu, M; Fiocco, A; Schramek, TE. The effects of stress and stress hormones on human cognition: implications for the field of brain and cognition. Brain Cogn; 2007; 65,
57. Cavanagh, JF; Frank, MJ. Frontal theta as a mechanism for cognitive control. Trends Cogn Sci; 2014; 18,
© The Author(s) 2025. This work is published under http://creativecommons.org/licenses/by-nc-nd/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.