## 2 Materials and Methods
### Module One: Rapid Redundant Feature Generation (RRG)
#### 2.3.2 Bilateral Dual-Attention Mechanism Module (BDAM)  
To enhance the quality of redundant feature maps generated during the linear transformation process, a Bilateral Dual-Attention Mechanism (BDAM), which combines spatial and channel attention for feature enhancement, has been designed. In Figure 2, The spatial attention mechanism begins with a given local feature \(A\), with dimensions \(R^{C\times H\times W}\), being input into a convolution layer. This step generates two new feature maps \(B\) and \(C\), each maintaining the same dimensions as \(A(R^{C\times H\times W})\). Next, these feature maps are transformed into the form \(R^{C\times N}\), where \(N\) is the total number of pixels, that is \(N=H\times W\). Subsequently, a spatial attention map \(S\), with dimensions \(R^{N\times N}\), is computed by performing matrix multiplication of the transpose of \(C\) and \(B\), followed by the application of a softmax layer. The formula for this is as follows:  
\[s_{ji}=\frac{exp(Bi\cdot Cj)}{\sum_{i=1}^{N}exp(B_{i}\cdot C_{j})}. \tag{7}\]  
In the formula, \(s_{ji}\) measures the influence of the \(i\)-th position on the \(j\)-th position. In this way, we can assess the interactions between different positions within the feature map. The higher the similarity of the positional features, the stronger their associativity. The original feature \(A\) is then input again into a convolution layer to generate a new feature map \(D\), with dimensions \(R^{C\times H\times W}\). This map is subsequently reshaped into \(R^{C\times N}\). Next, we compute the matrix multiplication between \(D\) and the transpose of \(S\) and reshape the result back into the form of \(R^{C\times H\times W}\). In the final step, we multiply this result by a scaling parameter \(\alpha\) and add it elementwise to the original feature \(A\) to obtain the final output \(E\), which also has dimensions \(R^{C\times H\times W}\). This process can be represented by the following formula:  
\[E_{j}=\alpha\sum_{i=1}^{N}(s_{ji}D_{i})+A_{j} \tag{8}\]In the formula, \(\alpha\) is initially set to 0 and is gradually adjusted to provide different weights. From this formulation, we can see that the final feature \(E\) at each position is a weighted sum of all position features and the original features. This mechanism enables the model to understand the image from a global contextual perspective and selectively integrate these contextual pieces of information based on the spatial attention map. Secondly, in Figure 3, the channel attention mechanism, each channel map of high-level features can be viewed as a response to a specific category. The different semantic responses are interrelated. By leveraging the interdependencies between channel maps, we can emphasize mutually dependent feature maps, thereby improving the feature expression capability for specific semantics. Consequently, we have constructed a channel attention module to explicitly model the interdependencies between channels. Unlike the spatial attention module, we calculate the channel attention map \(X\in R^{\mathbb{C}\times\mathbb{C}}\) directly from the original features \(A\in R^{\mathbb{C}\times H\times W}\). Specifically, we reshape \(A\) into \(R^{\mathbb{C}\times N}\), then perform matrix multiplication between \(A\) and its transpose. Finally, we apply a softmax layer to obtain the channel attention map \(X\in R^{\mathbb{C}\times\mathbb{C}}\):  
\[x_{ji}=\frac{exp(A_{i}\cdot A_{j})}{\sum_{i=1}^{\mathbb{C}}exp(A_{i}\cdot A_{ j})}. \tag{9}\]  
In this context, \(x_{ji}\) measures the influence of the \(i\)-th channel on the \(j\)-th channel. Moreover, we perform matrix multiplication between the transpose of \(X\) and \(A\) and reshape the result into \(R^{\mathbb{C}\times H\times W}\). Then, we multiply by a scaling parameter \(\beta\) and perform an elementwise summation with A to obtain the final output \(E\in R^{\mathbb{C}\times H\times W}\):  
\[E_{j}=\beta\sum_{i=1}^{\mathbb{C}}(x_{ji}A_{i})+A_{j}. \tag{10}\]  
In this context, \(\beta\) is learned gradually, initially set to zero.