{"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/on-large-batch-training-for-deep-learning","title":"On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima","arxiv_id":"1609.04836","date":"2016-09-15","proceeding":null,"authors":["Nitish Shirish Keskar","Dheevatsa Mudigere","Jorge Nocedal","Mikhail Smelyanskiy","Ping Tak Peter Tang"],"abstract":"The stochastic gradient descent (SGD) method and its variants are algorithms\nof choice for many Deep Learning tasks. These methods operate in a small-batch\nregime wherein a fraction of the training data, say $32$-$512$ data points, is\nsampled to compute an approximation to the gradient. It has been observed in\npractice that when using a larger batch there is a degradation in the quality\nof the model, as measured by its ability to generalize. We investigate the\ncause for this generalization drop in the large-batch regime and present\nnumerical evidence that supports the view that large-batch methods tend to\nconverge to sharp minimizers of the training and testing functions - and as is\nwell known, sharp minima lead to poorer generalization. In contrast,\nsmall-batch methods consistently converge to flat minimizers, and our\nexperiments support a commonly held view that this is due to the inherent noise\nin the gradient estimation. We discuss several strategies to attempt to help\nlarge-batch methods eliminate this generalization gap.","url_abs":"http://arxiv.org/abs/1609.04836v2","url_pdf":"http://arxiv.org/pdf/1609.04836v2.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":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/keskarnitish/large-batch-training","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/AlessandroRestagno/Capstone-Project-SDC-Term3-P3-Udacity","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/ChloeL19/CNN-pset","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/anonwhymoos/connectivity","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}},{"paper_slug":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/bedssys/Bedssys","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/framartin/lgv-geometric-transferability","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/nikhil-iyer-97/wide-minima-density-hypothesis","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/stuarteiffert/RNN-for-Human-Activity-Recognition-using-2D-Pose-Input","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"on-large-batch-training-for-deep-learning","repo_url":"https://github.com/wenwei202/smoothout","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1609.04836","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1609.04836"}},"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/framartin/lgv-geometric-transferability","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ChloeL19/CNN-pset","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/stuarteiffert/RNN-for-Human-Activity-Recognition-using-2D-Pose-Input","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wenwei202/smoothout","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/anonwhymoos/connectivity","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/keskarnitish/large-batch-training","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nikhil-iyer-97/wide-minima-density-hypothesis","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bedssys/Bedssys","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/AlessandroRestagno/Capstone-Project-SDC-Term3-P3-Udacity","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":4,"ran_draft_wrong":1,"ran":1,"unverified":10},"by_repo_kind":{"official":{"samples":3,"ran":1,"repositories":1},"listed":{"samples":13,"ran":5,"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":"ff92ad8f00e93bbc","entry":"IOU","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/gen_anchors.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/gen_anchors.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ff92ad8f00e93bbc"}},{"code_sha256_prefix":"1a3fa3dda9a8b100","entry":"avg_IOU","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/gen_anchors.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/gen_anchors.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1a3fa3dda9a8b100"}},{"code_sha256_prefix":"78d482d2a7373f3c","entry":"c_array","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/darknet.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/darknet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"78d482d2a7373f3c"}},{"code_sha256_prefix":"ac62432dc5134b0d","entry":"make_layers","repo":"keskarnitish/large-batch-training","repo_kind":"official","path":"PyTorch/vgg.py","file_url":"https://github.com/keskarnitish/large-batch-training/blob/HEAD/PyTorch/vgg.py","link_basis":"harvester_set","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":"ac62432dc5134b0d"}},{"code_sha256_prefix":"9bca95aee23d1241","entry":"sample","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/darknet.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/darknet.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9bca95aee23d1241"}},{"code_sha256_prefix":"95c31c78be42f723","entry":"voc_ap","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/voc_eval_py3.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/voc_eval_py3.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"95c31c78be42f723"}},{"code_sha256_prefix":"410aa729a6034293","entry":"convertBack","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/darknet_video.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/darknet_video.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"410aa729a6034293"}},{"code_sha256_prefix":"0c143d1141be03d4","entry":"cvDrawBoxes","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/darknet_video.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/darknet_video.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0c143d1141be03d4"}},{"code_sha256_prefix":"79910d76d3273883","entry":"get_voc_results_file_template","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/reval_voc_py3.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/reval_voc_py3.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"79910d76d3273883"}},{"code_sha256_prefix":"b78a5e60fc79a562","entry":"network_width","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/darknet.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/darknet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b78a5e60fc79a562"}},{"code_sha256_prefix":"f58e7859fdb905b4","entry":"parse_rec","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/voc_eval_py3.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/voc_eval_py3.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f58e7859fdb905b4"}},{"code_sha256_prefix":"feedb4ca621a0244","entry":"round_int","repo":"bedssys/Bedssys","repo_kind":"listed","path":"image_pose.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/image_pose.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"feedb4ca621a0244"}},{"code_sha256_prefix":"42754302076e329d","entry":"vgg11","repo":"keskarnitish/large-batch-training","repo_kind":"official","path":"PyTorch/vgg.py","file_url":"https://github.com/keskarnitish/large-batch-training/blob/HEAD/PyTorch/vgg.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":"42754302076e329d"}},{"code_sha256_prefix":"2ad86edffbcbccba","entry":"vgg13","repo":"keskarnitish/large-batch-training","repo_kind":"official","path":"PyTorch/vgg.py","file_url":"https://github.com/keskarnitish/large-batch-training/blob/HEAD/PyTorch/vgg.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":"2ad86edffbcbccba"}},{"code_sha256_prefix":"5516237bb80c2b46","entry":"voc_eval","repo":"bedssys/Bedssys","repo_kind":"listed","path":"darknet/voc_eval_py3.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/darknet/voc_eval_py3.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5516237bb80c2b46"}},{"code_sha256_prefix":"9535d0a6fc7fd153","entry":"write_coco_json","repo":"bedssys/Bedssys","repo_kind":"listed","path":"image_pose.py","file_url":"https://github.com/bedssys/Bedssys/blob/HEAD/image_pose.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9535d0a6fc7fd153"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}