Submitted:
01 September 2025
Posted:
02 September 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
- RQ1
- Shift–performance sensitivity: When the window length is fixed, how does varying the temporal window shift influence overall accuracy and macro-F1 across the six models considered?
- RQ2
- Class-wise effects: How does the shift alter per-class precision and recall, and the structure of confusions, with particular attention to the moderate-fatigue level and across-participant variability?
- RQ3
- Data volume versus independence: How does the shift modulate the effective sample count and temporal redundancy, and to what extent do these factors mediate the observed performance differences?
- RQ4
- Model dependence: Are the effects of shift consistent across classical learners and a lightweight transformer, or do interactions between model capacity and shift emerge under the same segmentation and features?
2. Related Work
3. Materials and Methods
3.1. Dataset Characteristics
3.2. Processing Pipeline
3.2.1. Bandpass Filtering
3.2.2. Artifact Handling Using Independent Component Analysis
3.2.3. Wavelet-Based Feature Extraction
3.2.4. Statistical Feature Extraction
- Central tendency and dispersion: mean, standard deviation, variance.
- Range and energy-related measures: peak-to-peak amplitude (ptp), minimum, maximum, mean-square, root-mean-square (RMS).
- Indices of extrema: index of the minimum, index of the maximum (useful to indicate within-window timing of salient excursions).
- Shape descriptors: skewness and kurtosis (higher-order moments summarizing asymmetry and tail heaviness).
- Absolute successive differences: a simple variability proxy sensitive to short-lived fluctuations within the window.
3.3. Windowing and Temporal Shift
| No of samples S (shift) | Shift (in s) | Overlap (%) | Windows per recording | Total windows |
|---|---|---|---|---|
| 128 | 1.00 | 75.00 | 147 | 13 230 |
| 64 | 0.50 | 87.50 | 293 | 26 370 |
| 32 | 0.25 | 93.75 | 585 | 52 650 |
| No of samples S (shift) | Low (N=42) | Moderate (N=23) | High (N=25) | Total (N=90) |
|---|---|---|---|---|
| 128 | 6 174 | 3 381 | 3 675 | 13 230 |
| 64 | 12 306 | 6 739 | 7 325 | 26 370 |
| 32 | 24 570 | 13 455 | 14 625 | 52 650 |
3.4. Classifier Models
3.4.1. Traditional Machine Learning Models
- Decision Trees (DTs) are non-parametric models that recursively partition the feature space into homogenous subsets by selecting feature thresholds that maximize class purity, typically via Gini impurity or information gain. At each node, the best split is chosen to minimize impurity in child nodes, yielding an interpretable tree of decision rules. This model can capture complex nonlinear patterns without requiring feature scaling, but individual trees often overfit small datasets [34]. We used the Gini criterion and no maximum depth in our experiments, allowing the tree to grow fully to capture subtle fatigue-related distinctions in our 13-dimensional feature set. The unbounded configuration follows EEG studies showing that fully grown trees can excel when combined with ensemble methods [35].
- Random Forest (RF) mitigates decision trees’ variance by training an ensemble of trees on bootstrapped subsets of the data and random feature subsets at each split, then aggregating predictions via majority voting. Random forests have repeatedly achieved top performance in EEG-based fatigue and workload detection tasks [34]. We implemented a random forest classifier with 100 trees, Gini impurity, and the size of the subsets of features to consider when splitting a node equal to the square root of the total features.
- k-Nearest Neighbors (kNN) is an instance-based classifier that assigns a class to a new sample based on the majority label among its k closest neighbors in feature space, measured by Euclidean distance. kNN makes minimal assumptions about data distributions, but it can be sensitive to noise and irrelevant features. Prior EEG studies have shown that kNN with small k values tends to perform well on statistical feature vectors. Accordingly, we set k=5 and used Euclidean distance, following benchmarks demonstrating that this choice optimally balances bias and variance on similar datasets [36].
- Support Vector Machines (SVMs) seek hyperplanes that maximize the margin between classes in a high-dimensional space, with kernel functions enabling nonlinear decision boundaries. The Radial Basis Function (RBF) kernel is particularly well-suited for EEG features, capturing complex patterns without explicit feature transformations. SVMs have achieved strong performance in workload and fatigue classification when tuned with appropriate regularization (’C’) and kernel bandwidth (’gamma’) parameters [10]. We used an RBF kernel with default settings (C=1.0, gamma=’scale’), offering a robust starting point that balances margin maximization and computational tractability.
- Multilayer Perceptron (MLP) networks are feed-forward neural models with one or more hidden layers, enabling the learning of complex, nonlinear mappings via backpropagation and gradient-based optimization. Despite their "black-box" nature, shallow MLPs (one hidden layer) have proven effective on engineered EEG features, providing a balance between model capacity and overfitting risk. We configured an MLP with a single hidden layer of 100 neurons, ReLU activation, and a softmax output layer. We trained MLP using the Adam optimizer (learning rate 0.001) for up to 200 epochs with early stopping (patience 20). This setup reflects established EEG benchmarks and leverages dropout (rate 0.5) to regularize the network [37].
3.4.2. Transformer Model
3.5. Evaluation
4. Results and Discussion
4.1. Effect of Temporal Shift on Aggregate Metrics (RQ1)
4.2. Class-Wise Effects (RQ2)
4.3. Data Volume and Sample Independence (RQ3)
4.4. Model Dependence (RQ4)
| Shift = 128 | Shift = 64 | Shift = 32 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | Acc | Prec | Rec | F1 | Acc | Prec | Rec | F1 | Acc | Prec | Rec | F1 |
| Decision Tree | 0.88 | 0.87 | 0.87 | 0.87 | 0.93 | 0.93 | 0.93 | 0.93 | 0.97 | 0.97 | 0.97 | 0.97 |
| Random Forest | 0.97 | 0.98 | 0.97 | 0.97 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 |
| SVC | 0.46 | 0.72 | 0.34 | 0.22 | 0.47 | 0.77 | 0.34 | 0.23 | 0.47 | 0.56 | 0.36 | 0.31 |
| kNN | 0.90 | 0.89 | 0.89 | 0.89 | 0.96 | 0.96 | 0.95 | 0.96 | 0.98 | 0.98 | 0.98 | 0.98 |
| MLP | 0.62 | 0.60 | 0.58 | 0.57 | 0.74 | 0.73 | 0.72 | 0.71 | 0.80 | 0.78 | 0.78 | 0.78 |
| Transformer | 0.64 | 0.61 | 0.58 | 0.58 | 0.73 | 0.72 | 0.69 | 0.69 | 0.77 | 0.76 | 0.74 | 0.74 |
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Lim, W.L.; Sourina, O.; Wang, L.P. STEW: Simultaneous Task EEG Workload Data Set. IEEE Transactions on Neural Systems and Rehabilitation Engineering 2018, 26, 2106–2114. [Google Scholar] [CrossRef]
- Lim, W.L.; Sourina, O.; Wang, L. STEW: Simultaneous Task EEG Workload Dataset, 2018. [CrossRef]
- Brookshire, G.; Kasper, J.; Blauch, N.M.; Wu, Y.C.; Glatt, R.; Merrill, D.A.; Gerrol, S.; Yoder, K.J.; Quirk, C.; Lucero, C. Data leakage in deep learning studies of translational EEG. Frontiers in Neuroscience 2024, 18, 1373515. [Google Scholar] [CrossRef] [PubMed]
- Lee, H.T.; Cheon, H.R.; Lee, S.H.; Shim, M.; Hwang, H.J. Risk of data leakage in estimating the diagnostic performance of a deep-learning-based CAD system for psychiatric disorders. Scientific Reports 2023, 13. [Google Scholar] [CrossRef]
- Del Pup, F.; Zanola, A.; Tshimanga, L.F.; Bertoldo, A.; Finos, L.; Atzori, M. The role of data partitioning on the performance of EEG-based deep learning models in supervised cross-subject analysis: A preliminary study. Computer Methods and Programs in Biomedicine 2025, 246, 107808. [Google Scholar] [CrossRef]
- Falih, M.H.; Alshamasin, M.S.; Abukhurma, R.; Khdour, T. Impact of Sliding Window Overlap Ratio on EEG-Based ASD Diagnosis Using Machine Learning Techniques. Applied Sciences 2024, 14, 11702. [Google Scholar] [CrossRef]
- Alghanim, M.; Abd El-Latif, A.A.; et al. A Hybrid Deep Neural Network Approach to Recognize Brain Fatigue. Computational Intelligence and Neuroscience 2024. [Google Scholar] [CrossRef]
- Christou, V.; Miltiadous, A.; Tsoulos, I.; Karvounis, E.; Tzimourta, K.D.; Tsipouras, M.G.; Anastasopoulos, N.; Tzallas, A.T.; Giannakeas, N. Evaluating the Window Size’s Role in Automatic EEG Epilepsy Detection. Sensors 2022, 22, 9233. [Google Scholar] [CrossRef]
- Yuvaraj, R.; Samyuktha, S.; Fogarty, J.; Huang, J.S.; Tan, S.; Wong, T.K. Optimal EEG Time Window Length for Boredom Classification using Combined Non-linear Features. In Proceedings of the Proceedings of EUSIPCO 2024, Lyon, France, 2024; pp. 1756–1761. ISBN 978-9-4645-9361-7.
- Safari, M.; Shalbaf, R.; Bagherzadeh, S.; Shalbaf, A. Classification of mental workload using brain connectivity and machine learning on electroencephalogram data. Scientific Reports 2024, 14, 9153. [Google Scholar] [CrossRef]
- Sun, C.; Mou, C. Survey on the research direction of EEG-based signal processing. Frontiers in Neuroscience 2023, 17, 1203059. [Google Scholar] [CrossRef]
- Hamzah, H.A.; Atia, A.; Serag, A.; Elmisery, A.M.; Ware, A.; Khan, S.; Ma, J. EEG-based emotion recognition systems: Comprehensive review of feature extraction methods. Heliyon 2024, 10, e31686. [Google Scholar] [CrossRef] [PubMed]
- Demirezen, G.; Temizel, T.T.; Brouwer, A.M. Reproducible machine learning research in mental workload classification using EEG. Frontiers in Neuroergonomics 2024, 5, 1346794. [Google Scholar] [CrossRef]
- Imran, M.A.A.; Nasirzadeh, F.; Karmakar, C. Designing a practical fatigue detection system: A review on recent developments and challenges. Journal of Safety Research 2024, 90, 100–114. [Google Scholar] [CrossRef]
- Afzal, M.A.; Gu, Z.; Bukhari, S.U.; Afzal, B. Brainwaves in the Cloud: Cognitive Workload Monitoring Using Deep Gated Neural Network and Industrial Internet of Things. Applied Sciences 2024, 14, 5830. [Google Scholar] [CrossRef]
- Vafaei, E.; Lee, J. Transformers in EEG Analysis: A Review of Architectures and Applications in Motor Imagery, Seizure, and Emotion Classification. Sensors 2025, 25, 1293. [Google Scholar] [CrossRef]
- Pfeffer, M.A.; Ling, S.S.H.; Wong, J.K.W. Exploring the frontier: Transformer-based models in EEG signal analysis for brain–computer interfaces. Computers in Biology and Medicine 2024, 178, 108705. [Google Scholar] [CrossRef]
- Zeynali, M.; Seyedarabi, H.; Afrouzian, R. Classification of EEG signals using Transformer-based deep learning and ensemble models. Biomedical Signal Processing and Control 2023, 86, 105130. [Google Scholar] [CrossRef]
- Yao, X.; Li, T.; Ding, P.; Wang, F.; Zhao, L.; Gong, A.; Nan, W.; Fu, Y. Emotion Classification Based on Transformer and CNN for EEG Spatial–Temporal Feature Learning. Brain Sciences 2024, 14, 268. [Google Scholar] [CrossRef]
- Si, X.; Huang, D.; Sun, Y.; Ming, D. Temporal Aware Mixed Attention-based Convolution and Transformer Network (MACTN) for EEG Emotion Recognition. Computers in Biology and Medicine 2024, 171, 108091. [Google Scholar] [CrossRef]
- Cheng, Z.; Du, W.; Li, Y.; Zhang, Z.; Zheng, W. EEG-based emotion recognition using multi-scale dynamic 1D CNN and gated Transformer. Scientific Reports 2024, 14, 18011. [Google Scholar] [CrossRef]
- Xu, Y.; Sha, Y.; Chen, F.; Chen, X.; Wu, X.; Xu, P. AMDET: Attention-Based Multiple Dimensions EEG Transformer. IEEE Transactions on Affective Computing 2024, 15, 2293–2307. [Google Scholar] [CrossRef]
- Liang, S.; Li, L.; Zu, W.; Feng, W.; Hang, W. Adaptive deep feature representation learning for cross-subject EEG decoding. BMC Bioinformatics 2024, 25, 393. [Google Scholar] [CrossRef] [PubMed]
- Joshi, A.; Kale, S.; Chandel, S.; Pal, D.K. Likert Scale: Explored and Explained. British Journal of Applied Science & Technology 2015, 7, 396–403. [Google Scholar] [CrossRef]
- de Cheveigné, A.; Nelken, I. Filters: When, Why, and How (Not) to Use Them. Neuron 2019, 102, 280–293. [Google Scholar] [CrossRef] [PubMed]
- Singh, A.K.; Krishnan, S. Trends in EEG signal feature extraction applications. Frontiers in Artificial Intelligence 2023, 5, 1072801. [Google Scholar] [CrossRef]
- Ranjan, R.; Chandra Sahana, B.; Kumar Bhandari, A. Ocular artifact elimination from electroencephalography signals: A systematic review. Biocybernetics and Biomedical Engineering 2021, 41, 960–996. [Google Scholar] [CrossRef]
- Frølich, L.; Dowding, I. Removal of muscular artifacts in EEG signals: a comparison of linear decomposition methods. Brain informatics 2018, 5, 13–22. [Google Scholar] [CrossRef]
- Kang, T.; Thielen, J.; Vidaurre, C.; Lemm, S. ICA-based EEG artifact removal does not improve deep decoding performance. Journal of Neural Engineering 2024, 21, 056015. [Google Scholar] [CrossRef]
- Mutanen, T.P.; Mäkinen, J.; Ilmoniemi, R.; Rocchi, L.; Nieminen, J.O. A simulation study: comparing independent component analysis and signal-space projection–source-informed reconstruction for rejecting muscle artifacts evoked by TMS. Frontiers in Human Neuroscience 2024, 18, 1324958. [Google Scholar] [CrossRef]
- Guo, T.; Zhang, T.; Lim, E.; López-Benítez, M.; Ma, F.; Yu, L. A Review of Wavelet Analysis and Its Applications: Challenges and Opportunities. IEEE Access 2022, 10, 58869–58903. [Google Scholar] [CrossRef]
- Acharya, S.; Patel, N.; Subramanian, R. A systematic review of EEG-based automated mental stress quantification. Applied Soft Computing 2025, 159, 111573. [Google Scholar] [CrossRef]
- Nayak, A.B.; Shah, A.; Maheshwari, S.; Anand, V.; Chakraborty, S.; Kumar, T.S. An empirical wavelet transform-based approach for motion artifact removal in electroencephalogram signals. Decision Analytics Journal 2024, 10, 100420. [Google Scholar] [CrossRef]
- Mehmood, I.; Li, H.; Umer, W.; Arsalan, A.; Anwer, S.; Mirza, M.A.; Ma, J.; Antwi-Afari, M.F. Multimodal integration for data-driven classification of mental fatigue during construction equipment operations: Incorporating electroencephalography, electrodermal activity, and video signals. Developments in the Built Environment 2023, 15, 100198. [Google Scholar] [CrossRef]
- Campos, M.S.R.; McCracken, H.S.; Uribe-Quevedo, A.; Grant, B.L.; Yielder, P.C.; Murphy, B.A. A Machine Learning Approach to Classifying EEG Data Collected with or without Haptic Feedback during a Simulated Drilling Task. Brain Sciences 2024, 14, 894. [Google Scholar] [CrossRef]
- Guo, H.; Chen, S.; Zhou, Y.; Xu, T.; Zhang, Y.; Ding, H. A hybrid critical channels and optimal feature subset selection framework for EEG fatigue recognition. Scientific Reports 2025, 15, 2139. [Google Scholar] [CrossRef]
- Avola, D.; Cascio, M.; Cinque, L.; Fagioli, A.; Foresti, G.L.; Marini, M.R.; Pannone, D. Analyzing EEG data with machine and deep learning: A benchmark. In Proceedings of the International conference on image analysis and processing. Springer, 2022, pp. 335–345. [CrossRef]
- Vafaei, E.; Hosseini, M. Transformers in EEG Analysis: A Review of Architectures and Applications in Motor Imagery, Seizure, and Emotion Classification. Sensors 2025, 25. [Google Scholar] [CrossRef]
- Siddhad, G.; Gupta, A.; Dogra, D.P.; Roy, P.P. Efficacy of Transformer Networks for Classification of Raw EEG Data. Biomedical Signal Processing and Control 2024, 85, 105488. [Google Scholar]
















Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).