{"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/xformer-hybrid-x-shaped-transformer-for-image","title":"Xformer: Hybrid X-Shaped Transformer for Image Denoising","arxiv_id":"2303.06440","date":"2023-03-11","proceeding":null,"authors":["Jiale Zhang","Yulun Zhang","Jinjin Gu","Jiahua Dong","Linghe Kong","Xiaokang Yang"],"abstract":"In this paper, we present a hybrid X-shaped vision Transformer, named Xformer, which performs notably on image denoising tasks. We explore strengthening the global representation of tokens from different scopes. In detail, we adopt two types of Transformer blocks. The spatial-wise Transformer block performs fine-grained local patches interactions across tokens defined by spatial dimension. The channel-wise Transformer block performs direct global context interactions across tokens defined by channel dimension. Based on the concurrent network structure, we design two branches to conduct these two interaction fashions. Within each branch, we employ an encoder-decoder architecture to capture multi-scale features. Besides, we propose the Bidirectional Connection Unit (BCU) to couple the learned representations from these two branches while providing enhanced information fusion. The joint designs make our Xformer powerful to conduct global information modeling in both spatial and channel dimensions. Extensive experiments show that Xformer, under the comparable model complexity, achieves state-of-the-art performance on the synthetic and real-world image denoising tasks. We also provide code and models at https://github.com/gladzhang/Xformer.","url_abs":"https://arxiv.org/abs/2303.06440v2","url_pdf":"https://arxiv.org/pdf/2303.06440v2.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":"xformer-hybrid-x-shaped-transformer-for-image","repo_url":"https://github.com/gladzhang/xformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"image-denoising","task_name":"Image Denoising"}],"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":"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":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2303.06440","atlas_url":"https://app.syntology.ai/?focus=2303.06440","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.06440"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"deterministic:regex_extraction","url":"https://github.com/gladzhang/Xformer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gladzhang/xformer","reach":null}],"summary":{"ran":3,"ran_fixture":4,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":9,"ran":8,"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":9,"samples":[{"code_sha256_prefix":"dd5ab00bc7a7d984","entry":"ChannelTransformerBlock","repo":"gladzhang/xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dd5ab00bc7a7d984"}},{"code_sha256_prefix":"d81a553960719d6b","entry":"SpatialTransformerBlock","repo":"gladzhang/xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d81a553960719d6b"}},{"code_sha256_prefix":"4781ef943f218cfc","entry":"WindowAttention","repo":"gladzhang/xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4781ef943f218cfc"}},{"code_sha256_prefix":"55120f2026b56aa2","entry":"drop_path","repo":"gladzhang/Xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/Xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"55120f2026b56aa2"}},{"code_sha256_prefix":"82a15cc1e46f7e4d","entry":"to_3d","repo":"gladzhang/Xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/Xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"82a15cc1e46f7e4d"}},{"code_sha256_prefix":"b20f2a5df739a59e","entry":"to_4d","repo":"gladzhang/Xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/Xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b20f2a5df739a59e"}},{"code_sha256_prefix":"fe19b0b26685db41","entry":"window_partition","repo":"gladzhang/xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fe19b0b26685db41"}},{"code_sha256_prefix":"33cf996454dad0a3","entry":"window_reverse","repo":"gladzhang/xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"33cf996454dad0a3"}},{"code_sha256_prefix":"6ff3a333ae89be2a","entry":"XFormer","repo":"gladzhang/xformer","repo_kind":"official","path":"basicsr/models/archs/Xformer_arch.py","file_url":"https://github.com/gladzhang/xformer/blob/HEAD/basicsr/models/archs/Xformer_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6ff3a333ae89be2a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}