{"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/non-vacuous-generalization-bounds-at-the","title":"Non-Vacuous Generalization Bounds at the ImageNet Scale: A PAC-Bayesian Compression Approach","arxiv_id":"1804.05862","date":"2018-04-16","proceeding":"ICLR 2019 5","authors":["Wenda Zhou","Victor Veitch","Morgane Austern","Ryan P. Adams","Peter Orbanz"],"abstract":"Modern neural networks are highly overparameterized, with capacity to\nsubstantially overfit to training data. Nevertheless, these networks often\ngeneralize well in practice. It has also been observed that trained networks\ncan often be \"compressed\" to much smaller representations. The purpose of this\npaper is to connect these two empirical observations. Our main technical result\nis a generalization bound for compressed networks based on the compressed size.\nCombined with off-the-shelf compression algorithms, the bound leads to state of\nthe art generalization guarantees; in particular, we provide the first\nnon-vacuous generalization guarantees for realistic architectures applied to\nthe ImageNet classification problem. As additional evidence connecting\ncompression and generalization, we show that compressibility of models that\ntend to overfit is limited: We establish an absolute limit on expected\ncompressibility as a function of expected generalization error, where the\nexpectations are over the random choice of training examples. The bounds are\ncomplemented by empirical results that show an increase in overfitting implies\nan increase in the number of bits required to describe a trained network.","url_abs":"http://arxiv.org/abs/1804.05862v3","url_pdf":"http://arxiv.org/pdf/1804.05862v3.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":"non-vacuous-generalization-bounds-at-the","repo_url":"https://github.com/wendazhou/nnet-compression-generalization","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"generalization-bounds","task_name":"Generalization Bounds"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1804.05862","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1804.05862"}},"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/wendazhou/nnet-compression-generalization","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":15},"by_repo_kind":{"official":{"samples":15,"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":"b381672c9093d9a2","entry":"apply_noise","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/weights_noise.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/weights_noise.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":"b381672c9093d9a2"}},{"code_sha256_prefix":"2101478dbafc6d87","entry":"compress_variable","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/coding.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/coding.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":"2101478dbafc6d87"}},{"code_sha256_prefix":"541c4775c6d38c8d","entry":"conv2d","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/models/layers.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/models/layers.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":"541c4775c6d38c8d"}},{"code_sha256_prefix":"d3ddbb49f3799d81","entry":"dense","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/models/layers.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/models/layers.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":"d3ddbb49f3799d81"}},{"code_sha256_prefix":"805d0df53909c45b","entry":"depthwise_conv2d","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/models/layers.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/models/layers.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":"805d0df53909c45b"}},{"code_sha256_prefix":"0762cbd6c131efd2","entry":"divergence_gains","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/bounds.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/bounds.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":"0762cbd6c131efd2"}},{"code_sha256_prefix":"fb7158160fe2bc4c","entry":"get_bits_for_index","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/coding.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/coding.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":"fb7158160fe2bc4c"}},{"code_sha256_prefix":"6dd0b27e22163eeb","entry":"get_index_list","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/coding.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/coding.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":"6dd0b27e22163eeb"}},{"code_sha256_prefix":"1e6a6fc9f23a0b38","entry":"get_variable_compression_summary","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/_utils.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/_utils.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":"1e6a6fc9f23a0b38"}},{"code_sha256_prefix":"6bd8759ef432fe94","entry":"get_variable_compression_summary","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/mnist.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/mnist.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":"6bd8759ef432fe94"}},{"code_sha256_prefix":"ded4b33f66d4a362","entry":"get_variable_summary","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/_utils.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/_utils.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":"ded4b33f66d4a362"}},{"code_sha256_prefix":"53ff94be1d2c857d","entry":"get_variable_summary","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/mnist.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/mnist.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":"53ff94be1d2c857d"}},{"code_sha256_prefix":"3095b0b49905d9e6","entry":"noisy_variable_getter","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/weights_noise.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/weights_noise.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":"3095b0b49905d9e6"}},{"code_sha256_prefix":"c3ed202dd1ee6bb9","entry":"normal_kl_divergence","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/bounds.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/bounds.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":"c3ed202dd1ee6bb9"}},{"code_sha256_prefix":"3aa9e30dabef31ec","entry":"normal_mixture_log_density","repo":"wendazhou/nnet-compression-generalization","repo_kind":"official","path":"nnet/compression/bounds.py","file_url":"https://github.com/wendazhou/nnet-compression-generalization/blob/HEAD/nnet/compression/bounds.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":"3aa9e30dabef31ec"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}