## 2 Feature Extraction Module of Attention-Based Neural Network
### Time-Domain Filter with Convolution Kernel  
The FIR filter can retain the target signal and suppress the interference. It performs weighting processing on the continuous input signal, then obtains the filtered signal by accumulation. An \(N\)th-order FIR filter multiplies \(N\) times and accumulates \(N\)-1 times to complete one filtering operation. This process is expressed as follows:  
\[y(n)=\sum_{k=0}^{N-1}h(k)x(n-k), \tag{1}\]  
Figure 1: A brief description of the method in this paper: firstly, TFCK is used to filter the raw signal; secondly, a set of convolution kernels are adopted to extract the time-frequency feature from the filtered signal; finally, an attention-based network is conducted to features. where \(y(n)\) and \(x(n-k)\) represent the output and input of the filter, \(h(k)\) denotes the filtering coefficient, and \(N\) denotes the order of the filter. As for one-dimensional convolution operations with convolution kernels of odd length, it can be expressed as:  
\[y(n)=f\left(\sum_{k=0}^{N-1}w(k)x(sn+\frac{N-1}{2}-k)+\beta\right), \tag{2}\]  
where \(y(n)\) and \(x(sn+(N-1)/2-k)\) denote the output and input of the 1D-CK, \(w(k)\) denotes the weight of the 1D-CK, \(N\) denotes the kernel size of the 1D-CK, \(s\) denotes the stride of the convolutional layer, \(\beta\) denotes the bias, and \(f(\cdot)\) denotes the activation function. Therefore, an FIR filter can be designed based on a single 1D-CK that the bias and activation function of it are removed. When the stride and kernel size of convolution are set to \(1\) and \(N\), 1D-CK can be treated as a \(N\)th-order FIR filter with a delay of \((N-1)/2\). For the classification task, the FIR filter conducted by 1D-CK can be regarded as an adaptive filter or a fixed-parameter filter, which can be optimized parameters by gradient descent adaptively or filtered the raw signal according to fixed optimal parameters, named TFCK. TFCK is shown in Figure 2.  
The parameter design method of TFCK is the same as that of the traditional FIR filter. For a specific underwater acoustic target recognition task, TFCK can learn the filter's frequency response by gradient descent. In other words, it can automatically search for the frequency range suitable for the current classification task from the data. The adjustment strategy of TFCK includes two stages: the pre-trained stage and the training stage. In the pre-trained stage, all parameters of 1D-CK are adaptively learned according to a specific classification task. By observing the feedback of the neural network, we can analyze the inner workings and behavior of the models, strengthen the extraction of high-value information and suppress the perception of noise by the neural network. In the training stage, we can adjust and fix the parameters of 1D-CK according to the feedback of the network in the pre-trained stage, optimize the ability of the neural network to suppress low-value information and make the subsequent network easier to learn the generalized embedding features. Two stages are shown in Figure 3.  
Figure 2: The schematic diagram of TFCK. Figure 4 shows the frequency response of TFCK in the classification task of the ShipsEar [36] dataset. It can be seen that in the classification task of ShipsEar, TFCK is very sensitive to low-frequency information at the initial stage of training. The training process gradually amplifies the importance of low-frequency information, and the neural network finds several peaks with similar intervals. At the last stage of the training process, the perception of the neural network is finally stabilized within a range, and the redundant information for the current network architecture and the classification task is fed back. The high-frequency information of ship radiated noise is seriously lost through the underwater acoustic channel, and the low-frequency information can spread further in the underwater environment. Usually, the identifiable information from ship radiated noise received by the hydrophone is concentrated in the low-frequency of the raw signal.