{"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/mean-teachers-are-better-role-models-weight","title":"Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results","arxiv_id":"1703.01780","date":"2017-03-06","proceeding":"NeurIPS 2017 12","authors":["Antti Tarvainen","Harri Valpola"],"abstract":"The recently proposed Temporal Ensembling has achieved state-of-the-art\nresults in several semi-supervised learning benchmarks. It maintains an\nexponential moving average of label predictions on each training example, and\npenalizes predictions that are inconsistent with this target. However, because\nthe targets change only once per epoch, Temporal Ensembling becomes unwieldy\nwhen learning large datasets. To overcome this problem, we propose Mean\nTeacher, a method that averages model weights instead of label predictions. As\nan additional benefit, Mean Teacher improves test accuracy and enables training\nwith fewer labels than Temporal Ensembling. Without changing the network\narchitecture, Mean Teacher achieves an error rate of 4.35% on SVHN with 250\nlabels, outperforming Temporal Ensembling trained with 1000 labels. We also\nshow that a good network architecture is crucial to performance. Combining Mean\nTeacher and Residual Networks, we improve the state of the art on CIFAR-10 with\n4000 labels from 10.55% to 6.28%, and on ImageNet 2012 with 10% of the labels\nfrom 35.24% to 9.11%.","url_abs":"http://arxiv.org/abs/1703.01780v6","url_pdf":"http://arxiv.org/pdf/1703.01780v6.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":"mean-teachers-are-better-role-models-weight","repo_url":"https://github.com/CuriousAI/mean-teacher","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"mean-teachers-are-better-role-models-weight","repo_url":"https://github.com/INK-USC/DualRE","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mean-teachers-are-better-role-models-weight","repo_url":"https://github.com/Lan1991Xu/ONE_NeurIPS2018","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"mean-teachers-are-better-role-models-weight","repo_url":"https://github.com/ZHKKKe/PixelSSL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mean-teachers-are-better-role-models-weight","repo_url":"https://github.com/benathi/fastswa-semi-sup","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mean-teachers-are-better-role-models-weight","repo_url":"https://github.com/liuwei16/ALFNet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"mean-teachers-are-better-role-models-weight","repo_url":"https://github.com/shunk031/chainer-MeanTeachers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"mean-teachers-are-better-role-models-weight","repo_url":"https://github.com/sud0301/semisup-semseg","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"semi-supervised-image-classification","task_name":"Semi-Supervised Image Classification"},{"task_slug":"semi-supervised-rgbd-semantic-segmentation","task_name":"Semi-Supervised RGBD Semantic Segmentation"},{"task_slug":"semi-supervised-semantic-segmentation","task_name":"Semi-Supervised Semantic Segmentation"},{"task_slug":"source-free-object-detection","task_name":"Source Free Object Detection"}],"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":"convolution","method_name":"Convolution"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"grouped-convolution","method_name":"Grouped Convolution"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"resnext","method_name":"ResNeXt"},{"method_slug":"resnext-block","method_name":"ResNeXt Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-6","task":"Semi-Supervised Image Classification","dataset":"CIFAR-10, 250 Labels","model":"MeanTeacher","rank_in_archive_order":25,"of":27,"metrics":{"Percentage error":"47.32"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar","task":"Semi-Supervised Image Classification","dataset":"CIFAR-10, 4000 Labels","model":"Mean Teacher","rank_in_archive_order":31,"of":49,"metrics":{"Percentage error":"6.28"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-2","task":"Semi-Supervised Image Classification","dataset":"ImageNet - 10% labeled data","model":"Mean Teacher (ResNeXt-152)","rank_in_archive_order":51,"of":75,"metrics":{"Top 5 Accuracy":"90.89%"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-svhn","task":"Semi-Supervised Image Classification","dataset":"SVHN, 1000 labels","model":"Mean Teacher","rank_in_archive_order":13,"of":17,"metrics":{"Accuracy":"96.05"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-svhn-1","task":"Semi-Supervised Image Classification","dataset":"SVHN, 250 Labels","model":"MeanTeacher","rank_in_archive_order":11,"of":15,"metrics":{"Accuracy":"93.55"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-semantic-segmentation-on-23","task":"Semi-Supervised Semantic Segmentation","dataset":"ScribbleKITTI","model":"MeanTeacher (Voxel)","rank_in_archive_order":2,"of":9,"metrics":{"mIoU (1% Labels)":"41.0","mIoU (10% Labels)":"50.1","mIoU (20% Labels)":"52.8","mIoU (50% Labels)":"53.9"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-semantic-segmentation-on-23","task":"Semi-Supervised Semantic Segmentation","dataset":"ScribbleKITTI","model":"MeanTeacher (Range View)","rank_in_archive_order":7,"of":9,"metrics":{"mIoU (1% Labels)":"34.2","mIoU (10% Labels)":"49.8","mIoU (20% Labels)":"51.6","mIoU (50% Labels)":"53.3"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-semantic-segmentation-on-24","task":"Semi-Supervised Semantic Segmentation","dataset":"SemanticKITTI","model":"MeanTeacher (Voxel)","rank_in_archive_order":7,"of":12,"metrics":{"mIoU (1% Labels)":"45.4","mIoU (10% Labels)":"57.1","mIoU (20% Labels)":"59.2","mIoU (50% Labels)":"60.0"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-semantic-segmentation-on-24","task":"Semi-Supervised Semantic Segmentation","dataset":"SemanticKITTI","model":"MeanTeacher (Range View)","rank_in_archive_order":10,"of":12,"metrics":{"mIoU (1% Labels)":"37.5","mIoU (10% Labels)":"53.1","mIoU (20% Labels)":"56.1","mIoU (50% Labels)":"57.4"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-semantic-segmentation-on-25","task":"Semi-Supervised Semantic Segmentation","dataset":"nuScenes","model":"MeanTeacher (Voxel)","rank_in_archive_order":4,"of":11,"metrics":{"mIoU (1% Labels)":"51.6","mIoU (10% Labels)":"66.0","mIoU (20% Labels)":"67.1","mIoU (50% Labels)":"71.7"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-semantic-segmentation-on-25","task":"Semi-Supervised Semantic Segmentation","dataset":"nuScenes","model":"MeanTeacher (Range View)","rank_in_archive_order":8,"of":11,"metrics":{"mIoU (1% Labels)":"42.1","mIoU (10% Labels)":"60.4","mIoU (20% Labels)":"65.4","mIoU (50% Labels)":"69.4"},"uses_additional_data":false},{"leaderboard":"/sota/source-free-object-detection-on-cityscapes-to","task":"Source Free Object Detection","dataset":"Cityscapes to Foggy Cityscapes","model":"MT","rank_in_archive_order":11,"of":13,"metrics":{"AP50":"34.3"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/1703.01780","atlas_url":"https://app.syntology.ai/?focus=1703.01780","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1703.01780"}},"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/sud0301/semisup-semseg","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/INK-USC/DualRE","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shunk031/chainer-MeanTeachers","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/liuwei16/ALFNet","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/benathi/fastswa-semi-sup","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/CuriousAI/mean-teacher","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Lan1991Xu/ONE_NeurIPS2018","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ZHKKKe/PixelSSL","reach":null}],"summary":{"ran_fixture":4,"ran_honours":2},"by_repo_kind":{"listed":{"samples":3,"ran":3,"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":6,"samples":[{"code_sha256_prefix":"fddaf151399b812a","entry":"accuracy","repo":"sud0301/semisup-semseg","repo_kind":"listed","path":"train_mlmt.py","file_url":"https://github.com/sud0301/semisup-semseg/blob/HEAD/train_mlmt.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":"fddaf151399b812a"}},{"code_sha256_prefix":"fcbd501f30a007d4","entry":"color_map","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"fcbd501f30a007d4"}},{"code_sha256_prefix":"f9bfc647f202a8e0","entry":"cosine_loss","repo":"sud0301/semisup-semseg","repo_kind":"listed","path":"train_mlmt.py","file_url":"https://github.com/sud0301/semisup-semseg/blob/HEAD/train_mlmt.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":"f9bfc647f202a8e0"}},{"code_sha256_prefix":"799a094d0124a46c","entry":"get_label_vector","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"799a094d0124a46c"}},{"code_sha256_prefix":"b3b7c1c716f4ca66","entry":"lr_poly","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"b3b7c1c716f4ca66"}},{"code_sha256_prefix":"3d0fa6038b78822c","entry":"one_hot","repo":"sud0301/semisup-semseg","repo_kind":"listed","path":"train_s4GAN.py","file_url":"https://github.com/sud0301/semisup-semseg/blob/HEAD/train_s4GAN.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3d0fa6038b78822c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}