## 3 Methodology
### Spatio-Temporal Module
#### 3.1.2 Convolutional Attention Mechanism Module (CBAM) [37]  
CBAM is a neural network model based on attention mechanisms, which can perform attention weighting on channel and spatial dimensions respectively to extract more distinctive features in the feature maps. As a lightweight module, it uses a small number of parameters and runs fast during training, making it highly efficient. Additionally, it can be easily integrated into most of the current deep learning frameworks to enhance the feature extraction capabilities of network models.  
In Figure 6, the overall architecture of CBAM is shown, with the feature map undergoing the channel attention module (CAM) and subsequently the spatial attention module (SAM) to acquire an improved feature map.  
We add CBAM after Conv1 and before Conv2 in ST-RANet (see Figure 4) to enhance the expressive power of the network. Take the first CBAM (Attention1) as an example, \(X^{(1)}\) is the input. CBAM derives a channel attention map \(M_{c}\in\mathbb{R}^{C\times 1\times 1}\) and a spatial attention map \(M_{\text{s}}\in\mathbb{R}^{1\times I\times I}\) in turn. This process can be expressed by the equation,  
\[\begin{array}{l}\text{Z}=M_{c}(X^{(1)})\otimes X^{(1)}\\ X^{(2)}=M_{\text{s}}(Z)\otimes\text{Z}\end{array} \tag{6}\]  
where the symbol \(\otimes\) represents element-wise multiplication, and \(Z\) is an intermediate product.  
The architecture of CAM is shown in Figure 7, the process of which involves obtaining the input feature map and subjecting it to global max pooling (MaxPool) as well as global average pooling (AvgPool) on its width and height dimensions. The resulting pooled feature maps can then be fed through a shared multi-layer perceptron (MLP) network. The MLP's outputs are combined by element-wise addition, and the resulting features are further processed with a sigmoid activation function to produce the final outcome map of CAM \(M_{c}\). This calculation process of CAM is mathematically represented by the following equation,  
\[\begin{array}{ll}M_{c}(X^{(1)})&=\sigma(MLP(\text{GAP}(X^{(1)}))+MLP(\text{ GMP}(X^{(1)})))\\ &=\sigma(W_{1}(W_{0}(Z^{c}_{avg}))+W_{1}(W_{0}(Z^{c}_{\text{max}})))\end{array} \tag{7}\]  
where \(\sigma\) means the sigmoid function, \(W_{0}\in\mathbb{R}^{C/r\times C}\) and \(W_{1}\in\mathbb{R}^{C\times C/r}\), in which \(r\) is the reduction ratio.  
Figure 6: The architecture of CBAM.  
Figure 7: Architecture of CAM.  
The SAM, depicted in Figure 8, starts by applying MaxPool and AvgPool operations on the input feature map along the channel axis. Subsequently, the resulting pooled feature maps are concatenated according to channels. The concatenated features are then subjected to a convolution operation which reduces the dimensionality of each spatial location to a single channel. Finally, the resulting features are passed through a sigmoid activation function to generate the outcome graph of SAM \(M_{\text{s}}\).  
\[\begin{array}{ll}M_{\text{s}}(Z)&=\sigma(f^{7\times 7}([AvgPool(Z);MaxPool(Z)]))\\ &=\sigma(f^{7\times 7}([Z_{avg}^{s};Z_{\text{max}}^{s}]))\end{array} \tag{8}\]  
where \(f^{7\times 7}\) denotes a convolution operation and its filter size is \(7\times 7\).