## 4 Methods
### Improved Residual Block  
In this study, we observed that ResNet18 employs fixed convolution kernels and channels, which restricts the model's ability to learn the correlations and importance between different features, thus limiting the model's representation capacity. To address this issue, we introduced CBAM into the residual block to better learn the correlations between and importance of different feature channels and spatial positions. The incorporation of an attention mechanism can improve the model's adaptability to different signature styles and features, making the model more robust and with a stronger generalization ability, particularly in verifying multilingual signatures across different regions and ethnic groups. Moreover, the CBAM attention module has a lightweight structure, which can enhance the model's performance without increasing the number of network parameters. In our study, we utilized a combination of convolutional layers, batch normalization layers, and activation functions in each residual block to extract features and enhance the stability and convergence speed of the network. The convolutional layers can extract spatial features from the images, the batch normalization layers can accelerate the training process and improve the stability of the network, and the activation functions can introduce non-linear factors. To further strengthen the network's attention control over the input feature map, we introduce the CBAM module. This module has a lightweight structure that does not increase the network's complexity. Meanwhile, by adopting residual connections that directly add the input to the output, we achieve faster training and higher accuracy. The CBAM [26] is a hybrid attention mechanism that aids the neural network in better focusing on target regions containing important information in both channel and spatial dimensions, while suppressing irrelevant information, thereby enhancing model performance and generalization. Specifically, the CBAM module first generates the channel mask using the CA module to strengthen the focus on important channel features and then generates the spatial mask using the SA module to further attend to the regions containing important information in the image. CBAM is an efficient and lightweight attention module that can be seamlessly integrated into various convolutional neural network architectures and can be end-to-end trained with baseline models. The CBAM module is divided into two components, the CA module and the SA module, as illustrated in Figure 3. Initially, the feature map is fed into the CA module, which produces a corresponding attention map. The input feature map is then multiplied element-wise with the attention map and fed into the SA module, where the same element-wise multiplication is performed. Finally, the output feature map is obtained. The purpose of CA is to focus on which specific features are meaningful for a given task. The specific structure of the CA module is shown in Figure 4.  
Figure 3: Structure diagram of the improved residual block. The CA module of the CBAM is different from the SE module in that it uses average pooling and max pooling to obtain global receptive field information. Then, these two \(1\times 1\times\) c feature maps are fed into a shared MLP for feature extraction. Finally, the two feature maps are fused, and the result is converted to the range (0, 1) through a sigmoid function for feature recalibration and combined with the original feature map. The detailed operational steps of CBAM are as follows:  
\[\text{Attention}_{\text{c}}(\text{F})=\sigma\Big{(}\text{MLP}\Big{(}\text{G}_{ \text{AVG}(\text{F})}\Big{)}+\text{MLP}\Big{(}\text{G}_{\text{MAX}(\text{F})} \Big{)}\Big{)} \tag{1}\]  
In the expression, F represents the input 2D feature map, and G_AVG and G_MAX are used to obtain feature information under average pooling and max pooling, respectively. Then, these two feature maps are separately fed into a shared, fully connected layer for feature extraction and finally activated.