## 2 Methodology
### Problem Analysis  
In cross-modal image-text retrieval tasks of RS images, a basic assumption can be made: the semantic information contained in a single RS image is typically richer than the matched texts (See Figure 1). In other words, a single text typically describes only one side of an RS image. Then, for a specific query by the user, typically only several areas of an image are related to it. The global average pooling strategy adopted at the endpoint of traditional CNNs is exactly such that all image areas (including the unrelated ones) fit in the ultimate image representation at the same rate of contribution; the inability to screen unrelated areas or enhance related ones at the very source inevitably reduces the similarity between the texts for query and the target images, thereby affecting the model precision. Briefly, this can be reasoned mathematically:  
Denote \(x_{img}\) for an arbitrary image consisting of \(L\) areas, and denote \(x_{i},i\in[1,L]\), for these image areas. Through CNN treatment, the vectors of image features and of area features are \(x_{img}=\{a_{j}|j=1,\dots,n,a_{j}\in\mathbb{R}\,\}\) and \(x_{i}=\{b_{ij}|j=1,\dots,n,b_{ij}\in\mathbb{R}\,\}\), \(i\in[1,L]\)  
Figure 2: Overall network structure diagram of CABIR. This network consists of three modules, which are: (**A**) the text feature extraction module composed of BERT + Bi-GRU, which is used to extract advanced semantic features of texts; (**B**) the image feature extraction module composed of ResNet152, which is used to acquire regional-level advanced semantic features of images; and (**C**) the CAL module, which is used to filter redundant features of images and solve the similarity matrix between the image set and the text set. Finally, based on this matrix, the model will solve and return the gradient information using the triplet loss to constrain network training.  
respectively. In a CNN where the global average pooling strategy is adopted, the elements in \(x_{img}\) and those in \(x_{i}\) are related by  
\[a_{j}=\frac{1}{L}{\sum{b_{ij}i\in[1,L]j\in[1,n]}} \tag{1}\]  
The vector of features extracted from the text via the text encoder is \(y_{text}=\{c_{j}|j=1,\dots,n,c_{j}\in\mathbb{R}\}\). At this point, by finding the cosine distance between the whole image and the text and that between each image area and the text, one can find the relations:  
\[\begin{array}{rcl}sim(x_{img},y_{text})&=&\frac{x_{img}\cdot y_{text}^{T}}{ \|x_{img}\|\times\|y_{text}^{T}\|}\\ &=&\frac{\sum\limits_{j=1}^{n}{a_{j}c_{j}}}{\sqrt{\sum\limits_{j=1}^{n}{a_{j}^{ 2}}}/\sum\limits_{j=1}^{n}{c_{j}^{2}}}\\ &=&\frac{\sum\limits_{i=1}^{L}{\sum\limits_{j=1}^{n}{b_{ij}c_{j}}}}{\sqrt{ \sum\limits_{j=1}^{L}{(\sum\limits_{i=1}^{n}{b_{ij})^{2}}}/\sum\limits_{j=1}^{ L}{c_{j}^{2}}}}\\ \end{array} \tag{2}\]  
\[sim(x_{i},y_{text})=\frac{\sum\limits_{j=1}^{n}{b_{ij}c_{j}}}{\sqrt{\sum \limits_{j=1}^{n}{b_{ij}}^{2}}/\sqrt{\sum\limits_{j=1}^{n}{c_{j}^{2}}}} \tag{3}\]  
From Formula (3), if the text is negatively correlated to image areas, then we must have  
\[\sum\limits_{j=1}^{n}{b_{ij}c_{j}}<0 \tag{4}\]  
Formula (2) represents the contribution to the image-text cosine distance from each image area \(x_{i}\). Combining Formulas (2) and (3), if some image area is negatively correlated to the text, then the contribution from that area is also negative. On the contrary, if the image areas negatively correlated to the query texts can be screened when the final representation of image features is calculated and greater weights can be assigned to strongly correlated image areas, then it must be possible to raise the similarity between positive examples and query texts, thus solving the problem of multi-scene semantic image retrieval.