## 2 Method
### SFA Encoder  
In order to obtain rich and important feature information from remote sensing images, this paper combines the attention mechanism and the recursive gated convolution with efficient high-order interaction ability, and proposes the recursive gated convolution with attention block, which is the core module of SFA Encoder.  
The structure of the recursive gated convolution with attention block is shown in Figure 3, which consists of a window attention block and a recursive gated convolution block. In the window attention block, we use LN to normalize the feature map before and after attention operations and use the dropout layer and the global average pooling [23] in the MLP block to prevent overfitting. In the recursive gated convolution with attention block, the feature maps first go through the window-attention block for global modeling, extracting features, and synthesizing the global information. Then they go through a recursive gated convolution block to extract spatial and local bias information through efficient higher-order spatial interactions. Finally, some feature maps with more comprehensive and detailed feature information are output.  
Figure 2: The overall structure of GLFFNet.  
SFA Encoder uses attention mechanism [24] of Transformer to achieve globe modeling. The expression of attention mechanism is as follows:  
\[Attention(Q,K,V)=Soft\text{max}(\frac{Q\times K^{T}}{\sqrt{d_{k}}})\times V \tag{1}\]  
where \(Q\), \(K\), and \(V\) are, respectively, from the mapping of the input \(X\in R^{N\times C}\) to different feature spaces. The expression of a linear transformation is as follows:  
\[Q=X\times W_{Q},\ K=X\times W_{K},\ V=X\times W_{V} \tag{2}\]  
SFA Encoder uses recursive gated convolution to achieve high-order spatial interaction. Firstly, we use linear layer \(\varphi_{in}\) to obtain a set of projected feature maps \(p_{0}\) and \(\{q_{k}\}_{k=0}^{n-1}\):  
\[\left[p_{0}^{C_{0}\times H\times W},q_{0}^{C_{0}\times H\times W},\cdots,q_{n -1}^{C_{n-1}\times H\times W}\right]=\varphi_{in}(x)\in R^{(C_{0}+\sum_{0\leq k \leq n-1}C_{k})\times H\times W} \tag{3}\]  
then we process the set of projected feature maps by the recursive gated convolution,  
\[p_{k+1}=f_{k}(q_{k})\otimes g_{k}(p_{k})/\alpha=0,1,2,\cdots,n-1 \tag{4}\]  
where \(f_{k}\) is the gated convolution and \(g_{k}\) is a function to match the dimension in different orders. Finally, we use linear layer \(\varphi_{out}\) to obtain the feature maps:  
\[y=\varphi_{out}(p_{n-1})\in R^{C\times H\times W} \tag{5}\]  
The first SFA Encoder is composed of patch embedding layer and recursive gated convolution with attention block, which generates a 4-times downsampled feature map. The other three SFA Encoders are composed of downsample module and recursive gated  
Figure 3: The structure of the recursive gated convolution with attention block.  
convolution with attention block, which generate an 8, 16, and 32-times downsampled feature map, respectively. The downsampling operation of SFA Encoder is completed by patch embedding layer and downsample module. And the recursive gated convolution with attention block is used to extract features from the input feature map and does not change the size or channel number of the feature map.