## 3 Methods
### Efficient Channel Attention Temporal Convolutional Network
#### 3.1.1 Efficient Channel Attention Convolution Module  
The Efficient Channel Attention Convolution (ECA-conv) block consists of temporal convolution, channel convolution, local spatiotemporal convolution, two average pooling layers, and efficient spatial attention and efficient spectral attention, which act on the spatial and spectral dimensions, respectively. As shown in Figure 2, the ECA-Conv block implements multi-level attention at the feature level, highlighting the important features in the spatial and spectral dimensions of the same input data. The temporal convolution (TC) layer is used to receive raw MI-EEG signals with T time points and C channels, learning spectral features from different frequency bands [50] and extracting low-level temporal features. It uses an F\({}_{1}\) convolutional kernel of size (1, F\({}_{8}\)/4), where F\({}_{8}\) is the sampling rate of the EEG signal. After the time convolution layer in the ADC block, efficient spatial attention and efficient spectral attention are applied, as shown in Figures 1 and 2. Spectral attention is performed along the F\({}_{1}\) dimension to highlight valuable spectral features in the MI-EEG data. Simultaneously, attention is applied to the EEG channels (C) to highlight valuable channels in the MI-EEG data. For efficient spatial attention and efficient spectral attention, we use the ECA defined in [53]. ECA is a local cross-channel interaction strategy without dimensionality reduction, efficiently implemented through 1D convolution, as shown in Figure 3.  
Figure 1: The left column shows the overall hierarchical structure of the proposed Efficient Channel Attention Temporal Convolutional Network (ECA-ATCNet) model. The middle column shows the Efficient Channel Attention Convolution (ECA-Conv) module and the Attention Temporal Convolution (ATC) module. The right column shows the attention computation of Efficient Channel Attention (ECA) in spatial and spectral dimensions, as well as a detailed visualization of Multi-Head Attention (MHA). Figure 2: Efficient Channel Attention Convolution (ECA-Conv) Module. The channel convolution layer receives normalized low-level temporal features and uses deep convolution to learn spatial features on each feature map. The deep convolution has a \(\mathrm{F_{2}}\) convolution kernel of size (C, 1), where C is the number of EEG channels. Each deep convolution kernel is applied to each input feature map and outputs D feature maps. This means that for \(\mathrm{F_{1}}\) input feature maps, the layer outputs \(\mathrm{F_{2}}=\mathrm{F_{1}}\times\mathrm{D}\) feature maps. We empirically set \(\mathrm{D}=2\). This method allows the channel convolution layer to capture valuable information about inter-channel dependencies in EEG signals. After the convolution layer, there is a batch normalization layer and an Exponential Linear Unit (ELU) activation function. Then, an average pooling layer with a pool size of \(1\times\mathrm{P_{1}}\) is used to compress the features, reducing the spatial dimensions of the features obtained from the previous layer while retaining important information. The local spatiotemporal convolution layer integrates the temporal and spatial feature layers, outputting a series of high-level spatiotemporal representations. It uses a filter of size (1, 16) for \(\mathrm{F_{2}}\). After the local convolution layer, the output high-level spatiotemporal feature sequence undergoes normalization, ELU activation, and average pooling. The pool size of the average pooling layer is \(1\times\mathrm{P_{2}}\). The output of the ECA-Conv block is a time series \(\mathcal{Z}_{\mathrm{i}}\in\mathbb{R}^{\mathrm{T_{c}}\times\mathrm{F_{2}}}\), consisting of \(\mathrm{T_{c}}\) time vectors, each with a dimension of \(\mathrm{F_{2}}=\mathrm{F_{1}}\times\mathrm{D}\). We empirically set \(\mathrm{F_{2}}\) to 32.