# Building a Speech Dataset and Recognition Model for the Minority Tu Language
## 3 Methods
### Models
#### 3.2.2 SA-Conv Module  
Inspired by the success of SimAM [14], we propose SA-conformer with a new module called the SA-Conv module. In this model, we added the SimAM module combined with the convolution module to the conformer to replace the original convolution module.  
Other attention mechanisms generate 1D or 2D weights and treat neurons in each channel or spatial location equally, which may limit their capability to learn more discriminative cues. SimAM refines features with full 3D weights by estimating the importance of individual neurons. In addition, SimAM is different from other attention mechanisms; it is based on the well-established spatial suppression theory, from the perspective of biological neurology, more in line with the original design inspiration of deep learning.  
In neuroscience, activating neurons rich in information inhibits surrounding neurons, known as spatial inhibition, and these neurons with spatial inhibition have higher importance. The minimum energy formula is shown in Equation (1):  
\[e_{t}^{*}=\frac{4(\hat{\sigma^{2}}+\lambda)}{(t-\hat{a})^{2}+2\hat{\sigma}^{2} +2\lambda} \tag{1}\]  
where \(\hat{\mu}=\frac{1}{M}\sum_{i=1}^{M}x_{i}\) and \(\hat{\sigma}^{2}=\frac{1}{M}\sum_{i=1}^{M}(x_{i}-\hat{\mu})^{2}\). Here, \(t\) and \(x_{i}\) are the target neuron and other neurons in a single channel of the input feature \(X\in R^{C\times H\times W}\). \(i\) is the index over the spatial dimension and \(M=H\times W\) is the number of neurons on that channel. \(\lambda\) is a parameter set by yourself when coding.  
The lower the energy, the more different the neuron is from the surrounding neurons and the higher the importance. Therefore, the importance of neurons can be obtained by \(\frac{1}{\hat{\sigma}^{2}}\). This is the principle of the attention mechanism of SimAm. The core idea of SimAM is based on the local self-similarity of images. In an image, neighboring pixels usually have strong similarity with each other, while the similarity between distant pixels is weak. SimAM exploits this property to generate attention weights by calculating the similarity between each pixel and its neighbors in the feature map.  
In speech recognition, we usually treat the input spectral features as images, and the recognition of speech signals is equivalent to the image classification problem in image recognition. Based on this idea, we combined the convolution module with SimAM to obtain the new SA-Conv module. The specific structure of the SA-Conv module is shown in Figure 6. After the input vector undergoes point-wise convolution and depth-wise separation convolution [15], the preliminary feature vector is obtained. The cosine similarity calculation is further performed on the obtained feature vector to obtain the final context signal feature vector weighted with the SimAM weight. Compared with the convolution module in the original conformer, the SA-Conv module can better represent a speech signal, extract the correlation between the frames before and after the speech signal, and improve the accuracy of the final predicted text.  
Figure 6: SA-Conv module.