{"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/precision-gating-improving-neural-network-1","title":"Precision Gating: Improving Neural Network Efficiency with Dynamic Dual-Precision Activations","arxiv_id":"2002.07136","date":"2020-02-17","proceeding":"ICLR 2020 1","authors":["Yichi Zhang","Ritchie Zhao","Weizhe Hua","Nayun Xu","G. Edward Suh","Zhiru Zhang"],"abstract":"We propose precision gating (PG), an end-to-end trainable dynamic dual-precision quantization technique for deep neural networks. PG computes most features in a low precision and only a small proportion of important features in a higher precision to preserve accuracy. The proposed approach is applicable to a variety of DNN architectures and significantly reduces the computational cost of DNN execution with almost no accuracy loss. Our experiments indicate that PG achieves excellent results on CNNs, including statically compressed mobile-friendly networks such as ShuffleNet. Compared to the state-of-the-art prediction-based quantization schemes, PG achieves the same or higher accuracy with 2.4$\\times$ less compute on ImageNet. PG furthermore applies to RNNs. Compared to 8-bit uniform quantization, PG obtains a 1.2% improvement in perplexity per word with 2.7$\\times$ computational cost reduction on LSTM on the Penn Tree Bank dataset. Code is available at: https://github.com/cornell-zhang/dnn-gating","url_abs":"https://arxiv.org/abs/2002.07136v2","url_pdf":"https://arxiv.org/pdf/2002.07136v2.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":"precision-gating-improving-neural-network-1","repo_url":"https://github.com/cornell-zhang/dnn-gating","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"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":"channel-shuffle","method_name":"Channel Shuffle"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"depthwise-convolution","method_name":"Depthwise Convolution"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"grouped-convolution","method_name":"Grouped Convolution"},{"method_slug":"groupwise-point-convolution","method_name":"Groupwise Point Convolution"},{"method_slug":"lstm","method_name":"LSTM"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"pointwise-convolution","method_name":"Pointwise Convolution"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"shufflenet","method_name":"ShuffleNet"},{"method_slug":"shufflenet-block","method_name":"ShuffleNet Block"},{"method_slug":"sigmoid-activation","method_name":"Sigmoid Activation"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"tanh-activation","method_name":"Tanh Activation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.07136","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.07136"}},"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/cornell-zhang/dnn-gating","reach":null}],"summary":{"ran":9,"unverified":2},"by_repo_kind":{"official":{"samples":11,"ran":9,"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":"3a4dabc50bed5ec4","entry":"Clamp","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3a4dabc50bed5ec4"}},{"code_sha256_prefix":"79d905dab5127a06","entry":"Floor","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"79d905dab5127a06"}},{"code_sha256_prefix":"c3da4fa92190d610","entry":"GreaterThan","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c3da4fa92190d610"}},{"code_sha256_prefix":"485e5f334e040599","entry":"PGConv2d","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"485e5f334e040599"}},{"code_sha256_prefix":"6d47a5d78601c488","entry":"Round","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6d47a5d78601c488"}},{"code_sha256_prefix":"e31dcb7b107eb117","entry":"SparseGreaterThan","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"e31dcb7b107eb117"}},{"code_sha256_prefix":"3aaece55f3d40d52","entry":"TorchBinarize","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3aaece55f3d40d52"}},{"code_sha256_prefix":"def5e6826bd88736","entry":"TorchQuantize","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"def5e6826bd88736"}},{"code_sha256_prefix":"a25443ef8bc781e7","entry":"TorchRoundToBits","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a25443ef8bc781e7"}},{"code_sha256_prefix":"13265ea7eba5f4a4","entry":"TorchTruncate","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"utils/pg_utils.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/utils/pg_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"13265ea7eba5f4a4"}},{"code_sha256_prefix":"ceb79d9355fccd93","entry":"generate_model","repo":"cornell-zhang/dnn-gating","repo_kind":"official","path":"pg-cifar10.py","file_url":"https://github.com/cornell-zhang/dnn-gating/blob/HEAD/pg-cifar10.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ceb79d9355fccd93"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}