# Pyramid Feature Attention Network for Speech Resampling Detection
## 2 Proposed Method
### Architecture
#### 2.3.2 Feature Fusion  
1. _Concat:_ Unifies the scale of the feature map through the maximum pooling operation. Utilizes the \(1\times 1\) convolution kernel to adjust the 4-layer features to the same number of channels, and feature fusion is completed by using the Concat function.  
2. _SENet_: Adjusts the channel attention of the fused feature map through the SE attention module to enhance the expression ability of the feature map [40]. SENet, shown in Figure 4, is a plug-and-play channel attention module that is often applied in visual models. It can enhance the channel features of the input feature map, and the output of the SE module does not change the size of the input feature map. SENet mainly includes two operations: squeeze and excitation. * \(S(F_{sq}(\cdot))\): Squeeze refers to compressing the spatial information in the input feature map. The input feature map \(\mathbf{U}\)'s dimensions are \(H\times W\times C\). In the spatial dimension, global average pooling is realized to obtain a \(1\times 1\times C\) feature map. The following equation is used: \[z_{c}=F_{sq}(u_{c})=\frac{1}{H\times W}\sum_{i=1}^{H}\sum_{j=1}^{W}u_{c}(i,j)\] (3) * \(E(F_{ex})\): Excitation combines the learned channel attention information with the input feature map \(\mathbf{Z}\). The vector obtained in the previous step is processed through two fully connected layers \(W_{1}\) and \(W_{2}\), and the channel weight value \(\mathbf{s}\) is obtained. The formula is as follows: \[s=F_{ex}(z,W)=\sigma(g(z,W))=\sigma(W_{2}\delta(W_{1}z))\] (4) The activation function of the first fully connected layer is ReLU, and the activation function of the second fully connected layer is sigmoid. * \(Scale(F_{scale})\): The generated weight vector \(\mathbf{s}\) is weight-assigned to the feature map \(\mathbf{U}\). To obtain the feature map \(\tilde{\mathbf{X}}\) with channel attention, the formula is as follows: \[\tilde{\mathbf{X}_{C}}=F_{scale}(u_{c},s_{c})=s_{c}u_{c}\] (5) The size of \(\tilde{\mathbf{X}}\) is the same as the feature map \(\mathbf{U}\), which realizes the weighting of the feature map \(\mathbf{U}\). The SE attention module can enhance the resampling time-frequency characteristics expressed in the feature map by focusing on channels that are effective for the resampling classification task and suppressing channels that are ineffective. * _Lateral connection_: Used in the top-down up-sampling process of the network, accompanied by the operation of lateral connection. The results of up-sampling are fused with the bottom-up-generated feature maps of the same scale, that is, added pixel by pixel [40]. In the experiment, bilinear interpolation is selected for up-sampling. \(\tilde{\mathbf{X}}\) is obtained by the SE attention module, which reduces the number of channels to 256 by \(1\times 1\) convolution, obtaining \(\tilde{\mathbf{X}}^{\prime}\) through (6): \[\tilde{\mathbf{X}}^{\prime}(i^{\prime},j^{\prime})=\sum_{i=0}^{1}\sum_{j=0}^{1} \omega_{ij}\tilde{\mathbf{X}}(i+i^{\prime},j+j^{\prime})\] (6) where \(\omega_{ij}\) represents the weight coefficients of the four pixels \(\tilde{X}(i^{\prime},j^{\prime})\), \(\tilde{X}(i^{\prime}+1,j^{\prime})\), \(\tilde{X}(i^{\prime},j^{\prime}+1)\), \(\tilde{X}(i^{\prime}+1,j^{\prime}+1)\) closest to the target pixel, which can be obtained from the distance between the target pixel and these four pixels. We will process the  
Figure 4: SENet block.  
feature maps extracted from the Bottleneck3 through \(1\times 1\) convolution, reducing the number of channels to 256, and obtain \(I^{\prime}\). After Equation (7), the final feature map \(F\) is calculated.  
\[F=\hat{X}^{\prime}+I^{\prime} \tag{7}\]  
The main purpose of this is to exploit detailed information such as edges and textures of shallow resampled speech, which fuses semantic information of deep feature maps to achieve cross-level information transfer.