Abstract
Transformers have become increasingly popular for image super-resolution (SR) tasks due to their strong global context modeling capabilities. However, their quadratic computational complexity necessitates the use of window-based attention mechanisms, which restricts the receptive field and limits effective context expansion. Recently, the Mamba architecture has emerged as a promising alternative with linear computational complexity, allowing it to avoid window mechanisms and maintain a large receptive field. Nevertheless, Mamba faces challenges in handling long-context dependencies when high pixel-level precision is required, as in SR tasks. This is due to its hidden state mechanism, which can compress and store a substantial amount of context but only in an approximate manner, leading to inaccuracies that transformers do not suffer from. In this paper, we propose Contrast, a hybrid SR model that combines Convolutional, Transformer, and State Space components, effectively blending the strengths of transformers and Mamba to address their individual limitations. By integrating transformer and state space mechanisms, Contrast compensates for the shortcomings of each approach, enhancing both global context modeling and pixel-level accuracy. We demonstrate that combining these two architectures allows us to mitigate the problems inherent in each, resulting in improved performance on image super-resolution tasks.
Introduction
Single Image Super-Resolution (SR) aims to reconstruct high-resolution (HR) images from low-resolution (LR) inputs. Current state-of-the-art methods face a fundamental trade-off between local precision and global context. Convolutional Neural Networks (CNNs) excel at local texture extraction but lack long-range awareness. Transformers offer global modeling but suffer from quadratic computational costs, often forcing a reliance on window-based attention that limits the receptive field.
State Space Models (SSMs), specifically the Mamba architecture, provide a potential solution with linear complexity and expansive receptive fields. However, Mamba's approximate hidden state mechanism can struggle with the pixel-perfect accuracy required for high-fidelity reconstruction. Contrast addresses these issues by fusing these paradigms into a unified hybrid architecture.
Methodology
Contrast follows a standard SR pipeline consisting of shallow feature extraction, deep feature extraction, and image reconstruction. The core innovation lies in the Residual Group (RG) structure:
- Hybrid Interleaving: Within each RG, the model interleaves six Visual State Space (VSS) Blocks with one Overlapping Cross-Attention Block (OCAB). The VSS blocks (based on Mamba) provide a broad, global receptive field, while the OCAB (Transformer-based) acts as a high-precision refiner to correct spatial inaccuracies.
- Spatial Gated Feed-Forward Network (SGFN): Replacing standard MLPs, SGFNs utilize depth-wise convolutions and gating mechanisms to better preserve spatial information during processing.
- Optimized Design: The authors found that removing traditional Channel Attention Blocks (CABs) allowed for deeper layers and wider embedding dimensions, improving overall performance.
Experimental Results
The model was trained on DIV2K and Flickr2K datasets and evaluated across standard benchmarks including Set5, Set14, B100, Urban100, and Manga109.
Key Findings
- Efficiency: On the Urban100 (×4) benchmark, Contrast achieved a PSNR of 27.92 dB using only 14.1M parameters. This outperforms MambaIR (27.68 dB, 20.6M parameters) and matches the performance of the much larger HAT model while using approximately 30% fewer parameters.
- Scalability: A smaller variant, Contrast-S, maintains high competitiveness with only 7.55M parameters, demonstrating the efficiency of the hybrid approach for resource-constrained applications.
- Receptive Field Synergy: Local Attribution Map (LAM) analysis suggests that Mamba provides a broad horizontal and vertical context, while Transformers provide intense local focus. Contrast successfully merges these behaviors, maintaining a wide field of view while focusing sharply on critical spatial regions.
Conclusion and Future Work
Contrast demonstrates that the synergy between State Space Models and Transformers can overcome the individual limitations of each architecture in low-level vision tasks. While the OCAB component remains computationally intensive, the hybrid design offers a superior performance-to-parameter ratio compared to pure Transformer or pure Mamba models. Future research will explore the application of Contrast to real-world degradation, image denoising, and further scaling of the Mamba-based global context components.
Summary updated