{"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/learning-both-weights-and-connections-for","title":"Learning both Weights and Connections for Efficient Neural Networks","arxiv_id":"1506.02626","date":"2015-06-08","proceeding":"NeurIPS 2015","authors":["Song Han","Jeff Pool","John Tran","William J. Dally"],"abstract":"Neural networks are both computationally intensive and memory intensive,\nmaking them difficult to deploy on embedded systems. Also, conventional\nnetworks fix the architecture before training starts; as a result, training\ncannot improve the architecture. To address these limitations, we describe a\nmethod to reduce the storage and computation required by neural networks by an\norder of magnitude without affecting their accuracy by learning only the\nimportant connections. Our method prunes redundant connections using a\nthree-step method. First, we train the network to learn which connections are\nimportant. Next, we prune the unimportant connections. Finally, we retrain the\nnetwork to fine tune the weights of the remaining connections. On the ImageNet\ndataset, our method reduced the number of parameters of AlexNet by a factor of\n9x, from 61 million to 6.7 million, without incurring accuracy loss. Similar\nexperiments with VGG-16 found that the number of parameters can be reduced by\n13x, from 138 million to 10.3 million, again with no loss of accuracy.","url_abs":"http://arxiv.org/abs/1506.02626v3","url_pdf":"http://arxiv.org/pdf/1506.02626v3.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":"learning-both-weights-and-connections-for","repo_url":"https://github.com/ciodar/deep-compression","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"learning-both-weights-and-connections-for","repo_url":"https://github.com/lehduong/ginp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learning-both-weights-and-connections-for","repo_url":"https://github.com/lehduong/kesi","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learning-both-weights-and-connections-for","repo_url":"https://github.com/songhan/Deep-Compression-AlexNet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"caffe2","reach":{"status":"ok","spdx":"BSD-2-Clause"}},{"paper_slug":"learning-both-weights-and-connections-for","repo_url":"https://github.com/songhan/SqueezeNet-Deep-Compression","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"caffe2","reach":{"status":"unanswered"}},{"paper_slug":"learning-both-weights-and-connections-for","repo_url":"https://github.com/tomshalini/pruning_lenet300-100","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"learning-both-weights-and-connections-for","repo_url":"https://github.com/JoseVillagranE/Learning-Both-Weights-and-Connections-for-Efficient-NNs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"learning-both-weights-and-connections-for","repo_url":"https://github.com/intellabs/model-compression-research-package","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}}],"tasks":[],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"grouped-convolution","method_name":"Grouped Convolution"},{"method_slug":"local-response-normalization","method_name":"Local Response Normalization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1506.02626","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1506.02626"}},"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/songhan/SqueezeNet-Deep-Compression","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ciodar/deep-compression","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/intellabs/model-compression-research-package","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JoseVillagranE/Learning-Both-Weights-and-Connections-for-Efficient-NNs","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tomshalini/pruning_lenet300-100","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lehduong/ginp","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lehduong/kesi","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/songhan/Deep-Compression-AlexNet","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"summary":{"ran":3,"ran_fixture":2,"ran_honours":2,"unverified":1},"by_repo_kind":{"listed":{"samples":8,"ran":7,"repositories":3}},"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":3,"samples":[{"code_sha256_prefix":"cdf35d1cd84c892d","entry":"FineGrainedPruner","repo":"JoseVillagranE/Learning-Both-Weights-and-Connections-for-Efficient-NNs","repo_kind":"listed","path":"pruning.py","file_url":"https://github.com/JoseVillagranE/Learning-Both-Weights-and-Connections-for-Efficient-NNs/blob/HEAD/pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cdf35d1cd84c892d"}},{"code_sha256_prefix":"6564e1ebcafd6d0f","entry":"LinearWithAdjustableDropout","repo":"ciodar/deep-compression","repo_kind":"listed","path":"trainer/callbacks/pruning.py","file_url":"https://github.com/ciodar/deep-compression/blob/HEAD/trainer/callbacks/pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6564e1ebcafd6d0f"}},{"code_sha256_prefix":"f6511a3e3fdf9486","entry":"ThresholdPruning","repo":"ciodar/deep-compression","repo_kind":"listed","path":"trainer/callbacks/pruning.py","file_url":"https://github.com/ciodar/deep-compression/blob/HEAD/trainer/callbacks/pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f6511a3e3fdf9486"}},{"code_sha256_prefix":"57df211eb79a4f38","entry":"fine_grained_prune","repo":"JoseVillagranE/Learning-Both-Weights-and-Connections-for-Efficient-NNs","repo_kind":"listed","path":"pruning.py","file_url":"https://github.com/JoseVillagranE/Learning-Both-Weights-and-Connections-for-Efficient-NNs/blob/HEAD/pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"57df211eb79a4f38"}},{"code_sha256_prefix":"34f00aaf868661c9","entry":"get_pruned","repo":"ciodar/deep-compression","repo_kind":"listed","path":"trainer/callbacks/pruning.py","file_url":"https://github.com/ciodar/deep-compression/blob/HEAD/trainer/callbacks/pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"34f00aaf868661c9"}},{"code_sha256_prefix":"9def416438747df0","entry":"prune_weights","repo":"tomshalini/pruning_lenet300-100","repo_kind":"listed","path":"prune_model.py","file_url":"https://github.com/tomshalini/pruning_lenet300-100/blob/HEAD/prune_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9def416438747df0"}},{"code_sha256_prefix":"fe8133bc905d6833","entry":"sparsity_stats","repo":"ciodar/deep-compression","repo_kind":"listed","path":"trainer/callbacks/pruning.py","file_url":"https://github.com/ciodar/deep-compression/blob/HEAD/trainer/callbacks/pruning.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fe8133bc905d6833"}},{"code_sha256_prefix":"377845318c40391f","entry":"IterativePruning","repo":"ciodar/deep-compression","repo_kind":"listed","path":"trainer/callbacks/pruning.py","file_url":"https://github.com/ciodar/deep-compression/blob/HEAD/trainer/callbacks/pruning.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":"377845318c40391f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}