## 3 Materials and Methods
### Deep Gated Neural Network Model  
The deep gated neural network (DGNN) is meticulously designed to achieve precise cognitive workload classification by effectively processing EEG data through a layered architecture. It begins with an input layer, followed by two bidirectional long short-term memory (Bi-LSTM) layers, each equipped with 64 and 32 units, respectively, ensuring comprehensive temporal understanding of the EEG data. Subsequently, the model integrates two gated recurrent unit (GRU) layers, each with 64 and 32 units, enhancing the network's capacity to capture both short and long-range dependencies within the data. The output \begin{table}
\begin{tabular}{c c} \hline \hline
**Band** & **Frequency Range** \\ \hline Delta & 0.5–4 Hz \\ Theta & 4–8 Hz \\ Alpha & 8–13 Hz \\ Beta & 13–30 Hz \\ Gamma & 30–80 Hz \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Captured frequency bands. Figure 6: (**a,b**) Subject 1 frequency power spectrum (low mode vs. high mode). layer employs a Softmax activation function to categorize predictions into three workload levels: low, average, and high. Figure 7 represents the architecture of the DGNN, detailing the sequence of layers and the number of neurons in each layer. The detailed formulation of the deep gated neural network (DGNN) is pivotal for accurately capturing and processing the complex temporal dependencies within EEG data, thereby enabling precise classification of cognitive workload levels. 1. First bi-directional LSTM layer: \[\overrightarrow{h_{t}}=LSTM(x_{t},\overrightarrow{h_{t-1}})\] (2) Here, \(x_{t}\) represents the input EEG data at time step t, and \(\overrightarrow{h_{t-1}}\) is the hidden state. The forward pass captures the temporal dependencies in the forward direction. \[\overleftarrow{h_{t}}=LSTM(x_{t},\overleftarrow{h_{t+1}})\] (3)  
In the backward pass, \(\overleftarrow{h_{t+1}}\) is the hidden state from the next time step. This captures the temporal dependencies in the reverse direction. \[h_{t}= \begin{bmatrix}\overrightarrow{h_{t}},\overleftarrow{h_{t}}\end{bmatrix}  \tag{4}\]  
The hidden states from both the forward and backward passes are concatenated to form the final hidden state, \(h_{t}\) for the first Bi-LSTM layer. This provides a comprehensive representation of EEG data by considering information from both directions. 2. Second bi-directional LSTM layer \[\overrightarrow{h_{t}}^{(2)}=LSTM(\overrightarrow{h_{t}},\overrightarrow{h_ {t-1}}^{(2)})\] (5) Here, \(\overrightarrow{h_{t}}\) is the output from the first Bi-LSTM layer at time step \(t\), and \(\overrightarrow{h_{t-1}}^{(2)}\) is the hidden state from the previous time step in the second Bi-LSTM layer's forward pass. \[\overleftarrow{h_{t}}^{(2)}=LSTM(\overleftarrow{h_{t}},\overleftarrow{h_ {t+1}}^{(2)})\] (6)  
Figure 7: Deep gated neural network architecture. Similarly, \(\overset{\leftarrow}{h_{t}}\) is the output from the first Bi-LSTM layer, and \(\overset{\leftarrow}{h_{t+1}}^{(2)}\) is the hidden state from the next time step in the second Bi-LSTM layer's backward pass. \[{h_{t}}^{(2)}= \begin{bmatrix}\overset{\rightarrow}{h_{t}}^{(2)},\overset{ \leftarrow}{h_{t}}^{(2)}\\ \end{bmatrix}  \tag{7}\]  
The final hidden state \({h_{t}}^{(2)}\) for the second Bi-LSTM layer is obtained by concatenating the forward and backward hidden states. This ensures that the network has a robust understanding of the temporal patterns in the EEG data from both directions across two layers. 3. First GRU layer:  
\[{h_{t}^{(GRU1)}}={GRU}({h_{t}^{(2)}},{h_{t-1}^{(GRU1)}}) \tag{8}\]  
Here, \({h_{t}^{(2)}}\) is the output from the second Bi-LSTM layer at time step \(t\), and \({h_{t-1}^{(GRU1)}}\) is the hidden state from the previous time step in first GRU layer. The GRU layer captures dependencies in the data while being computationally efficient and addressing the vanishing gradient problem. 4.