{"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/snapshot-ensembles-train-1-get-m-for-free","title":"Snapshot Ensembles: Train 1, get M for free","arxiv_id":"1704.00109","date":"2017-04-01","proceeding":null,"authors":["Gao Huang","Yixuan Li","Geoff Pleiss","Zhuang Liu","John E. Hopcroft","Kilian Q. Weinberger"],"abstract":"Ensembles of neural networks are known to be much more robust and accurate\nthan individual networks. However, training multiple deep networks for model\naveraging is computationally expensive. In this paper, we propose a method to\nobtain the seemingly contradictory goal of ensembling multiple neural networks\nat no additional training cost. We achieve this goal by training a single\nneural network, converging to several local minima along its optimization path\nand saving the model parameters. To obtain repeated rapid convergence, we\nleverage recent work on cyclic learning rate schedules. The resulting\ntechnique, which we refer to as Snapshot Ensembling, is simple, yet\nsurprisingly effective. We show in a series of experiments that our approach is\ncompatible with diverse network architectures and learning tasks. It\nconsistently yields lower error rates than state-of-the-art single models at no\nadditional training cost, and compares favorably with traditional network\nensembles. On CIFAR-10 and CIFAR-100 our DenseNet Snapshot Ensembles obtain\nerror rates of 3.4% and 17.4% respectively.","url_abs":"http://arxiv.org/abs/1704.00109v1","url_pdf":"http://arxiv.org/pdf/1704.00109v1.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":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/gaohuang/SnapshotEnsemble","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"torch","reach":{"status":"unanswered"}},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/Alishaba/pykeen-snapshot-ensembles","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/PatriciaRodrigues1994/pytorch-facebook-udacity-challenge","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/Rawash/theD-Challange-CIFAR-100","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/greyhound101/IEEE-CIS-Fraud","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/mandubian/snapshot_ensembles","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/sauravmishra1710/Malaria-Detection-Using-Deep-Learning-Techniques","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/simon-larsson/keras-swa","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/xuyxu/Ensemble-Pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/yell/kaggle-camera","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"snapshot-ensembles-train-1-get-m-for-free","repo_url":"https://github.com/ENSTA-U2IS-AI/torch-uncertainty","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"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":"concatenated-skip-connection","method_name":"Concatenated Skip Connection"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-block","method_name":"Dense Block"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"snapshot-ensembles","method_name":"Snapshot Ensembles"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[{"slug":"snapshot-ensembles","name":"Snapshot Ensembles","full_name":"Snapshot Ensembles: Train 1, get M for free"}],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1704.00109","atlas_url":"https://app.syntology.ai/?focus=1704.00109","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1704.00109"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/ENSTA-U2IS-AI/torch-uncertainty","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/greyhound101/IEEE-CIS-Fraud","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PatriciaRodrigues1994/pytorch-facebook-udacity-challenge","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yell/kaggle-camera","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Alishaba/pykeen-snapshot-ensembles","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gaohuang/SnapshotEnsemble","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xuyxu/Ensemble-Pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sauravmishra1710/Malaria-Detection-Using-Deep-Learning-Techniques","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/simon-larsson/keras-swa","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mandubian/snapshot_ensembles","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Rawash/theD-Challange-CIFAR-100","reach":{"status":"unanswered"}}],"summary":{"ran_draft_wrong":1},"by_repo_kind":{"listed":{"samples":1,"ran":1,"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":"61764525b2a7c89d","entry":"create_swa_callback_class","repo":"simon-larsson/keras-swa","repo_kind":"listed","path":"swa/callback.py","file_url":"https://github.com/simon-larsson/keras-swa/blob/HEAD/swa/callback.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61764525b2a7c89d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}