{"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/edgevits-competing-light-weight-cnns-on","title":"EdgeViTs: Competing Light-weight CNNs on Mobile Devices with Vision Transformers","arxiv_id":"2205.03436","date":"2022-05-06","proceeding":null,"authors":["Junting Pan","Adrian Bulat","Fuwen Tan","Xiatian Zhu","Lukasz Dudziak","Hongsheng Li","Georgios Tzimiropoulos","Brais Martinez"],"abstract":"Self-attention based models such as vision transformers (ViTs) have emerged as a very competitive architecture alternative to convolutional neural networks (CNNs) in computer vision. Despite increasingly stronger variants with ever-higher recognition accuracies, due to the quadratic complexity of self-attention, existing ViTs are typically demanding in computation and model size. Although several successful design choices (e.g., the convolutions and hierarchical multi-stage structure) of prior CNNs have been reintroduced into recent ViTs, they are still not sufficient to meet the limited resource requirements of mobile devices. This motivates a very recent attempt to develop light ViTs based on the state-of-the-art MobileNet-v2, but still leaves a performance gap behind. In this work, pushing further along this under-studied direction we introduce EdgeViTs, a new family of light-weight ViTs that, for the first time, enable attention-based vision models to compete with the best light-weight CNNs in the tradeoff between accuracy and on-device efficiency. This is realized by introducing a highly cost-effective local-global-local (LGL) information exchange bottleneck based on optimal integration of self-attention and convolutions. For device-dedicated evaluation, rather than relying on inaccurate proxies like the number of FLOPs or parameters, we adopt a practical approach of focusing directly on on-device latency and, for the first time, energy efficiency. Specifically, we show that our models are Pareto-optimal when both accuracy-latency and accuracy-energy trade-offs are considered, achieving strict dominance over other ViTs in almost all cases and competing with the most efficient CNNs. Code is available at https://github.com/saic-fi/edgevit.","url_abs":"https://arxiv.org/abs/2205.03436v2","url_pdf":"https://arxiv.org/pdf/2205.03436v2.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":"edgevits-competing-light-weight-cnns-on","repo_url":"https://github.com/saic-fi/edgevit","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"edgevits-competing-light-weight-cnns-on","repo_url":"https://gitlab.com/birder/birder","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2205.03436","atlas_url":"https://app.syntology.ai/?focus=2205.03436","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.03436"}},"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/saic-fi/edgevit","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://gitlab.com/birder/birder","reach":null}],"summary":{"ran":5,"unverified":2},"by_repo_kind":{"official":{"samples":7,"ran":5,"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":"0e0efb67773d6946","entry":"CMlp","repo":"saic-fi/edgevit","repo_kind":"official","path":"src/edgevit.py","file_url":"https://github.com/saic-fi/edgevit/blob/HEAD/src/edgevit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0e0efb67773d6946"}},{"code_sha256_prefix":"2264d964e0e33088","entry":"GlobalSparseAttn","repo":"saic-fi/edgevit","repo_kind":"official","path":"src/edgevit.py","file_url":"https://github.com/saic-fi/edgevit/blob/HEAD/src/edgevit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2264d964e0e33088"}},{"code_sha256_prefix":"fc1714448b57db3f","entry":"LocalAgg","repo":"saic-fi/edgevit","repo_kind":"official","path":"src/edgevit.py","file_url":"https://github.com/saic-fi/edgevit/blob/HEAD/src/edgevit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fc1714448b57db3f"}},{"code_sha256_prefix":"4c61832d00a1f67e","entry":"PatchEmbed","repo":"saic-fi/edgevit","repo_kind":"official","path":"src/edgevit.py","file_url":"https://github.com/saic-fi/edgevit/blob/HEAD/src/edgevit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4c61832d00a1f67e"}},{"code_sha256_prefix":"46770153eac4b9bd","entry":"SelfAttn","repo":"saic-fi/edgevit","repo_kind":"official","path":"src/edgevit.py","file_url":"https://github.com/saic-fi/edgevit/blob/HEAD/src/edgevit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"46770153eac4b9bd"}},{"code_sha256_prefix":"be9371a9de0134d8","entry":"EdgeVit","repo":"saic-fi/edgevit","repo_kind":"official","path":"src/edgevit.py","file_url":"https://github.com/saic-fi/edgevit/blob/HEAD/src/edgevit.py","link_basis":"first_harvest_node","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":"be9371a9de0134d8"}},{"code_sha256_prefix":"13fc7365a0e761b2","entry":"LGLBlock","repo":"saic-fi/edgevit","repo_kind":"official","path":"src/edgevit.py","file_url":"https://github.com/saic-fi/edgevit/blob/HEAD/src/edgevit.py","link_basis":"first_harvest_node","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":"13fc7365a0e761b2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}