## 3 Materials and Methods
### Deep Learning Frameworks for Feature Extraction of MI Responses
* _EEGNet Framework._ In this architecture, feature extraction is carried out through a sequence of convolutional blocks \(\psi_{3}\circ\psi_{2}\circ\psi_{1}\), structured as [38]:\[\text{Temporal Conv: }\psi_{1}:\quad Z_{f,c,t}^{EEG}=\sum_{k=0}^{K_{t}^{EEG}-1}W_{f, k,c}^{EEG}X_{c,t+k}+b_{f}^{EEG},\quad\quad\quad\quad\quad Z^{EEG}\in\mathbb{R}^{F_{1} \times C\times(T-K_{t}^{EEG}+1)}\] \[\text{Depthwise Conv: }\psi_{2}:\quad D_{i,s,t}=\sum_{k=0}^{K_{t}-1}U_{l,k,s}Z_{i,s,t+k}^{EEG}+b_{i},\quad\quad\quad\quad\quad\quad\quad\quad D\in \mathbb{R}^{F_{1}\times F_{s}\times(T-K_{t}^{EEG}-K_{t}+2)}\] \[\text{Separable Conv: }\psi_{3}:\quad S_{j,t}=\sum_{i=1}^{F_{1}} \sum_{s=1}^{F_{2}}Q_{j,i,s}D_{i,s,t}+b_{j},\quad\quad\quad\quad\quad\quad S \in\mathbb{R}^{F_{2}\times(T-K_{t}^{EEG}-K_{t}+2)}\] \[\text{where }F_{1}\text{ and }F_{2}\text{ denote the number of temporal and separable filters, respectively; }K_{t}^{EEG}\text{ and }K_{d}\text{ are the kernel sizes for the temporal and depthwise convolutions; and }F_{s}\text{ is the number of spatial filters. Each block is followed by batch normalization and non-linear activation.
* _TCNet (Temporal Convolutional Network) Framework._ TCNet extends the prior architectures by integrating temporal convolutional modules with residual connections [66; 67]. The model combines filter bank design with deep temporal processing through the sequential application of blocks \(\xi_{5}\circ\xi_{4}\circ\xi_{3}\circ\xi_{2}\circ\xi_{1}\), as follows: Initial Temporal Conv: \(\xi_{1}:\quad T_{f,c,t}=\sum_{k=0}^{K_{t}-1}G_{f,k,c}X_{c,t+k}+b_{f}^{T},\quad \quad\quad\quad\quad T\in\mathbb{R}^{F_{0}\times C\times(T-K_{i}+1)}\) Filter Bank Conv: \(\xi_{2}:\quad B_{f,c,t}=\sum_{k=0}^{K_{f}-1}H_{f,k,c}T_{f,c,t+k}+b_{f}^{B},\quad \quad\quad\quad B\in\mathbb{R}^{F_{0}\times C\times(T-K_{i}-K_{f}+2)}\) Spatial Conv: \(\xi_{3}:\quad C_{f,s,t}=\sum_{c=1}^{C}J_{f,s,c}B_{f,c,t}+b_{f,s}^{C},\quad \quad\quad\quad\quad\quad\quad C\in\mathbb{R}^{F_{0}\times F_{s}\times(T-K_{i }-K_{f}+2)}\) Residual Temporal Block: \(\xi_{4}:\quad R_{f,s,t}^{(l)}=C_{f,s,t}+\Gamma^{(l)}(C_{f,s,t}),\quad\quad\quad \quad\quad\quad\text{for }l=1,2,\dots,L\) Global Avg Pooling: \(\xi_{5}:\quad A_{f}=\frac{1}{T^{\prime}}\sum_{t=1}^{T^{\prime}}R_{f,s,t}^{(L )},\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad A\in\mathbb{R}^{F_{0} \times F_{s}}\) where \(K_{i}\) and \(K_{f}\) are the kernel sizes for the initial and filter bank convolutions, \(F_{0}\) is the number of feature maps, \(L\) is the number of residual blocks, \(T^{\prime}=T-K_{i}-K_{f}+2\), and \(\Gamma^{(l)}\) denotes a temporal convolutional block with dilated convolutions. The dilation factor increases with \(l\), enabling exponential growth in the receptive field while preserving temporal resolution.  
The final classification stage in all three DL frameworks is performed by a fully connected layer applied to the flattened output of the last feature extraction layer \(\widehat{P}\), with the classification computed as  
\[\hat{y}_{c}=\text{softmax}\Bigg{(}\sum_{i}\widehat{W}_{c,i}^{\text{fc}}\, \widehat{P}_{i}+\widehat{b}_{c}^{\text{fc}}\Bigg{)},\]  
where \(\hat{y}\in\mathbb{R}^{K}\) denotes the class probability distribution over \(K\) classes. In this expression, \(\widehat{P}\in\mathbb{R}^{d}\) is the \(d\)-dimensional feature vector obtained by applying global average pooling to the final convolutional feature maps. The matrix \(\widehat{W}^{\text{fc}}\in\mathbb{R}^{K\times d}\) contains the weights of the fully connected layer, and \(\widehat{b}^{\text{fc}}\in\mathbb{R}^{K}\) represents the corresponding bias vector.