## 3 Materials and Methods
### Grid Attention Block (GAB)  
#### 3.4.1 Local Attention Enhancement via GAB  
The MLLA module demonstrates notable advantages in capturing global contextual information, yet exhibits relative limitations in processing local features. To address this deficiency, we integrate a self-attention mechanism into each DRFG for local feature enhancement. When Swin Transformer is applied to super-resolution tasks, its reliance on a limited pixel range within local windows hinders its ability to fully leverage the image's self-similarity for reconstruction. So, we adopt an approach that bolsters long-range depen  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**MLP**} & \multirow{2}{*}{**SGFN**} & \multirow{2}{*}{**GAB**} & \multirow{2}{*}{\begin{tabular}{c} **Params** \\ **(K)** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Set5** \\ **PSNR (dB)** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Set14** \\ **PSNR (dB)** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **BSD100** \\ **PSNR (dB)** \\ \end{tabular} } & \multirow{2}{*}{\
\begin{tabular}{c} **Urban100** \\ **PSNR (dB)** \\ \end{tabular} } & \multirow{2}{*}{
\begin{tabular}{c} **Manga109** \\ **PSNR (dB)** \\ \end{tabular} } \\  & & & & **/SSIM** & **/SSIM** & **/SSIM** & **/SSIM** & **/SSIM** \\ \hline A & \(\surd\) & & & 1035 & 32.19/0.8944 & 28.58/0.7809 & 27.58/0.7362 & 25.95/0.7811 & 30.37/0.9064 \\ B & \(\surd\) & & 1087 & 32.30/0.8959 & 28.67/0.7830 & 27.61/0.7374 & 26.14/0.7863 & 30.62/0.9089 \\ C & \(\surd\) & & \(\surd\) & 952 & 32.16/0.8944 & 28.54/0.7806 & 27.56/0.7356 & 25.89/0.7789 & 30.34/0.9058 \\ D & & \(\surd\) & \(\surd\) & 1057 & 32.30/0.8960 & 28.65/0.7831 & 27.63/0.7381 & 26.19/0.7882 & 30.67/0.9100 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Ablation experiments on SGFN and GAB, with the average PSNR/SSIM evaluated on benchmark datasets under a \(\times\)4 scale factor. The best and second-best results are highlighted in red and blue, respectively.  
dency modeling by utilizing the Grid Attention Block to expand the pixel interaction range, as illustrated in Figure 4.  
Specifically, the input feature map \(F_{in}\in R^{H\times W\times C}\) is partitioned into \(K^{2}\) groups based on an interval size \(K\), each containing \(\frac{H}{K}\times\frac{W}{K}\) patches. \(K\) controls the number of spatial grid partitions, determining the granularity of localized attention. After performing a grid shuffle to rearrange the feature map \(F_{G}\in R^{\frac{H}{K}\times\frac{W}{K}\times C}\), self-attention is computed within each group. The computation process can be formulated as follows:  
\[\hat{X}=SoftMax\left(\frac{GK^{\top}}{d}+B\right)V, \tag{18}\]  
\[Attention\left(Q,G,\hat{X}\right)=SoftMax\left(\frac{QG^{\top}}{d}+B\right) \hat{X}, \tag{19}\]  
where \(G\in R^{\frac{H}{K}\times\frac{W}{K}\times C}\) denotes the global interaction features. \(Q,K,V\) are obtained from the feature map \(F_{G}\). \(\hat{X}\) represents intermediate features generated through self-attention computation. The scalar \(d\) is a normalization factor used in scaled dot-product attention, following common Transformer practice, and is typically set to the square root of the feature dimension.  
The GAB facilitates cross-region similarity modeling for enhanced image reconstruction while employing a post-normalization strategy to improve network training stability. The GAB architecture comprises a grid-MSA layer and an SGFN layer. The computational workflow of GAB is expressed as follows:  
\[F_{M}=LN(Grid-MSA(F_{in}))+F_{in}, \tag{20}\]  
\[F_{out}=LN(SGFN(F_{M}))+F_{M}, \tag{21}\]  
where \(Grid-MSA(\cdot)\) denotes the Grid multi-head attention mechanism. \(LN(\cdot)\) represents Layer Normalization. Compared with Batch Normalization, Layer Normalization effectively prevents undesirable impacts on image contrast and color characteristics during model training.