{"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/dynamic-convolutions-exploiting-spatial","title":"Dynamic Convolutions: Exploiting Spatial Sparsity for Faster Inference","arxiv_id":"1912.03203","date":"2019-12-06","proceeding":"CVPR 2020 6","authors":["Thomas Verelst","Tinne Tuytelaars"],"abstract":"Modern convolutional neural networks apply the same operations on every pixel in an image. However, not all image regions are equally important. To address this inefficiency, we propose a method to dynamically apply convolutions conditioned on the input image. We introduce a residual block where a small gating branch learns which spatial positions should be evaluated. These discrete gating decisions are trained end-to-end using the Gumbel-Softmax trick, in combination with a sparsity criterion. Our experiments on CIFAR, ImageNet and MPII show that our method has better focus on the region of interest and better accuracy than existing methods, at a lower computational complexity. Moreover, we provide an efficient CUDA implementation of our dynamic convolutions using a gather-scatter approach, achieving a significant improvement in inference speed with MobileNetV2 residual blocks. On human pose estimation, a task that is inherently spatially sparse, the processing speed is increased by 60% with no loss in accuracy.","url_abs":"https://arxiv.org/abs/1912.03203v3","url_pdf":"https://arxiv.org/pdf/1912.03203v3.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":"dynamic-convolutions-exploiting-spatial","repo_url":"https://github.com/thomasverelst/dynconv","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"pose-estimation","task_name":"Pose Estimation"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"depthwise-convolution","method_name":"Depthwise Convolution"},{"method_slug":"depthwise-separable-convolution","method_name":"Depthwise Separable Convolution"},{"method_slug":"inverted-residual-block","method_name":"Inverted Residual Block"},{"method_slug":"pointwise-convolution","method_name":"Pointwise Convolution"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1912.03203","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1912.03203"}},"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/thomasverelst/dynconv","reach":null}],"summary":{"ran_honours":1,"ran_draft_wrong":3,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"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":"f081fb1811a2565f","entry":"GET_BLOCKS","repo":"thomasverelst/dynconv","repo_kind":"official","path":"pose/lib/dynconv/cuda.py","file_url":"https://github.com/thomasverelst/dynconv/blob/HEAD/pose/lib/dynconv/cuda.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f081fb1811a2565f"}},{"code_sha256_prefix":"d6887c89a2aef7a0","entry":"conv1x1","repo":"thomasverelst/dynconv","repo_kind":"official","path":"classification/dynconv/layers.py","file_url":"https://github.com/thomasverelst/dynconv/blob/HEAD/classification/dynconv/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d6887c89a2aef7a0"}},{"code_sha256_prefix":"ad0171db14050868","entry":"conv3x3","repo":"thomasverelst/dynconv","repo_kind":"official","path":"classification/dynconv/layers.py","file_url":"https://github.com/thomasverelst/dynconv/blob/HEAD/classification/dynconv/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ad0171db14050868"}},{"code_sha256_prefix":"b52e66bf0720a6e9","entry":"conv3x3_dw","repo":"thomasverelst/dynconv","repo_kind":"official","path":"classification/dynconv/layers.py","file_url":"https://github.com/thomasverelst/dynconv/blob/HEAD/classification/dynconv/layers.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b52e66bf0720a6e9"}},{"code_sha256_prefix":"1e624f979ea53ae4","entry":"Dtype","repo":"thomasverelst/dynconv","repo_kind":"official","path":"pose/lib/dynconv/cuda.py","file_url":"https://github.com/thomasverelst/dynconv/blob/HEAD/pose/lib/dynconv/cuda.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":"1e624f979ea53ae4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}