Soft pattern coding transformer for lightweight image super resolution
摘要
The application of Transformers to lightweight single-image super-resolution (SISR) faces challenges in accurately capturing structural information while avoiding artifacts and excessive computational cost. Pixel-level attention may fail to model accurate long-range dependencies due to limited structural awareness, whereas coarse patch-level attention can introduce artifacts and boundary effects due to the imposed patch priors. In particular, constructing fine-grained patch-embedding self-attention at low computational cost is widely considered intractable for lightweight SISR tasks. To address these challenges, we propose a soft pattern mechanism to flexibly establish long-range correlations across image regions. Unlike conventional coarse-to-fine approaches, the proposed Soft Pattern Self-Attention (SPSA) densely encodes a pyramid of regional patterns into refined pixels, enabling cross-scale regional pattern measurement and multiscale patch-level indexing without boundary effects. For efficiency in lightweight SISR, window-based self-attention confines computations within local windows, while the Lightweight Residual Channel Attention (LRCA) module compensates for out-of-window information. A multistage distillation strategy is used to integrate information from the attention modules, where SPSA captures accurate and richer long-range dependencies, and LRCA further extends the effective information range beyond individual windows. This design enhances attention efficiency, allowing fewer stacked modules to achieve competitive performance. Extensive experiments demonstrate that the proposed method significantly improves SISR performance while maintaining lower model complexity compared to state-of-the-art lightweight methods. The code is available at https://github.com/bbbolt/SPCT.