{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/mambair-a-simple-baseline-for-image","title":"MambaIR: A Simple Baseline for Image Restoration with State-Space Model","arxiv_id":"2402.15648","date":"2024-02-23","proceeding":null,"authors":["Hang Guo","Jinmin Li","Tao Dai","Zhihao Ouyang","Xudong Ren","Shu-Tao Xia"],"abstract":"Recent years have seen significant advancements in image restoration, largely attributed to the development of modern deep neural networks, such as CNNs and Transformers. However, existing restoration backbones often face the dilemma between global receptive fields and efficient computation, hindering their application in practice. Recently, the Selective Structured State Space Model, especially the improved version Mamba, has shown great potential for long-range dependency modeling with linear complexity, which offers a way to resolve the above dilemma. However, the standard Mamba still faces certain challenges in low-level vision such as local pixel forgetting and channel redundancy. In this work, we introduce a simple but effective baseline, named MambaIR, which introduces both local enhancement and channel attention to improve the vanilla Mamba. In this way, our MambaIR takes advantage of the local pixel similarity and reduces the channel redundancy. Extensive experiments demonstrate the superiority of our method, for example, MambaIR outperforms SwinIR by up to 0.45dB on image SR, using similar computational cost but with a global receptive field. Code is available at \\url{https://github.com/csguoh/MambaIR}.","url_abs":"https://arxiv.org/abs/2402.15648v3","url_pdf":"https://arxiv.org/pdf/2402.15648v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"mambair-a-simple-baseline-for-image","repo_url":"https://github.com/csguoh/mambair","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"mambair-a-simple-baseline-for-image","repo_url":"https://github.com/iridescentttt/SynQT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-restoration","task_name":"Image Restoration"},{"task_slug":"image-super-resolution","task_name":"Image Super-Resolution"},{"task_slug":"mamba","task_name":"Mamba"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-super-resolution-on-set14-4x-upscaling","task":"Image Super-Resolution","dataset":"Set14 - 4x upscaling","model":"MambaIR","rank_in_archive_order":20,"of":104,"metrics":{"PSNR":"29.20","SSIM":"0.7961"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2402.15648","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.15648"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/csguoh/mambair","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/iridescentttt/SynQT","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/csguoh/MambaIR","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":6,"ran_fixture":3,"ran_draft_wrong":2,"unverified":4},"by_repo_kind":{"official":{"samples":8,"ran":5,"repositories":1},"listed":{"samples":7,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"bb483d1dc27ae6fd","entry":"Adapter","repo":"iridescentttt/SynQT","repo_kind":"listed","path":"synqt.py","file_url":"https://github.com/iridescentttt/SynQT/blob/HEAD/synqt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bb483d1dc27ae6fd"}},{"code_sha256_prefix":"ab54423c3b962f1c","entry":"ConditionCombineBlock","repo":"iridescentttt/SynQT","repo_kind":"listed","path":"synqt.py","file_url":"https://github.com/iridescentttt/SynQT/blob/HEAD/synqt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ab54423c3b962f1c"}},{"code_sha256_prefix":"cef8b4a7bdc3ecd8","entry":"Mlp","repo":"iridescentttt/SynQT","repo_kind":"listed","path":"synqt.py","file_url":"https://github.com/iridescentttt/SynQT/blob/HEAD/synqt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cef8b4a7bdc3ecd8"}},{"code_sha256_prefix":"e406ec263d8983d2","entry":"Mlp1","repo":"iridescentttt/SynQT","repo_kind":"listed","path":"synqt.py","file_url":"https://github.com/iridescentttt/SynQT/blob/HEAD/synqt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e406ec263d8983d2"}},{"code_sha256_prefix":"bba4a43c8f71523d","entry":"QSMAttention","repo":"iridescentttt/SynQT","repo_kind":"listed","path":"synqt.py","file_url":"https://github.com/iridescentttt/SynQT/blob/HEAD/synqt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bba4a43c8f71523d"}},{"code_sha256_prefix":"d643bf97deee36bb","entry":"QSMBlock","repo":"iridescentttt/SynQT","repo_kind":"listed","path":"synqt.py","file_url":"https://github.com/iridescentttt/SynQT/blob/HEAD/synqt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d643bf97deee36bb"}},{"code_sha256_prefix":"52d96aa31ed74a56","entry":"drop_path","repo":"csguoh/MambaIR","repo_kind":"official","path":"analysis/model_zoo/hat.py","file_url":"https://github.com/csguoh/MambaIR/blob/HEAD/analysis/model_zoo/hat.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"52d96aa31ed74a56"}},{"code_sha256_prefix":"15c613ecceb6aa71","entry":"img2windows","repo":"csguoh/MambaIR","repo_kind":"official","path":"analysis/model_zoo/cat.py","file_url":"https://github.com/csguoh/MambaIR/blob/HEAD/analysis/model_zoo/cat.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"15c613ecceb6aa71"}},{"code_sha256_prefix":"60363d0620f5778d","entry":"window_partition","repo":"csguoh/MambaIR","repo_kind":"official","path":"analysis/model_zoo/hat.py","file_url":"https://github.com/csguoh/MambaIR/blob/HEAD/analysis/model_zoo/hat.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"60363d0620f5778d"}},{"code_sha256_prefix":"4f003e9ad9b7a7cb","entry":"window_reverse","repo":"csguoh/MambaIR","repo_kind":"official","path":"analysis/model_zoo/hat.py","file_url":"https://github.com/csguoh/MambaIR/blob/HEAD/analysis/model_zoo/hat.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4f003e9ad9b7a7cb"}},{"code_sha256_prefix":"8cb23a62748d3b1c","entry":"windows2img","repo":"csguoh/MambaIR","repo_kind":"official","path":"analysis/model_zoo/cat.py","file_url":"https://github.com/csguoh/MambaIR/blob/HEAD/analysis/model_zoo/cat.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8cb23a62748d3b1c"}},{"code_sha256_prefix":"76fe1ca9c7cf2ce4","entry":"SynQT","repo":"iridescentttt/SynQT","repo_kind":"listed","path":"synqt.py","file_url":"https://github.com/iridescentttt/SynQT/blob/HEAD/synqt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"76fe1ca9c7cf2ce4"}},{"code_sha256_prefix":"5f390d616fb142ad","entry":"flops_selective_scan_fn","repo":"csguoh/MambaIR","repo_kind":"official","path":"analysis/utils_fvcore.py","file_url":"https://github.com/csguoh/MambaIR/blob/HEAD/analysis/utils_fvcore.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5f390d616fb142ad"}},{"code_sha256_prefix":"0b84e99fd1e93dd6","entry":"flops_selective_scan_ref","repo":"csguoh/MambaIR","repo_kind":"official","path":"analysis/utils_fvcore.py","file_url":"https://github.com/csguoh/MambaIR/blob/HEAD/analysis/utils_fvcore.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0b84e99fd1e93dd6"}},{"code_sha256_prefix":"e582f87a53fb23d4","entry":"import_abspy","repo":"csguoh/MambaIR","repo_kind":"official","path":"analysis/utils_fvcore.py","file_url":"https://github.com/csguoh/MambaIR/blob/HEAD/analysis/utils_fvcore.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e582f87a53fb23d4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}