# Applying Neural Networks with Time-Frequency Features for the Detection of Mental Fatigue
## 4 Discussion
In detail, the TFR analysis for each subject was completed in under 2 ms, while the prediction time of a single instance was approximately 4 ms, making the system suitable for real-time classifications and appropriate for EDGE-AI systems (where training and inference is performed with minimal computational power) [33]. On the contrary, applications of different DL architectures (as presented in Table 2) or input calculation processes leads to increased (compared to the proposed framework) computational costs. For instance, the computation of PCA for the input requires more than 10\(\times\) the time compared to TFR, exceeding 20 ms for each of the sample [26]. Based on the above, the presented approach \begin{table}
\begin{tabular}{c c c c} \hline \hline
**AI Model** & **Authors** & **Dataset (Training Strategy)** & **Classification Accuracy** \\ \hline UNET(CNN) + LSTM & [12] & 9 subjects with 1 channel, 4 s segments (Subject-specific) & 83\% \\ SVM & [32] & 8 subjects with 19 channels, 10 s segments (Combined-subject) & 89\% \\ Dual CNN & [11] & 22 subjects with 1 channel, 1 s segments (Combined-subject) & 93\% \\ PCANet + SVM & [26] & 6 subjects with 32 channels, 4 s segments (Subject-specific) & 96\% \\
**This study (TF + CNN)** & **-** & 22 subjects with 64 channels, 3 s segments (Combined-subject) & **97\%** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Mental fatigue classification methods comparison. could be considered ideal for real-time fatigue detection with possible extensions to brain computer interfaces (BCI). In addition to the performance of the proposed framework, the features that contributed most to the formation of AI model were inspected. In this regard, the calculated SHAP positive values highlight the TFR power in the 5-15 Hz bins as a rigorous indicator of mental fatigue development. In fact, previous similar studies have suggested that increased task demands in working memory paradigms can be reflected as theta (4-7 Hz) and alpha (8-12 Hz) neural oscillations [34; 35]. Specifically, alterations in theta power have been consistently related to different states of fatigue level, and especially in memory manipulation [14; 36]. In a similar way, visual attention and working memory aspects systematically report alpha activity alterations [37; 38]. Although the fatigue state was elicited as a result of sleep deprivation rather that the experimental procedure, the information maintenance and item retrieval requirements of the n-back task involves working memory capacity and high attentional demands [35]. This is also reported in beta band (13-30 Hz) activity [39; 40], although the very small overlap of our findings with the beta frequency range cannot provide a conclusive assumption. Regarding the SHAP negative values, the inhibitory elements indicated in the 3-7 Hz time-frequency map suggest theta wave memory load interactions, while implying task-related reactive control (as reactive control is less cognitive demanding than proactive control) [41; 42]. Despite the fact that the proposed framework displayed an overall high performance, interpretation of the methods applied should be treated with caution. The main concern is that the dataset under study incorporated a small number of individual observations (20 subjects), which is deemed a moderate sample for DL designs. Nevertheless, it is similar (or larger) than most relevant similar studies [43]. Another possible limitation of this work is the definition of the Fatigued state and the interpretation of it as the ground truth. However, since the data comes from on-call doctors and nursing staff, it is safe to infer that mental fatigue is present after the shift. Hence, it can be assumed that there is no subjectivity bias in the current research. Considering the results of this study, in the future we intent to expand the overall methodologies, both in terms of the experimental and methodological design.