# Local Diversity-Guided Weakly Supervised Fine-Grained Image Classification Method
## 3 Materials and Methods
### Local Diversity Guides Classification Networks
#### 3.1.1 Multi-Attention Semantic Fusion Module  
Discriminative local information determines the feature discriminability and classification accuracy. However, existing methods mostly capture information from isolated salient points, resulting in weak feature separability and increased risk of misclassification. To address this issue, we propose a Multi-Attention Semantic Fusion Module (MASF), the specific structure of which is shown in Figure 3. This module consists mainly of channel interaction modeling and spatial interaction modeling. The innovation of this module lies in its ability to fully mine the semantic information of high-level features and the detailed information of low-level features through channel-space interaction modeling, thereby enhancing attention on potential informative points. Additionally, the cross-structure allows for effective complementary fusion of information mined from different levels, resulting in more discriminative features. Specifically, this module takes the features from the 3 rd and 4 th layers of the backbone as inputs. In the MASF, each feature undergoes channel interaction and spatial interaction separately, followed by corresponding feature fusion, and then is passed to the next stage. Figure 2: Local Diversity-Guided Classification Network (LDGNet) structure diagram. MASF: Multi-Attention Semantic Fusion Module. RSS: random selection strategy. BP: bilinear pooling. Given an image, the image features are first extracted through the designed ConvNext backbone. Then, feature maps from the third and fourth layers are extracted, and the MASF and RSS modules are applied to obtain reorganized feature maps, which are fused with the original features. Finally, the high- and low-level features are concatenated and sent to the classification head for outputting the specific category. The backbone network Layer 3, Layer 4 is used to generate multi-level attention maps \(A_{1}\in R^{H_{1}\times W_{1}\times C^{\prime}}\) and \(A_{2}\in R^{H_{2}\times W_{2}\times C^{\prime}}\) by convolution to represent specific parts of the target objects. Here, \(H\), \(W\), and \(C\) represent the height, width, and number of channels of the feature map, respectively. In the spatial interaction part, firstly, \(A_{1}\) and \(A_{2}\) are used as image pairs to reorganize information, and the dimensions are converted to \({A_{1}}^{\prime}\in R^{L_{1}\times C^{\prime}}\) and \({A_{2}}^{\prime}\in R^{C^{\prime}\times L_{2}}\), \(L_{1}=W_{1}\times H_{1}\), \(L_{2}=W_{2}\times H_{2}\). Then, according to Equation (1), the similarity of image pairs is evaluated, and the spatial interaction feature map \(M_{1}\) is obtained. Here, Softmax is used for probability transformation. This suggests that in the spatial similarity matrix \(W_{1}\) obtained by inner product operation, the matrix element \(W_{1(i,l)}\) represents the similarity between the \(i^{th}\) pixels of and the \(j^{th}\) pixels of \({A_{2}}^{\prime}\). Lower pixel similarity indicates stronger complementarity. Therefore, the \(-W_{1}\) normalization operation is used to express the interaction of feature pairs. Finally, by using Equations (2) and (3), the spatial interaction feature maps \(M_{1}\) are mapped to \({A_{1}}^{\prime}\) and \({A_{2}}^{\prime}\), and the feature maps \({A_{s12}}\in R^{H_{2}\times W_{2}\times C^{\prime}}\) and \({A_{s21}}\in R^{H_{1}\times W_{1}\times C^{\prime}}\), which reflect the spatial dependence, are established through the size transformation of intermediate variables \({A_{s12}}^{\prime}\) and \({A_{s21}}^{\prime}\) to learn more distinguishing features. In the channel interaction part, each channel in the attention map can be considered as the feature representation of a specific part. Based on this, the image pairs \(A_{1}\) and \({A_{2}}^{\prime}\) are constructed first, where \({A_{2}}_{d}\in R^{L_{1}\times C^{\prime}}\) is obtained by \(A_{2}\) through down sampling and size conversion.