{"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/knowledge-distillation-from-a-stronger","title":"Knowledge Distillation from A Stronger Teacher","arxiv_id":"2205.10536","date":"2022-05-21","proceeding":null,"authors":["Tao Huang","Shan You","Fei Wang","Chen Qian","Chang Xu"],"abstract":"Unlike existing knowledge distillation methods focus on the baseline settings, where the teacher models and training strategies are not that strong and competing as state-of-the-art approaches, this paper presents a method dubbed DIST to distill better from a stronger teacher. We empirically find that the discrepancy of predictions between the student and a stronger teacher may tend to be fairly severer. As a result, the exact match of predictions in KL divergence would disturb the training and make existing methods perform poorly. In this paper, we show that simply preserving the relations between the predictions of teacher and student would suffice, and propose a correlation-based loss to capture the intrinsic inter-class relations from the teacher explicitly. Besides, considering that different instances have different semantic similarities to each class, we also extend this relational match to the intra-class level. Our method is simple yet practical, and extensive experiments demonstrate that it adapts well to various architectures, model sizes and training strategies, and can achieve state-of-the-art performance consistently on image classification, object detection, and semantic segmentation tasks. Code is available at: https://github.com/hunto/DIST_KD .","url_abs":"https://arxiv.org/abs/2205.10536v3","url_pdf":"https://arxiv.org/pdf/2205.10536v3.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":"knowledge-distillation-from-a-stronger","repo_url":"https://github.com/hunto/dist_kd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"knowledge-distillation-from-a-stronger","repo_url":"https://github.com/hunto/image_classification_sota","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"knowledge-distillation-from-a-stronger","repo_url":"https://github.com/yoshitomo-matsubara/torchdistill","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"knowledge-distillation","method_name":"Knowledge Distillation"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/knowledge-distillation-on-cifar-100","task":"Knowledge Distillation","dataset":"CIFAR-100","model":"resnet8x4 (T: resnet32x4 S: resnet8x4)","rank_in_archive_order":10,"of":27,"metrics":{"Top-1 Accuracy (%)":"76.31"},"uses_additional_data":false},{"leaderboard":"/sota/knowledge-distillation-on-imagenet","task":"Knowledge Distillation","dataset":"ImageNet","model":"DIST (T: Swin-L S: Swin-T)","rank_in_archive_order":10,"of":52,"metrics":{"CRD training setting":"✘","Top-1 accuracy %":"82.3","model size":"29M"},"uses_additional_data":true},{"leaderboard":"/sota/knowledge-distillation-on-imagenet","task":"Knowledge Distillation","dataset":"ImageNet","model":"DIST (T: ResNet-34 S:ResNet-18)","rank_in_archive_order":34,"of":52,"metrics":{"CRD training setting":"✘","Top-1 accuracy %":"72.07"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.10536","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.10536"}},"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/yoshitomo-matsubara/torchdistill","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/hunto/DIST_KD","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hunto/image_classification_sota","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hunto/dist_kd","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":2,"ran_violates":4,"ran_honours":4,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":5,"repositories":1},"listed":{"samples":6,"ran":5,"repositories":2}},"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":"18a915e624ecb904","entry":"DIST","repo":"hunto/dist_kd","repo_kind":"official","path":"segmentation/losses/dist_kd.py","file_url":"https://github.com/hunto/dist_kd/blob/HEAD/segmentation/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"18a915e624ecb904"}},{"code_sha256_prefix":"0c2f8410b866e04e","entry":"DISTLoss","repo":"yoshitomo-matsubara/torchdistill","repo_kind":"listed","path":"torchdistill/losses/mid_level.py","file_url":"https://github.com/yoshitomo-matsubara/torchdistill/blob/HEAD/torchdistill/losses/mid_level.py","link_basis":"first_harvest_node","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":"0c2f8410b866e04e"}},{"code_sha256_prefix":"38ede58bd9091f21","entry":"cosine_similarity","repo":"hunto/dist_kd","repo_kind":"official","path":"segmentation/losses/dist_kd.py","file_url":"https://github.com/hunto/dist_kd/blob/HEAD/segmentation/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"38ede58bd9091f21"}},{"code_sha256_prefix":"b5f44526e6cc6a9d","entry":"cosine_similarity","repo":"hunto/image_classification_sota","repo_kind":"listed","path":"lib/models/losses/dist_kd.py","file_url":"https://github.com/hunto/image_classification_sota/blob/HEAD/lib/models/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b5f44526e6cc6a9d"}},{"code_sha256_prefix":"b45038694ef6bb75","entry":"inter_class_relation","repo":"hunto/dist_kd","repo_kind":"official","path":"segmentation/losses/dist_kd.py","file_url":"https://github.com/hunto/dist_kd/blob/HEAD/segmentation/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b45038694ef6bb75"}},{"code_sha256_prefix":"f26d395fbb7834a6","entry":"inter_class_relation","repo":"hunto/image_classification_sota","repo_kind":"listed","path":"lib/models/losses/dist_kd.py","file_url":"https://github.com/hunto/image_classification_sota/blob/HEAD/lib/models/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f26d395fbb7834a6"}},{"code_sha256_prefix":"962968b3b922d520","entry":"intra_class_relation","repo":"hunto/dist_kd","repo_kind":"official","path":"segmentation/losses/dist_kd.py","file_url":"https://github.com/hunto/dist_kd/blob/HEAD/segmentation/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"962968b3b922d520"}},{"code_sha256_prefix":"9837c466938259ff","entry":"intra_class_relation","repo":"hunto/image_classification_sota","repo_kind":"listed","path":"lib/models/losses/dist_kd.py","file_url":"https://github.com/hunto/image_classification_sota/blob/HEAD/lib/models/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9837c466938259ff"}},{"code_sha256_prefix":"d00eea76cc523c64","entry":"pearson_correlation","repo":"hunto/dist_kd","repo_kind":"official","path":"segmentation/losses/dist_kd.py","file_url":"https://github.com/hunto/dist_kd/blob/HEAD/segmentation/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d00eea76cc523c64"}},{"code_sha256_prefix":"8eb964c14770de5c","entry":"pearson_correlation","repo":"hunto/image_classification_sota","repo_kind":"listed","path":"lib/models/losses/dist_kd.py","file_url":"https://github.com/hunto/image_classification_sota/blob/HEAD/lib/models/losses/dist_kd.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8eb964c14770de5c"}},{"code_sha256_prefix":"1def32553f080f5d","entry":"DIST","repo":"hunto/image_classification_sota","repo_kind":"listed","path":"lib/models/losses/dist_kd.py","file_url":"https://github.com/hunto/image_classification_sota/blob/HEAD/lib/models/losses/dist_kd.py","link_basis":"first_harvest_node","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":"1def32553f080f5d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}