MambaIR: Breaking the Efficiency-Field Dilemma in Image Restoration

Mambair: A simple baseline for image restoration with state-space model

Hang Guo, Jinmin Li, Tao Dai, Zhihao Ouyang, Xudong Ren, Shu-Tao Xia
Summary
Problem
Method
Results
Takeaways
Abstract

MambaIR is a novel image restoration baseline that adapts the Selective Structured State Space Model (Mamba) for low-level vision tasks. It introduces a Residual State Space Block (RSSB) to provide global receptive fields with linear computational complexity, outperforming benchmarks like SwinIR by up to 0.45dB in Super-Resolution tasks.

TL;DR

MambaIR is the first comprehensive attempt to bring the power of State Space Models (SSMs) to image restoration. By introducing the Residual State Space Block (RSSB), it achieves a true global receptive field with linear computational complexity, surpassing established Transformer-based SOTA models like SwinIR in both performance (up to 0.45dB gain) and efficiency.

The "Gordian Knot" of Image Restoration

For years, researchers have struggled with a fundamental trade-off:

  1. CNNs: Highly efficient due to sliding windows but localized by nature (limited receptive field).
  2. Transformers: Global modeling via Self-Attention, but computationally "explosive" (quadratic complexity with image resolution).
  3. Windowed Transformers: A compromise that restores efficiency by restricting attention to local windows, which unfortunately sacrifices the global context needed for complex structural reconstruction.

The authors identify a third path: Mamba. While Mamba offers linear scaling and long-range memory, it isn't "plug-and-play" for images because flattening a 2D image into 1D causes spatially nearby pixels to become distant, leading to local pixel forgetting.

Methodology: Tailoring Mamba for Pixels

MambaIR introduces the Residual State Space Block (RSSB) to bridge the gap between 1D SSM processing and 2D spatial features.

1. The RSSB Architecture

Unlike standard Transformer blocks, RSSB focuses on two restoration-specific enhancements:

  • Local Enhancement: A parallel local convolution branch compensates for the "forgetting" that happens during 1D flattening.
  • Channel Attention (CA): Since Mamba uses large hidden state dimensions to store long-range information, it often generates redundant channel data. CA acts as an importance filter to keep the representations lean and effective.

Model Architecture

2. 2D Selective Scan (VSSM)

To handle the non-causal nature of images, MambaIR uses a four-way scan strategy. It processes the image from Top-Left to Bottom-Right, Bottom-Right to Top-Left, and the two other diagonals. This ensures every pixel "sees" its neighbors from all directions, effectively capturing the 2D manifold structure.

Experiments: Superior Quality, Linear Cost

The results are compelling across Super-Resolution (SR) and Denoising.

Quantitative SOTA

In classic SR, MambaIR consistently outperforms SwinIR. For the Manga109 dataset (x4 scale), MambaIR reached 32.32dB, significantly higher than SwinIR’s 32.03dB. In Denoising tasks (Urban100, σ=50), the gap widened to 0.48dB.

Efficiency Analysis

The most impressive part of MambaIR is its scaling behavior. As shown in the complexity charts, while standard Attention complexity grows quadratically, MambaIR grows linearly, matching the efficiency of window-based methods while maintaining a global field.

Performance Comparison

Deep Insights: Why It Works

The success of MambaIR lies in its ability to activate more pixels. Previous research established that the quality of restoration is directly correlated with the "amount of information" a model can gather. By utilizing a State Space Model, MambaIR bypasses the memory bottlenecks of Transformers, allowing the latent state to act as a global summary that is updated linearly as the scan progresses.

Critical Analysis & Conclusion

Takeaway

MambaIR proves that the "Transformer-only" era of image restoration might be nearing its end. The linear complexity of SSMs provides the "free lunch" of global context without the memory overhead.

Limitations

Despite its strengths, the sequential nature of Mamba (even with parallel scans) can be sensitive to the flattening strategy. While the 4-way scan helps, true 2D SSM operations are still an area of active theoretical research. Furthermore, the reliance on specialized CUDA kernels for parallel scanning makes deployment on non-GPU hardware (like NPUs) a current challenge.

Future Work: We expect to see MambaIR architectures scaled up to "Foundation Model" sizes for low-level vision, potentially unifying tasks like denoising, deblurring, and HDR under a single Mamba-based pre-trained backbone.

Find Similar Papers

Try Our Examples

  • Search for recent papers that extend the Mamba architecture to other low-level vision tasks such as image deblurring or rain streak removal.
  • Which paper first proposed the VMamba (Visual Mamba) 2D selection scan mechanism, and how does MambaIR technically differ in its block design?
  • Explore comparative studies evaluating the efficiency of Mamba-based backbones versus FlashAttention-v2 in high-resolution image processing.
Contents
MambaIR: Breaking the Efficiency-Field Dilemma in Image Restoration
1. TL;DR
2. The "Gordian Knot" of Image Restoration
3. Methodology: Tailoring Mamba for Pixels
3.1. 1. The RSSB Architecture
3.2. 2. 2D Selective Scan (VSSM)
4. Experiments: Superior Quality, Linear Cost
4.1. Quantitative SOTA
4.2. Efficiency Analysis
5. Deep Insights: Why It Works
6. Critical Analysis & Conclusion
6.1. Takeaway
6.2. Limitations