TL;DR
This paper introduces ELAN, an efficient transformer-based network for image super-resolution (SR). ELAN leverages novel "shift-convolution" for local feature extraction and a "group-wise multi-scale self-attention" (GMSA) module to efficiently capture long-range dependencies, achieving state-of-the-art results with significantly reduced computational cost compared to existing transformer SR models.
What Problem Does This Paper Address?
Image super-resolution (SR) aims to reconstruct a high-resolution (HR) image from a low-resolution (LR) counterpart. While deep learning, particularly CNNs, has shown great success, they often struggle to adaptively model pixel relationships and require very deep, complex architectures to achieve high detail. Recently, transformer-based models have excelled in vision tasks due to their self-attention (SA) mechanism, which effectively models dependencies. However, the quadratic complexity of standard SA with respect to feature size makes it computationally prohibitive for low-level vision tasks like SR, which deal with large feature maps. Existing transformer SR models often inherit redundant components from high-level vision tasks and use small, fixed-size windows for SA, limiting their ability to capture long-range image dependencies crucial for SR. This paper addresses the need for an SR model that can effectively leverage long-range dependencies like transformers but with significantly improved computational efficiency.
Methods
The core of ELAN lies in its Efficient Long-Range Attention Block (ELAB), which is designed for efficiency and effectiveness in SR. ELAB consists of two main components:
- Local Feature Extraction: Instead of standard convolutions, ELAN uses two cascaded shift-convolutions (shift-conv). A shift-conv is composed of a spatial shift operation followed by a 1x1 convolution. This design allows it to capture local structural information and leverage information from neighboring pixels, effectively increasing the receptive field without increasing computational complexity beyond that of a 1x1 convolution.
- Group-wise Multi-scale Self-Attention (GMSA): To address the computational cost of SA while capturing long-range dependencies, GMSA divides the input features into multiple groups. Each group then undergoes SA with a different window size. This "group-wise" and "multi-scale" approach allows for flexible control over computational cost and a larger effective receptive field compared to fixed-size window SA.
Further optimizations include:
- Accelerated Self-Attention (ASA): Layer Normalization (LN) is removed, and Batch Normalization (BN) is used for stabilization, which can be merged into convolutions during inference. The SA is computed in a symmetric embedded Gaussian space, saving one 1x1 convolution.
- Shared Attention Mechanism: To further reduce computation, attention scores are shared among adjacent SA modules within the network. This significantly reduces redundant reshape operations and convolutions, especially during inference.
- Shifted Window Mechanism: Inspired by SwinIR, a shifted window mechanism is employed to ensure connections between neighboring windows across consecutive ELABs, improving feature propagation.
The overall ELAN architecture is a simple sequential stacking of these ELABs, preceded by shallow feature extraction and followed by HR image reconstruction.
Datasets
The paper uses the DIV2K dataset for training the ELAN model. For performance comparison, it evaluates on five benchmark datasets: Set5, Set14, BSD100, Urban100, and Manga109.
Key Insights and Ideas
- Shift-convolution for SR: The paper demonstrates that a simple spatial shift operation before a 1x1 convolution can effectively expand the receptive field for local feature extraction in SR, offering a more efficient alternative to deeper or wider standard convolutional layers.
- GMSA for efficient long-range dependency: By breaking down SA into groups with varying window sizes, GMSA offers a flexible and computationally efficient way to capture long-range spatial relationships, which are critical for reconstructing fine details in SR.
- Shared attention as a practical speedup: The idea of sharing attention computations across sequential blocks is a clever way to reduce inference time significantly with minimal performance degradation, highlighting the redundancy in some transformer designs for SR.
- Simplicity is key: The ELAN architecture is intentionally designed to be simple, primarily by cascading ELABs, which contributes to its efficiency and ease of implementation.
Key Results
- Quantitative Performance: ELAN achieves state-of-the-art PSNR/SSIM results on all five benchmark datasets across various upscaling factors (x2, x3, x4).
- Efficiency:
- ELAN-light (a lighter version) achieves comparable or better results than SwinIR-light while being approximately 4.5 times faster in inference.
- The full ELAN model also outperforms many classic SR models in terms of PSNR/SSIM while being significantly more efficient.
- The proposed ASA and shared attention mechanisms drastically reduce inference latency, with ELAN-light achieving a latency of 66ms on a single NVIDIA 2080Ti GPU.
- Qualitative Results: Visual comparisons show that ELAN can restore more accurate and sharper edges and textures, effectively recovering fine details and structures that other models, including transformer-based ones, struggle with.
Limitations and Future Work
- SA Computation Still Intensive: While ELAN is significantly more efficient than previous transformer SR models, the paper acknowledges that SA calculation is still inherently computation- and memory-intensive.
- Future Work: The authors suggest exploring more efficient implementations or approximations of SA for SR and other low-level vision tasks. They also mention the potential for further optimization of the shared attention mechanism.
Summary updated