{"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/complementary-relation-contrastive","title":"Complementary Relation Contrastive Distillation","arxiv_id":"2103.16367","date":"2021-03-29","proceeding":"CVPR 2021 1","authors":["Jinguo Zhu","Shixiang Tang","Dapeng Chen","Shijie Yu","Yakun Liu","Aijun Yang","Mingzhe Rong","Xiaohua Wang"],"abstract":"Knowledge distillation aims to transfer representation ability from a teacher model to a student model. Previous approaches focus on either individual representation distillation or inter-sample similarity preservation. While we argue that the inter-sample relation conveys abundant information and needs to be distilled in a more effective way. In this paper, we propose a novel knowledge distillation method, namely Complementary Relation Contrastive Distillation (CRCD), to transfer the structural knowledge from the teacher to the student. Specifically, we estimate the mutual relation in an anchor-based way and distill the anchor-student relation under the supervision of its corresponding anchor-teacher relation. To make it more robust, mutual relations are modeled by two complementary elements: the feature and its gradient. Furthermore, the low bound of mutual information between the anchor-teacher relation distribution and the anchor-student relation distribution is maximized via relation contrastive loss, which can distill both the sample representation and the inter-sample relations. Experiments on different benchmarks demonstrate the effectiveness of our proposed CRCD.","url_abs":"https://arxiv.org/abs/2103.16367v1","url_pdf":"https://arxiv.org/pdf/2103.16367v1.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":"complementary-relation-contrastive","repo_url":"https://github.com/Lechatelia/CRCD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":null,"task_name":"Relation"}],"methods":[{"method_slug":"knowledge-distillation","method_name":"Knowledge Distillation"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/knowledge-distillation-on-imagenet","task":"Knowledge Distillation","dataset":"ImageNet","model":"CRCD (T: ResNet-34  S:ResNet-18)","rank_in_archive_order":37,"of":52,"metrics":{"CRD training setting":"✓","Top-1 accuracy %":"71.96"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2103.16367","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.16367"}},"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/Lechatelia/CRCD","reach":null}],"summary":{"ran":3,"unverified":1},"by_repo_kind":{"listed":{"samples":4,"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":4,"samples":[{"code_sha256_prefix":"d8247910d4a7aa35","entry":"ContrastLoss","repo":"Lechatelia/CRCD","repo_kind":"listed","path":"crcd/criterion.py","file_url":"https://github.com/Lechatelia/CRCD/blob/HEAD/crcd/criterion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d8247910d4a7aa35"}},{"code_sha256_prefix":"95de05deeb53cc9e","entry":"ContrastMemory","repo":"Lechatelia/CRCD","repo_kind":"listed","path":"crcd/criterion.py","file_url":"https://github.com/Lechatelia/CRCD/blob/HEAD/crcd/criterion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"95de05deeb53cc9e"}},{"code_sha256_prefix":"9bc6ae24777b2648","entry":"Embed","repo":"Lechatelia/CRCD","repo_kind":"listed","path":"crcd/criterion.py","file_url":"https://github.com/Lechatelia/CRCD/blob/HEAD/crcd/criterion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9bc6ae24777b2648"}},{"code_sha256_prefix":"6194da1f61226414","entry":"CRCDLoss","repo":"Lechatelia/CRCD","repo_kind":"listed","path":"crcd/criterion.py","file_url":"https://github.com/Lechatelia/CRCD/blob/HEAD/crcd/criterion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6194da1f61226414"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}