# GPSR: Gradient-Prior-Based Network for Image Super-Resolution
## 3 Method
### Residual Spatial Attention Adaptive Aggregation Module
#### 3.3.3 RS3 AM-SR and RS3 AM-G  
To further improve the performance of CRFS, LRSAM is incorporated into the CRFS to construct two Residual Spatial Attention Adaptive Aggregation Modules (i.e., RS3 AM-SR, RS3 AM-G), which are embedded in the SR branch and the gradient branch, respectively, for efficient feature extraction. RS3 AM-SR and RS3 AM-G differ in their structural designs, depending on the characteristics of the different branches.  
The architecture of RS3 AM-SR that acts on the SR branch is depicted in Figure 5a. We embed a series of LRSAMs at the tails of residual branches at each level of CRFS. These LRSAMs are able to highlight spatial features that are useful for the SR task, and these highlighted features are passed through the gate unit to produce more beneficial features. Specifically, let \(R_{c,d}^{sr}\) denotes the \(c\)-th residual feature of the \(d\)-th RS3 AM-SR, which is enhanced by LRSAMs, where \(c=1,2,...,M\), then the corresponding fused feature \(F_{con,d}^{sr}\) is computed by:  
\[F_{con,d}^{sr}=H_{gate}([R_{1,d},R_{2,d},...,R_{M,d}]). \tag{21}\]  
To compensate for the information loss during forward propagation and to improve the information flow, global residual learning is then employed to obtain output \(F_{d}^{sr}\) of the \(d\)-th RS3 AM-SR:  
\[F_{d}^{sr}=F_{con,d}^{sr}+x, \tag{22}\]  
where \(x\) denotes the input of the \(d\)-th RS3 AM-SR.  
The architecture of RS3 AM-G that acts on the gradient branch is depicted in Figure 5b. As the intermediate features of the SR branch carry a wealth of high-frequency information, RS3 AM-G utilizes them as an essential complement to inferring sharp spatial structure features. Specifically, the feature map that is concatenated by the output \(F_{de,k}^{m}\) of the \(m\)-th RS3 AM-SR of the \(k\)-th decoder and the local residual feature \(F_{m,k}^{local}\) on \(m\)-th residual branch of the \(k\)-th RS3 AM-G passes through an LRSAM and a Conv, yielding a fused feature \(R_{m,k}^{grad}\):  
\[R_{m,k}^{grad}=f_{conv}\Big{(}f_{LRSA}\Big{(}\Big{[}F_{de,k}^{m},F_{m,k}^{ local}\Big{]}\Big{)}\Big{)}, \tag{23}\]  
Figure 4: Architecture of the Large-Receptive-field-based Spatial Attention Module (LRSAM).  
where \(f_{LRSA}\) denotes the function of the LRSAM, \(m=1,2,...,M\), \(k=1,2,...,N\). It should be noted that the function of Conv here is to halve the channel dimension.  
Subsequently, local feature fusion [39] is applied to adaptively fuse all intermediate features \(R_{mk,k}^{grad}\) in the current RS3 AM-G, and then local residual learning is introduced in RS3 AM-G to introduce the input \(x\) of the \(k\)-th RS3 AM-G to further improve the information flow. Thus, the output \(F_{k}^{G}\) of the \(k\)-th RS3 AM-G can be obtained by:  
\[F_{k}^{G}=H_{gate}\Big{(}\Big{[}R_{1,k}^{grad},R_{2,k}^{grad},...,R_{MK}^{ grad}\Big{]}\Big{)}+x. \tag{24}\]  
In contrast to dense block [25] and its variants [11], our RS3 AM removes modules that have negative impacts on the SR performance, such as batch normalization (BN) layers, while simplifying excessive dense connections and frequent concatenating operations, and reinforces the spatial distribution of residual features at all levels by using LRSAM. Hence, the proposed RS3 AMs are sufficiently efficient and lightweight. Finally, we used both RS3 AM-SR and RS3 AM-G to construct GPSR. Compared to most state-of-the-art SR methods, such as SAN (15.9M), HAN (16.07M), PA-EDSR (45.53M), NLSN (46.52M), etc., GPSR achieves a better super-resolution with fewer parameters (8.18M).