{"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/self-distillation-from-the-last-mini-batch","title":"Self-Distillation from the Last Mini-Batch for Consistency Regularization","arxiv_id":"2203.16172","date":"2022-03-30","proceeding":"CVPR 2022 1","authors":["Yiqing Shen","Liwu Xu","Yuzhe Yang","Yaqian Li","Yandong Guo"],"abstract":"Knowledge distillation (KD) shows a bright promise as a powerful regularization strategy to boost generalization ability by leveraging learned sample-level soft targets. Yet, employing a complex pre-trained teacher network or an ensemble of peer students in existing KD is both time-consuming and computationally costly. Various self KD methods have been proposed to achieve higher distillation efficiency. However, they either require extra network architecture modification or are difficult to parallelize. To cope with these challenges, we propose an efficient and reliable self-distillation framework, named Self-Distillation from Last Mini-Batch (DLB). Specifically, we rearrange the sequential sampling by constraining half of each mini-batch coinciding with the previous iteration. Meanwhile, the rest half will coincide with the upcoming iteration. Afterwards, the former half mini-batch distills on-the-fly soft targets generated in the previous iteration. Our proposed mechanism guides the training stability and consistency, resulting in robustness to label noise. Moreover, our method is easy to implement, without taking up extra run-time memory or requiring model structure modification. Experimental results on three classification benchmarks illustrate that our approach can consistently outperform state-of-the-art self-distillation approaches with different network architectures. Additionally, our method shows strong compatibility with augmentation strategies by gaining additional performance improvement. The code is available at https://github.com/Meta-knowledge-Lab/DLB.","url_abs":"https://arxiv.org/abs/2203.16172v1","url_pdf":"https://arxiv.org/pdf/2203.16172v1.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":"self-distillation-from-the-last-mini-batch","repo_url":"https://github.com/meta-knowledge-lab/dlb","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.16172","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.16172"}},"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/meta-knowledge-lab/dlb","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/Meta-knowledge-Lab/DLB","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"unverified":8},"by_repo_kind":{"official":{"samples":10,"ran":2,"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":"d9def42110729a85","entry":"conv1x1","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/models/resnet.py","link_basis":"harvester_set","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":"d9def42110729a85"}},{"code_sha256_prefix":"160bb14bd76201b4","entry":"conv3x3","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/models/resnet.py","link_basis":"harvester_set","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":"160bb14bd76201b4"}},{"code_sha256_prefix":"4d3faaaa1c706b0b","entry":"accuracy","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"utils.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/utils.py","link_basis":"harvester_set","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":"4d3faaaa1c706b0b"}},{"code_sha256_prefix":"efc756ced69a8412","entry":"densenetd100k12","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"models/densenet.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/models/densenet.py","link_basis":"harvester_set","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":"efc756ced69a8412"}},{"code_sha256_prefix":"4c5f8487b206866f","entry":"densenetd190k12","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"models/densenet.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/models/densenet.py","link_basis":"harvester_set","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":"4c5f8487b206866f"}},{"code_sha256_prefix":"2061ebd61043b291","entry":"densenetd40k12","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"models/densenet.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/models/densenet.py","link_basis":"harvester_set","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":"2061ebd61043b291"}},{"code_sha256_prefix":"455792fa1c5575d1","entry":"get_dataloader","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"my_dataloader.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/my_dataloader.py","link_basis":"harvester_set","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":"455792fa1c5575d1"}},{"code_sha256_prefix":"27f75f2cf2e7d03a","entry":"resnet32","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/models/resnet.py","link_basis":"harvester_set","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":"27f75f2cf2e7d03a"}},{"code_sha256_prefix":"27930880bc4b32a9","entry":"vgg16","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"models/vgg.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/models/vgg.py","link_basis":"harvester_set","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":"27930880bc4b32a9"}},{"code_sha256_prefix":"9f38a8b4c76fc2cb","entry":"vgg19","repo":"Meta-knowledge-Lab/DLB","repo_kind":"official","path":"models/vgg.py","file_url":"https://github.com/Meta-knowledge-Lab/DLB/blob/HEAD/models/vgg.py","link_basis":"harvester_set","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":"9f38a8b4c76fc2cb"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}