Directing Mamba to Complex Textures: An Efficient Texture-Aware State Space Model for Image Restoration

Long Peng, Xin Di, Zhanfeng Feng, Wenbo Li, Renjing Pei, Yang Wang, Xueyang Fu, Yang Cao, Zheng-Jun Zha

Abstract

Image restoration remains a challenging task due to the inherent trade-off between computational efficiency and the ability to capture long-range dependencies. While State Space Models (SSMs) like Mamba offer linear complexity, they often struggle with texture preservation and treat image regions uniformly regardless of complexity. We present TAMambaIR, a novel framework that directs Mamba's efficiency toward texture-rich regions. By employing texture area filtering and modulating internal state transitions based on local variance, TAMambaIR achieves state-of-the-art performance in super-resolution, deraining, and low-light enhancement while significantly reducing computational overhead compared to Transformer-based and standard Mamba architectures.

Introduction

Modern image restoration tasks, such as super-resolution (SR) and deraining, face two primary hurdles. First, the Efficiency Gap: CNNs are computationally efficient but lack global receptive fields, whereas Transformers provide global modeling at a high quadratic cost, making them impractical for high-resolution (4K/8K) processing. Second, the Uniformity Problem: standard models process "flat" regions (e.g., sky) and "textured" regions (e.g., intricate patterns) with the same intensity, despite the fact that textured regions are significantly harder to restore.

While the Mamba architecture (a type of SSM) provides a promising middle ground with linear complexity, it suffers from "forgetting" fine texture details over long sequences. TAMambaIR addresses these issues by making the model "texture-aware," prioritizing complex regions and modulating its internal memory to retain structural information.

Methodology

Texture-Aware Motivation

The authors observe a direct correlation between texture complexity and restoration difficulty. Statistical analysis shows that regions with higher variance (richer textures) consistently yield lower Peak Signal-to-Noise Ratio (PSNR) values, justifying a non-uniform approach to computation.

PSNR performance across different texture complexities, showing that richer textures are harder to restore and that the proposed method provides significant gains.

Core Innovations

  1. Texture Area Filtering: The image is partitioned into patches, which are then sorted by statistical variance. The model focuses its primary computational resources on the top $p\%$ most complex patches, effectively skipping or simplifying the processing of redundant flat areas.
  2. Texture-Aware Modulation (TAM): To prevent the hidden state from being "washed out" by simple regions, the model modulates the transition matrices ($B$ and $\Delta$) of the state-space equation. By weighting these parameters with texture variance, the model ensures that complex structural information is prioritized in its internal "history."
Comparison between Traditional SSM and the proposed Texture-Aware SSM, highlighting the modulation of transition parameters based on texture variance.
  1. Multi-Directional Perception Block (MDPB): Instead of parallel four-directional scanning (which is memory-intensive), the MDPB connects scanning directions sequentially. This expands the receptive field efficiently without the massive memory overhead typical of standard Mamba implementations.
  2. Positional Embeddings: Learnable positional embeddings are integrated into the SSM to maintain global spatial context, a feature typically missing in standard SSMs but crucial for image restoration.

Experiments and Results

Datasets

The model was rigorously tested across multiple benchmarks, including DIV2K and Flickr2K for training, and Set5, Set14, B100, and Manga109 for evaluation. It was also tested on Rain200H/L for deraining and LOL-V2 for low-light enhancement.

Key Findings

  • Efficiency through Sparsity: By focusing on the top 50% of textured patches, TAMambaIR achieves superior results compared to models processing 100% of the image uniformly. This demonstrates that targeted computation is more effective than brute-force processing.
  • Quantitative Superiority: In Super-Resolution ($\times 2$ scale on Manga109), TAMambaIR reached 40.35 dB, outperforming MambaIR (40.28 dB) while utilizing 18.5% fewer FLOPs and 21.3% fewer parameters.
  • State-of-the-Art Deraining: The model set new benchmarks on Rain200L (41.25 dB) and Rain200H (32.19 dB).
  • Visual Quality: In a user study, TAMambaIR achieved the highest average score (8.4/10), surpassing Bicubic, EDSR, SwinIR, and MambaIR.

Conclusion and Future Work

TAMambaIR successfully "directs" Mamba's linear-time efficiency toward the most challenging aspects of image restoration. By acknowledging that texture equals difficulty, the model achieves a better balance of performance and speed than previous Transformer or SSM-based approaches. Future work includes developing an adaptive filtering ratio that adjusts per image and extending the framework to tasks like deblurring and inpainting.

Summary updated

BibTeX
@inproceedings{peng2025directing,
  author = {Long Peng and Xin Di and Zhanfeng Feng and Wenbo Li and Renjing Pei and Yang Wang and Xueyang Fu and Yang Cao and Zheng-Jun Zha},
  title = {{Directing Mamba to Complex Textures: An Efficient Texture-Aware State Space Model for Image Restoration}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.24963/ijcai.2025/197},
}
Figure