{"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/knapsack-pruning-with-inner-distillation","title":"Knapsack Pruning with Inner Distillation","arxiv_id":"2002.08258","date":"2020-02-19","proceeding":null,"authors":["Yonathan Aflalo","Asaf Noy","Ming Lin","Itamar Friedman","Lihi Zelnik"],"abstract":"Neural network pruning reduces the computational cost of an over-parameterized network to improve its efficiency. Popular methods vary from $\\ell_1$-norm sparsification to Neural Architecture Search (NAS). In this work, we propose a novel pruning method that optimizes the final accuracy of the pruned network and distills knowledge from the over-parameterized parent network's inner layers. To enable this approach, we formulate the network pruning as a Knapsack Problem which optimizes the trade-off between the importance of neurons and their associated computational cost. Then we prune the network channels while maintaining the high-level structure of the network. The pruned network is fine-tuned under the supervision of the parent network using its inner network knowledge, a technique we refer to as the Inner Knowledge Distillation. Our method leads to state-of-the-art pruning results on ImageNet, CIFAR-10 and CIFAR-100 using ResNet backbones. To prune complex network structures such as convolutions with skip-links and depth-wise convolutions, we propose a block grouping approach to cope with these structures. Through this we produce compact architectures with the same FLOPs as EfficientNet-B0 and MobileNetV3 but with higher accuracy, by $1\\%$ and $0.3\\%$ respectively on ImageNet, and faster runtime on GPU.","url_abs":"https://arxiv.org/abs/2002.08258v3","url_pdf":"https://arxiv.org/pdf/2002.08258v3.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":"knapsack-pruning-with-inner-distillation","repo_url":"https://github.com/yoniaflalo/knapsack_pruning","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":"network-pruning","task_name":"Network Pruning"},{"task_slug":"architecture-search","task_name":"Neural Architecture Search"}],"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":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"knowledge-distillation","method_name":"Knowledge Distillation"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"pruning","method_name":"Pruning"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/network-pruning-on-imagenet","task":"Network Pruning","dataset":"ImageNet","model":"ResNet50 2.5 GFLOPS","rank_in_archive_order":3,"of":16,"metrics":{"Accuracy":"78.0","GFLOPs":"2.5"},"uses_additional_data":false},{"leaderboard":"/sota/network-pruning-on-imagenet","task":"Network Pruning","dataset":"ImageNet","model":"ResNet50 2.0 GFLOPS","rank_in_archive_order":5,"of":16,"metrics":{"Accuracy":"77.70","GFLOPs":"2"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.08258","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.08258"}},"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/yoniaflalo/knapsack_pruning","reach":null}],"summary":{"ran_draft_wrong":3},"by_repo_kind":{"official":{"samples":3,"ran":3,"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":"3f24b14f913cebed","entry":"extract_conv_layers","repo":"yoniaflalo/knapsack_pruning","repo_kind":"official","path":"external/utils_pruning.py","file_url":"https://github.com/yoniaflalo/knapsack_pruning/blob/HEAD/external/utils_pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3f24b14f913cebed"}},{"code_sha256_prefix":"c8a06e6ec83e9e27","entry":"extract_layer","repo":"yoniaflalo/knapsack_pruning","repo_kind":"official","path":"external/utils_pruning.py","file_url":"https://github.com/yoniaflalo/knapsack_pruning/blob/HEAD/external/utils_pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c8a06e6ec83e9e27"}},{"code_sha256_prefix":"9e0ce49dce5bd330","entry":"extract_layers","repo":"yoniaflalo/knapsack_pruning","repo_kind":"official","path":"external/utils_pruning.py","file_url":"https://github.com/yoniaflalo/knapsack_pruning/blob/HEAD/external/utils_pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9e0ce49dce5bd330"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}