{"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/compressing-neural-networks-towards","title":"Compressing Neural Networks: Towards Determining the Optimal Layer-wise Decomposition","arxiv_id":"2107.11442","date":"2021-07-23","proceeding":"NeurIPS 2021 12","authors":["Lucas Liebenwein","Alaa Maalouf","Oren Gal","Dan Feldman","Daniela Rus"],"abstract":"We present a novel global compression framework for deep neural networks that automatically analyzes each layer to identify the optimal per-layer compression ratio, while simultaneously achieving the desired overall compression. Our algorithm hinges on the idea of compressing each convolutional (or fully-connected) layer by slicing its channels into multiple groups and decomposing each group via low-rank decomposition. At the core of our algorithm is the derivation of layer-wise error bounds from the Eckart Young Mirsky theorem. We then leverage these bounds to frame the compression problem as an optimization problem where we wish to minimize the maximum compression error across layers and propose an efficient algorithm towards a solution. Our experiments indicate that our method outperforms existing low-rank compression approaches across a wide range of networks and data sets. We believe that our results open up new avenues for future research into the global performance-size trade-offs of modern neural networks. Our code is available at https://github.com/lucaslie/torchprune.","url_abs":"https://arxiv.org/abs/2107.11442v2","url_pdf":"https://arxiv.org/pdf/2107.11442v2.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":"compressing-neural-networks-towards","repo_url":"https://github.com/lucaslie/torchprune","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"compressing-neural-networks-towards","repo_url":"https://github.com/lucaslie/provable_pruning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"low-rank-compression","task_name":"Low-rank compression"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2107.11442","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.11442"}},"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/lucaslie/torchprune","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucaslie/provable_pruning","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":12},"by_repo_kind":{"official":{"samples":3,"ran":0,"repositories":1},"listed":{"samples":9,"ran":0,"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":"cd21fa496ee07f67","entry":"flatten_all_but_last","repo":"lucaslie/torchprune","repo_kind":"official","path":"src/torchprune/torchprune/util/tensor.py","file_url":"https://github.com/lucaslie/torchprune/blob/HEAD/src/torchprune/torchprune/util/tensor.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":"cd21fa496ee07f67"}},{"code_sha256_prefix":"ef4646720ee554c1","entry":"gather_images","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/lost/script/eps_ball.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/lost/script/eps_ball.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":"ef4646720ee554c1"}},{"code_sha256_prefix":"5aa7e295104184ca","entry":"generate_noisy_images","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/lost/script/eps_ball.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/lost/script/eps_ball.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":"5aa7e295104184ca"}},{"code_sha256_prefix":"e7aaec08393471a8","entry":"get_fig_name","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/alds/script/retrain_sweep.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/alds/script/retrain_sweep.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":"e7aaec08393471a8"}},{"code_sha256_prefix":"32d86e992080431c","entry":"get_fig_name","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/lost/script/generalization.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/lost/script/generalization.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":"32d86e992080431c"}},{"code_sha256_prefix":"8c4b0db81d1e76cd","entry":"get_mesh","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/node/script/plots2d.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/node/script/plots2d.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":"8c4b0db81d1e76cd"}},{"code_sha256_prefix":"fec5d06c6e4059e2","entry":"get_slice","repo":"lucaslie/torchprune","repo_kind":"official","path":"src/torchprune/torchprune/util/tensor.py","file_url":"https://github.com/lucaslie/torchprune/blob/HEAD/src/torchprune/torchprune/util/tensor.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":"fec5d06c6e4059e2"}},{"code_sha256_prefix":"4ba3c7ec40d48b25","entry":"key_files","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/alds/script/results_viewer.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/alds/script/results_viewer.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":"4ba3c7ec40d48b25"}},{"code_sha256_prefix":"ef6a9bde1b92ea8d","entry":"key_files","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/alds/script/retrain_sweep.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/alds/script/retrain_sweep.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":"ef6a9bde1b92ea8d"}},{"code_sha256_prefix":"8eec11df7c455a60","entry":"make_f_hat","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/lost/script/eps_ball.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/lost/script/eps_ball.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":"8eec11df7c455a60"}},{"code_sha256_prefix":"7257316eff0efa77","entry":"prepare_data","repo":"lucaslie/provable_pruning","repo_kind":"listed","path":"paper/node/script/plots2d.py","file_url":"https://github.com/lucaslie/provable_pruning/blob/HEAD/paper/node/script/plots2d.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":"7257316eff0efa77"}},{"code_sha256_prefix":"e32720b53dfa1acf","entry":"to","repo":"lucaslie/torchprune","repo_kind":"official","path":"src/torchprune/torchprune/util/tensor.py","file_url":"https://github.com/lucaslie/torchprune/blob/HEAD/src/torchprune/torchprune/util/tensor.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":"e32720b53dfa1acf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}