# Combining Multi-Scale Fusion and Attentional Mechanisms for Assessing Writing Accuracy
## 2 Multi-Scale-SE Recognition Methods
### The Bottleneck Layer Structure of the Fusion Attention Mechanism
The Squeeze-and-Excitation [4] (SE) module is a structure that significantly enhances the feature representation of a neural network, aiming to improve the model's ability to capture key features and thus improve recognition accuracy. The SE module enables the network to focus on important information while suppressing irrelevant or noisy information by dynamically adjusting the weights of channel features. This is particularly helpful for handwritten Chinese character recognition, as the complex strokes and structures of Chinese characters make recognition challenging. With the introduction of the SE module, the model is able to focus on discriminative features more effectively, which significantly improves the robustness. The structure of the SE module is shown in Figure 2.  
The SE module consists of two main phases: Squeeze and Excitation. In the Squeeze phase, the SE module aggregates the global spatial information of each channel of the input feature map through global average pooling. Let the input feature map be \(U\), where H, W, and C denote the height, width, and number of channels of the feature map, respectively. Figure 2: SE bottleneck layer structure. The global average pooling aggregates the spatial information of each channel into a scalar, generating a C-dimensional channel description vector, computed as:  
\[z_{c}=\frac{1}{H\times W}\sum_{i=1}^{H}\sum_{j=1}^{W}U_{i,j,c}\text{ for }c=1,2,\ldots,C \tag{1}\]  
where \(z_{c}\) denotes the global average pooling result for the c channel. In the excitation phase, the SE module selectively enhances or suppresses channels by generating a weight value for each channel through an adaptive weight generation mechanism. Specifically, two Fully Connected (FC) layers and a nonlinear activation function (usually ReLU and Sigmoid) are used to construct the dependencies between channels. First, the channel description vector z is mapped to a dimensionally reduced intermediate representation space through the first Fully Connected layer, where r is a scaling factor to reduce the number of parameters, computed as follows:  
\[u=\sigma(W_{2}\delta(W_{1}z)) \tag{2}\]  
where \(\delta\) denotes the ReLU activation function, \(\sigma\) denotes the Sigmoid activation function, and \(W_{1}\) and \(W_{2}\) are the weighting matrices of the two fully connected layers. In the final feature recalibration stage, the SE module multiplies each channel in the original feature map with the corresponding weight to achieve adaptive weighting on the channels. The output feature map is computed as follows:  
\[X_{i,j,c}=s_{c}\text{-}U_{i,j,c}\text{, for }c=1,2,\ldots,C \tag{3}\]  
The SE bottleneck layer module shows remarkable effectiveness in the handwritten Chinese character recognition task, thanks to its excellent ability to cope with the complexity of Chinese character strokes and structures. The challenge of handwritten Chinese character recognition lies in the need to accurately capture highly discriminative features, and the SE bottleneck layer significantly improves the robustness and accuracy of the model by enabling the network to focus more on key feature regions through adaptive weight adjustment. In the specific implementation, in terms of specific implementation, the adaptive weight generation mechanism of the SE bottleneck layer includes the following steps:  
Global Information Compression: First, global average pooling (GAP) is applied to compress each channel's feature map, aggregating spatial dimensions (H \(\times\) W) into a channel descriptor. This step extracts global contextual information while significantly reducing the number of parameters. Channel Weight Learning: Next, two fully connected (FC) layers are used to learn inter-channel dependencies. The first FC layer reduces the number of channels by a factor of 1/r (where r is the compression ratio, typically set to 16) to lower computational complexity, while the second FC layer restores the original number of channels. A ReLU activation function is applied between the two FC layers to introduce non-linearity.