# MaIR: A Locality- and Continuity-Preserving Mamba for Image Restoration

arXiv: https://arxiv.org/abs/2412.20066 · HTML: https://mlsanity.com/paper/2412.20066/

## Key facts

- Cited by 45 papers in the map (data through 14 Oct 2026).
- Placed in Mamba for image restoration, one of 10 directions in State-space sequence models (S4, Mamba).
- Builds on 50 of its 74 references that are in the map.
- First posted on arXiv 28 Dec 2024.

## Placed in

- State-space sequence models (S4, Mamba) / [Mamba for image restoration](https://mlsanity.com/ssm/mamba-for-image-restoration/)

## Builds on (most cited first, 30 of 50)

- [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://mlsanity.com/paper/2103.14030/) (2021)
- [Mamba: Linear-Time Sequence Modeling with Selective State Spaces](https://mlsanity.com/paper/2312.00752/) (2023)
- [Efficiently Modeling Long Sequences with Structured State Spaces](https://mlsanity.com/paper/2111.00396/) (2021)
- [SwinIR: Image Restoration Using Swin Transformer](https://mlsanity.com/paper/2108.10257/) (2021)
- [Restormer: Efficient Transformer for High-Resolution Image Restoration](https://mlsanity.com/paper/2111.09881/) (2021)
- [Enhanced Deep Residual Networks for Single Image Super-Resolution](https://mlsanity.com/paper/1707.02921/) (2017)
- [Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising](https://mlsanity.com/paper/1608.03981/) (2016)
- [Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality](https://mlsanity.com/paper/2405.21060/) (2024)
- [Image Super-Resolution Using Very Deep Residual Channel Attention Networks](https://mlsanity.com/paper/1807.02758/) (2018)
- [Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model](https://mlsanity.com/paper/2401.09417/) (2024)
- [VMamba: Visual State Space Model](https://mlsanity.com/paper/2401.10166/) (2024)
- [Pre-Trained Image Processing Transformer](https://mlsanity.com/paper/2012.00364/) (2020)
- [Uformer: A General U-Shaped Transformer for Image Restoration](https://mlsanity.com/paper/2106.03106/) (2021)
- [Multi-Stage Progressive Image Restoration](https://mlsanity.com/paper/2102.02808/) (2021)
- [Simplified State Space Layers for Sequence Modeling](https://mlsanity.com/paper/2208.04933/) (2022)
- [Deep Multi-scale Convolutional Neural Network for Dynamic Scene Deblurring](https://mlsanity.com/paper/1612.02177/) (2016)
- [Simple Baselines for Image Restoration](https://mlsanity.com/paper/2204.04676/) (2022)
- [FFDNet: Toward a Fast and Flexible Solution for CNN based Image Denoising](https://mlsanity.com/paper/1710.04026/) (2017)
- [Plug-and-Play Image Restoration with Deep Denoiser Prior](https://mlsanity.com/paper/2008.13751/) (2020)
- [Benchmarking Single Image Dehazing and Beyond](https://mlsanity.com/paper/1712.04143/) (2017)
- [Activating More Pixels in Image Super-Resolution Transformer](https://mlsanity.com/paper/2205.04437/) (2022)
- [Learning Deep CNN Denoiser Prior for Image Restoration](https://mlsanity.com/paper/1704.03264/) (2017)
- [Semantic Foggy Scene Understanding with Synthetic Data](https://mlsanity.com/paper/1708.07819/) (2017)
- [MambaIR: A Simple Baseline for Image Restoration with State-Space Model](https://mlsanity.com/paper/2402.15648/) (2024)
- [Scale-recurrent Network for Deep Image Deblurring](https://mlsanity.com/paper/1802.01770/) (2018)
- [Sketch-based Manga Retrieval using Manga109 Dataset](https://mlsanity.com/paper/1510.04389/) (2015)
- [Rethinking Coarse-to-Fine Approach in Single Image Deblurring](https://mlsanity.com/paper/2108.05054/) (2021)
- [FFA-Net: Feature Fusion Attention Network for Single Image Dehazing](https://mlsanity.com/paper/1911.07559/) (2019)
- [Single Image Super-Resolution via a Holistic Attention Network](https://mlsanity.com/paper/2008.08767/) (2020)
- [Fast, Accurate, and Lightweight Super-Resolution with Cascading Residual Network](https://mlsanity.com/paper/1803.08664/) (2018)

## Built on by (most cited first, 30 of 45)

- [Residual Diffusion Bridge Model for Image Restoration](https://mlsanity.com/paper/2510.23116/) (2025)
- [NTIRE 2026 3D Restoration and Reconstruction in Real-world Adverse Conditions: RealX3D Challenge Results](https://mlsanity.com/paper/2604.04135/) (2026)
- [Scan Clusters, Not Pixels: A Cluster-Centric Paradigm for Efficient Ultra-high-definition Image Restoration](https://mlsanity.com/paper/2602.21917/) (2026)
- [DSwinIR: Rethinking Window-based Attention for Image Restoration](https://mlsanity.com/paper/2504.04869/) (2025)
- [M2Restore: Mixture-of-Experts-based Mamba-CNN Fusion Framework for All-in-One Image Restoration](https://mlsanity.com/paper/2506.07814/) (2025)
- [Learning Domain-Aware Task Prompt Representations for Multi-Domain All-in-One Image Restoration](https://mlsanity.com/paper/2603.01725/) (2026)
- [Beyond Degradation Redundancy: Contrastive Prompt Learning for All-in-One Image Restoration](https://mlsanity.com/paper/2504.09973/) (2025)
- [Vision Mamba in Remote Sensing: A Comprehensive Survey of Techniques, Applications and Outlook](https://mlsanity.com/paper/2505.00630/) (2025)
- [Q-MambaIR: Accurate Quantized Mamba for Efficient Image Restoration](https://mlsanity.com/paper/2503.21970/) (2025)
- [TPGDiff: Hierarchical Triple-Prior Guided Diffusion for Image Restoration](https://mlsanity.com/paper/2601.20306/) (2026)
- [DH-Mamba: Exploring Dual-domain Hierarchical State Space Models for MRI Reconstruction](https://mlsanity.com/paper/2501.08163/) (2025)
- [Global Modeling Matters: A Fast, Lightweight and Effective Baseline for Efficient Image Restoration](https://mlsanity.com/paper/2507.13663/) (2025)
- [RetinexDual: Retinex-based Dual Nature Approach for Generalized Ultra-High-Definition Image Restoration](https://mlsanity.com/paper/2508.04797/) (2025)
- [Large Kernel Modulation Network for Efficient Image Super-Resolution](https://mlsanity.com/paper/2508.11893/) (2025)
- [StyMam: A Mamba-Based Generator for Artistic Style Transfer](https://mlsanity.com/paper/2601.12954/) (2026)
- [DiNAT-IR: Exploring Dilated Neighborhood Attention for High-Quality Image Restoration](https://mlsanity.com/paper/2507.17892/) (2025)
- [Fourier-RWKV: A Multi-State Perception Network for Efficient Image Dehazing](https://mlsanity.com/paper/2512.08161/) (2025)
- [All-in-One Video Restoration under Smoothly Evolving Unknown Weather Degradations](https://mlsanity.com/paper/2601.00533/) (2026)
- [FluxFlow: Conservative Flow-Matching for Astronomical Image Super-Resolution](https://mlsanity.com/paper/2605.03749/) (2026)
- [OP4KSR: One-Step Patch-Free 4K Super-Resolution with Periodic Artifact Suppression](https://mlsanity.com/paper/2605.13457/) (2026)
- [Towards Better De-raining Generalization via Rainy Characteristics Memorization and Replay](https://mlsanity.com/paper/2506.02477/) (2025)
- [FADPNet: Frequency-Aware Dual-Path Network for Face Super-Resolution](https://mlsanity.com/paper/2506.14121/) (2025)
- [Beyond Illumination: Fine-Grained Detail Preservation in Extreme Dark Image Restoration](https://mlsanity.com/paper/2508.03336/) (2025)
- [Frequency-Driven Inverse Kernel Prediction for Single Image Defocus Deblurring](https://mlsanity.com/paper/2508.12736/) (2025)
- [Transformer-Progressive Mamba Network for Lightweight Image Super-Resolution](https://mlsanity.com/paper/2511.03232/) (2025)
- [Partial Ring Scan: Revisiting Scan Order in Vision State Space Models](https://mlsanity.com/paper/2602.04170/) (2026)
- [Progressive Split Mamba: Effective State Space Modelling for Image Restoration](https://mlsanity.com/paper/2603.09171/) (2026)
- [EchoSR: Efficient Context Harnessing for Lightweight Image Super-Resolution](https://mlsanity.com/paper/2605.17470/) (2026)
- [HNDiff: Haze-Noise Diffusion for Image Dehazing](https://mlsanity.com/paper/2608.10995/) (2026)
- [RealRep: Generalized SDR-to-HDR Conversion via Attribute-Disentangled Representation Learning](https://mlsanity.com/paper/2505.07322/) (2025)

## Abstract (arXiv)

Recent advancements in Mamba have shown promising results in image restoration. These methods typically flatten 2D images into multiple distinct 1D sequences along rows and columns, process each sequence independently using selective scan operation, and recombine them to form the outputs. However, such a paradigm overlooks two vital aspects: i) the local relationships and spatial continuity inherent in natural images, and ii) the discrepancies among sequences unfolded through totally different ways. To overcome the drawbacks, we explore two problems in Mamba-based restoration methods: i) how to design a scanning strategy preserving both locality and continuity while facilitating restoration, and ii) how to aggregate the distinct sequences unfolded in totally different ways. To address these problems, we propose a novel Mamba-based Image Restoration model (MaIR), which consists of Nested S-shaped Scanning strategy (NSS) and Sequence Shuffle Attention block (SSA). Specifically, NSS preserves locality and continuity of the input images through the stripe-based scanning region and the S-shaped scanning path, respectively. SSA aggregates sequences through calculating attention weights within the corresponding channels of different sequences. Thanks to NSS and SSA, MaIR surpasses 40 baselines across 14 challenging datasets, achieving state-of-the-art performance on the tasks of image super-resolution, denoising, deblurring and dehazing. The code is available at https://github.com/XLearning-SCU/2025-CVPR-MaIR.
