{"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/latency-aware-spatial-wise-dynamic-networks","title":"Latency-aware Spatial-wise Dynamic Networks","arxiv_id":"2210.06223","date":"2022-10-12","proceeding":null,"authors":["Yizeng Han","Zhihang Yuan","Yifan Pu","Chenhao Xue","Shiji Song","Guangyu Sun","Gao Huang"],"abstract":"Spatial-wise dynamic convolution has become a promising approach to improving the inference efficiency of deep networks. By allocating more computation to the most informative pixels, such an adaptive inference paradigm reduces the spatial redundancy in image features and saves a considerable amount of unnecessary computation. However, the theoretical efficiency achieved by previous methods can hardly translate into a realistic speedup, especially on the multi-core processors (e.g. GPUs). The key challenge is that the existing literature has only focused on designing algorithms with minimal computation, ignoring the fact that the practical latency can also be influenced by scheduling strategies and hardware properties. To bridge the gap between theoretical computation and practical efficiency, we propose a latency-aware spatial-wise dynamic network (LASNet), which performs coarse-grained spatially adaptive inference under the guidance of a novel latency prediction model. The latency prediction model can efficiently estimate the inference latency of dynamic networks by simultaneously considering algorithms, scheduling strategies, and hardware properties. We use the latency predictor to guide both the algorithm design and the scheduling optimization on various hardware platforms. Experiments on image classification, object detection and instance segmentation demonstrate that the proposed framework significantly improves the practical inference efficiency of deep networks. For example, the average latency of a ResNet-101 on the ImageNet validation set could be reduced by 36% and 46% on a server GPU (Nvidia Tesla-V100) and an edge device (Nvidia Jetson TX2 GPU) respectively without sacrificing the accuracy. Code is available at https://github.com/LeapLabTHU/LASNet.","url_abs":"https://arxiv.org/abs/2210.06223v1","url_pdf":"https://arxiv.org/pdf/2210.06223v1.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":"latency-aware-spatial-wise-dynamic-networks","repo_url":"https://github.com/leaplabthu/lasnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"latency-aware-spatial-wise-dynamic-networks","repo_url":"https://github.com/leaplabthu/laudnet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"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":"scheduling","task_name":"Scheduling"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"image-classification","task_name":"image-classification"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.06223","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.06223"}},"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":"deterministic:regex_extraction","url":"https://github.com/LeapLabTHU/LASNet","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leaplabthu/laudnet","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leaplabthu/lasnet","reach":{"status":"ok"}}],"summary":{"ran":3,"ran_draft_wrong":2},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1},"listed":{"samples":2,"ran":2,"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":5,"samples":[{"code_sha256_prefix":"8048294bd9458d33","entry":"ExpandMask","repo":"leaplabthu/lasnet","repo_kind":"official","path":"imagenet_classification/models/dyn_regnet.py","file_url":"https://github.com/leaplabthu/lasnet/blob/HEAD/imagenet_classification/models/dyn_regnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8048294bd9458d33"}},{"code_sha256_prefix":"ea3b08aad6d4debc","entry":"Masker","repo":"leaplabthu/lasnet","repo_kind":"official","path":"imagenet_classification/models/dyn_regnet.py","file_url":"https://github.com/leaplabthu/lasnet/blob/HEAD/imagenet_classification/models/dyn_regnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ea3b08aad6d4debc"}},{"code_sha256_prefix":"f18eaaece7f0ee12","entry":"Masker_spatial","repo":"leaplabthu/laudnet","repo_kind":"listed","path":"imagenet_classification/models/utils.py","file_url":"https://github.com/leaplabthu/laudnet/blob/HEAD/imagenet_classification/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f18eaaece7f0ee12"}},{"code_sha256_prefix":"a709d613d6c8ba15","entry":"conv1x1","repo":"leaplabthu/laudnet","repo_kind":"listed","path":"imagenet_classification/models/utils.py","file_url":"https://github.com/leaplabthu/laudnet/blob/HEAD/imagenet_classification/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a709d613d6c8ba15"}},{"code_sha256_prefix":"9208c344d230ce4c","entry":"conv1x1","repo":"leaplabthu/lasnet","repo_kind":"official","path":"imagenet_classification/models/dyn_regnet.py","file_url":"https://github.com/leaplabthu/lasnet/blob/HEAD/imagenet_classification/models/dyn_regnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9208c344d230ce4c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}