# Local Diversity-Guided Weakly Supervised Fine-Grained Image Classification Method
## 3 Materials and Methods
### Local Diversity Guides Classification Networks
#### 3.1.2 Random Selection Strategy  
In the above approach, the attention maps \(A_{12}\) and \(A_{21}\) will gradually converge if we do not constrain them, i.e., \(A_{12}\) and \(A_{21}\) focus on the same salient regions of the target object easily. Thus, we ignore other sub-salient regions that also have discriminative power. Therefore, we envision forcing the attention graph to learn more relevance knowledge by suppressing the most significant parts during the training process, thereby promoting the network to focus on more comprehensive information. However, the most significant features may be completely ignored by the network if the suppression operation is applied throughout the training process, resulting in lower classification accuracy. Based on the above analysis, we propose a random selection strategy (RSS) with three candidate branches, namely \"most significant suppression\", \"feature enhancement\", and \"no operation\". The \"most significant suppression\" is employed to suppress the most discriminative part, the \"feature enhancement\" is employed to reward it, and \"no action\" does not take any action as the name suggests. The three candidate branches are executed randomly to strike a balance between punishment and reward, without neglecting the original features. This approach compels the attention map to focus on more effective local information in the most cost-effective way. It should be noted that this strategy is only applied in the training process in order to ensure the stability of the verification results during the inference phase. The specific structure of RSS is illustrated in Figure 4. Theoretically, the input of this policy can be any feature map \(F\). In this section, \(F\) specifically refers to the outputs \(A_{12}\) and \(A_{21}\) of the cross-layer attention interaction module described above. First, the feature map \(F\in R^{C^{\prime}\times W\times H}\) is sliced along the width dimension, and \(n\) feature slices \(F_{(k)}\in R^{C^{\prime}\times(W/n)\times H}\), \(k\in[1,n]\) are obtained. Then, each slice \(F_{(k)}\) randomly selects a candidate branch to complete the corresponding operation. \(n\) is determined by engineering experience, and for this paper, it is set to 7. The \"most significant suppression\" branch utilizes Equation (9) to perform a channel average pooling operation on the input feature map to obtain \(F_{p(k)}\in R^{(W/n)\times H}\). The value range of each \(F_{p(k)}\) pixel is the same as the input feature map, which represents the key feature expression obtained by the classification model. The \(F_{p(k)}\) can approximately reflect the spatial distribution of the most discernible parts because the random-selected global diversity classification network proposed in this paper is trained for the classification task. The higher the value of the element, the stronger the ability of discrimination. That is, for classification tasks, the strength of each pixel in \(F_{p(k)}\) represents its ability to discriminate. To eliminate the most discerning portion, the threshold rate \(\delta\) is set according to the pixel value of the maximum intensity in \(F_{p(k)}\) to generate the elimination mask \(P_{(k)\text{drop}}\), and the portion of the pixel that is greater than the threshold is set to 0; in contrast, some pixels that are less than the threshold value are set to 1, as illustrated in Equation (10). For the \"feature enhancement\" branch, the sigmoid activation function is utilized to generate the enhancement mask \(P_{(k)\text{important}}\) for \(F_{p(k)}\) as described in Equation (11). For the \"No operation branch\", nothing is done with the original slice \(F_{p(k)}\). The probabilities of the three candidate branches are represented by \(\alpha\), \(\beta\), and \(\gamma\), where \(\alpha+\beta+\gamma=1\). Each slice \(F_{(k)}\) randomly select one of the branches to operate to obtain \(S_{(k)}\), as illustrated in Equation (12).