{"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/cyclemlp-a-mlp-like-architecture-for-dense","title":"CycleMLP: A MLP-like Architecture for Dense Prediction","arxiv_id":"2107.10224","date":"2021-07-21","proceeding":"ICLR 2022 4","authors":["Shoufa Chen","Enze Xie","Chongjian Ge","Runjian Chen","Ding Liang","Ping Luo"],"abstract":"This paper presents a simple MLP-like architecture, CycleMLP, which is a versatile backbone for visual recognition and dense predictions. As compared to modern MLP architectures, e.g., MLP-Mixer, ResMLP, and gMLP, whose architectures are correlated to image size and thus are infeasible in object detection and segmentation, CycleMLP has two advantages compared to modern approaches. (1) It can cope with various image sizes. (2) It achieves linear computational complexity to image size by using local windows. In contrast, previous MLPs have $O(N^2)$ computations due to fully spatial connections. We build a family of models which surpass existing MLPs and even state-of-the-art Transformer-based models, e.g., Swin Transformer, while using fewer parameters and FLOPs. We expand the MLP-like models' applicability, making them a versatile backbone for dense prediction tasks. CycleMLP achieves competitive results on object detection, instance segmentation, and semantic segmentation. In particular, CycleMLP-Tiny outperforms Swin-Tiny by 1.3% mIoU on ADE20K dataset with fewer FLOPs. Moreover, CycleMLP also shows excellent zero-shot robustness on ImageNet-C dataset. Code is available at https://github.com/ShoufaChen/CycleMLP.","url_abs":"https://arxiv.org/abs/2107.10224v4","url_pdf":"https://arxiv.org/pdf/2107.10224v4.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":"cyclemlp-a-mlp-like-architecture-for-dense","repo_url":"https://github.com/ShoufaChen/CycleMLP","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"cyclemlp-a-mlp-like-architecture-for-dense","repo_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"cyclemlp-a-mlp-like-architecture-for-dense","repo_url":"https://github.com/BR-IDL/PaddleViT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"cyclemlp-a-mlp-like-architecture-for-dense","repo_url":"https://github.com/flytocc/CycleMLP-paddle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok"}},{"paper_slug":"cyclemlp-a-mlp-like-architecture-for-dense","repo_url":"https://github.com/liuruiyang98/Jittor-MLP","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"cyclemlp-a-mlp-like-architecture-for-dense","repo_url":"https://github.com/revsic/tf-mlptts","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"cyclemlp-a-mlp-like-architecture-for-dense","repo_url":"https://github.com/shier1/CycleMLP-paddle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok"}},{"paper_slug":"cyclemlp-a-mlp-like-architecture-for-dense","repo_url":"https://github.com/justld/CycleMlp_paddle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"instance-segmentation","task_name":"Instance Segmentation"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"affine-operator","method_name":"Affine Operator"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"feedforward-network","method_name":"Feedforward Network"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"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":"mlp-mixer","method_name":"MLP-Mixer"},{"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":"resmlp","method_name":"ResMLP"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"spatial-gating-unit","method_name":"Spatial Gating Unit"},{"method_slug":"stochastic-depth","method_name":"Stochastic Depth"},{"method_slug":"swin-transformer","method_name":"Swin Transformer"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"gmlp","method_name":"gMLP"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"CycleMLP-B5","rank_in_archive_order":461,"of":1060,"metrics":{"GFLOPs":"12.3","Number of params":"76M","Top 1 Accuracy":"83.2%"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-densepass","task":"Semantic Segmentation","dataset":"DensePASS","model":"CycleMLP (MiT-B1)","rank_in_archive_order":15,"of":36,"metrics":{"mIoU":"40.16%"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2107.10224","atlas_url":"https://app.syntology.ai/?focus=2107.10224","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.10224"}},"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/ShoufaChen/CycleMLP","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/justld/CycleMlp_paddle","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BR-IDL/PaddleViT","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/liuruiyang98/Jittor-MLP","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/flytocc/CycleMLP-paddle","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shier1/CycleMLP-paddle","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/revsic/tf-mlptts","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":8,"ran_violates":1,"unverified":6},"by_repo_kind":{"official":{"samples":4,"ran":1,"repositories":1},"listed":{"samples":10,"ran":7,"repositories":2}},"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":1,"samples":[{"code_sha256_prefix":"6ba716e31944fe22","entry":"CycleFC","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ba716e31944fe22"}},{"code_sha256_prefix":"a7533815a60a5ff4","entry":"Cycle_Block","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a7533815a60a5ff4"}},{"code_sha256_prefix":"65aa6021f94c1bd7","entry":"MLP","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"65aa6021f94c1bd7"}},{"code_sha256_prefix":"9f01e73d5c35c5b6","entry":"MLP_Block","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9f01e73d5c35c5b6"}},{"code_sha256_prefix":"93aac00d7f2d7fba","entry":"OverlapPatchEmbed","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"93aac00d7f2d7fba"}},{"code_sha256_prefix":"3e5be041fd16d9c9","entry":"Spatial_Proj","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e5be041fd16d9c9"}},{"code_sha256_prefix":"a93e65374343828b","entry":"load_state","repo":"revsic/tf-mlptts","repo_kind":"listed","path":"config.py","file_url":"https://github.com/revsic/tf-mlptts/blob/HEAD/config.py","link_basis":"harvester_set","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":"a93e65374343828b"}},{"code_sha256_prefix":"6ba8cee9f5daea41","entry":"pair","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"6ba8cee9f5daea41"}},{"code_sha256_prefix":"6cc5ed3b37c68d9d","entry":"pil_loader","repo":"ShoufaChen/CycleMLP","repo_kind":"official","path":"mcloader/mcloader.py","file_url":"https://github.com/ShoufaChen/CycleMLP/blob/HEAD/mcloader/mcloader.py","link_basis":"plan_row","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":"6cc5ed3b37c68d9d"}},{"code_sha256_prefix":"a58aae0835a61b41","entry":"CycleMLP","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.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":"a58aae0835a61b41"}},{"code_sha256_prefix":"e8703140c0494e82","entry":"CycleMLP_Block","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.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":"e8703140c0494e82"}},{"code_sha256_prefix":"20a854cf90927d91","entry":"Stage","repo":"Ahmad-Omar-Ahsan/CycleMLP","repo_kind":"listed","path":"models/cycle_mlp.py","file_url":"https://github.com/Ahmad-Omar-Ahsan/CycleMLP/blob/HEAD/models/cycle_mlp.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":"20a854cf90927d91"}},{"code_sha256_prefix":"f679822e5f5f467c","entry":"basic_blocks","repo":"ShoufaChen/CycleMLP","repo_kind":"official","path":"cycle_mlp.py","file_url":"https://github.com/ShoufaChen/CycleMLP/blob/HEAD/cycle_mlp.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":"f679822e5f5f467c"}},{"code_sha256_prefix":"3bc74137ab36aa79","entry":"build_transform","repo":"ShoufaChen/CycleMLP","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/ShoufaChen/CycleMLP/blob/HEAD/datasets.py","link_basis":"harvester_set","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":"3bc74137ab36aa79"}},{"code_sha256_prefix":"2a2617c52f0e6b56","entry":"sfc_flop_jit","repo":"ShoufaChen/CycleMLP","repo_kind":"official","path":"utils.py","file_url":"https://github.com/ShoufaChen/CycleMLP/blob/HEAD/utils.py","link_basis":"plan_row","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":"2a2617c52f0e6b56"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}