{"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/class-attention-transfer-based-knowledge","title":"Class Attention Transfer Based Knowledge Distillation","arxiv_id":"2304.12777","date":"2023-04-25","proceeding":"CVPR 2023 1","authors":["Ziyao Guo","Haonan Yan","Hui Li","Xiaodong Lin"],"abstract":"Previous knowledge distillation methods have shown their impressive performance on model compression tasks, however, it is hard to explain how the knowledge they transferred helps to improve the performance of the student network. In this work, we focus on proposing a knowledge distillation method that has both high interpretability and competitive performance. We first revisit the structure of mainstream CNN models and reveal that possessing the capacity of identifying class discriminative regions of input is critical for CNN to perform classification. Furthermore, we demonstrate that this capacity can be obtained and enhanced by transferring class activation maps. Based on our findings, we propose class attention transfer based knowledge distillation (CAT-KD). Different from previous KD methods, we explore and present several properties of the knowledge transferred by our method, which not only improve the interpretability of CAT-KD but also contribute to a better understanding of CNN. While having high interpretability, CAT-KD achieves state-of-the-art performance on multiple benchmarks. Code is available at: https://github.com/GzyAftermath/CAT-KD.","url_abs":"https://arxiv.org/abs/2304.12777v1","url_pdf":"https://arxiv.org/pdf/2304.12777v1.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":"class-attention-transfer-based-knowledge","repo_url":"https://github.com/gzyaftermath/cat-kd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":"model-compression","task_name":"Model Compression"}],"methods":[{"method_slug":"ca","method_name":"Class Attention"},{"method_slug":"knowledge-distillation","method_name":"Knowledge Distillation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2304.12777","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.12777"}},"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/gzyaftermath/cat-kd","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/GzyAftermath/CAT-KD","reach":{"status":"ok"}}],"summary":{"ran":2,"ran_draft_wrong":1,"ran_fixture":1},"by_repo_kind":{"official":{"samples":4,"ran":4,"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":"de9c4a7a072ab1ce","entry":"CAT_KD","repo":"GzyAftermath/CAT-KD","repo_kind":"official","path":"mdistiller/distillers/CAT_KD.py","file_url":"https://github.com/GzyAftermath/CAT-KD/blob/HEAD/mdistiller/distillers/CAT_KD.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":"de9c4a7a072ab1ce"}},{"code_sha256_prefix":"6b2964f56aadfd04","entry":"CAT_loss","repo":"GzyAftermath/CAT-KD","repo_kind":"official","path":"mdistiller/distillers/CAT_KD.py","file_url":"https://github.com/GzyAftermath/CAT-KD/blob/HEAD/mdistiller/distillers/CAT_KD.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6b2964f56aadfd04"}},{"code_sha256_prefix":"6bf6a5bc20ab9d05","entry":"_Normalize","repo":"GzyAftermath/CAT-KD","repo_kind":"official","path":"mdistiller/distillers/CAT_KD.py","file_url":"https://github.com/GzyAftermath/CAT-KD/blob/HEAD/mdistiller/distillers/CAT_KD.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6bf6a5bc20ab9d05"}},{"code_sha256_prefix":"ca1a791f4b0127c8","entry":"_mask","repo":"GzyAftermath/CAT-KD","repo_kind":"official","path":"mdistiller/distillers/CAT_KD.py","file_url":"https://github.com/GzyAftermath/CAT-KD/blob/HEAD/mdistiller/distillers/CAT_KD.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":"ca1a791f4b0127c8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}