{"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/graph-based-knowledge-distillation-by-multi","title":"Graph-based Knowledge Distillation by Multi-head Attention Network","arxiv_id":"1907.02226","date":"2019-07-04","proceeding":null,"authors":["Seunghyun Lee","Byung Cheol Song"],"abstract":"Knowledge distillation (KD) is a technique to derive optimal performance from a small student network (SN) by distilling knowledge of a large teacher network (TN) and transferring the distilled knowledge to the small SN. Since a role of convolutional neural network (CNN) in KD is to embed a dataset so as to perform a given task well, it is very important to acquire knowledge that considers intra-data relations. Conventional KD methods have concentrated on distilling knowledge in data units. To our knowledge, any KD methods for distilling information in dataset units have not yet been proposed. Therefore, this paper proposes a novel method that enables distillation of dataset-based knowledge from the TN using an attention network. The knowledge of the embedding procedure of the TN is distilled to graph by multi-head attention (MHA), and multi-task learning is performed to give relational inductive bias to the SN. The MHA can provide clear information about the source dataset, which can greatly improves the performance of the SN. Experimental results show that the proposed method is 7.05% higher than the SN alone for CIFAR100, which is 2.46% higher than the state-of-the-art.","url_abs":"https://arxiv.org/abs/1907.02226v2","url_pdf":"https://arxiv.org/pdf/1907.02226v2.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":"graph-based-knowledge-distillation-by-multi","repo_url":"https://github.com/sseung0703/Knowledge_distillation_via_TF2.0","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"graph-based-knowledge-distillation-by-multi","repo_url":"https://github.com/sseung0703/KD_methods_with_TF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"inductive-bias","task_name":"Inductive Bias"},{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":"multi-task-learning","task_name":"Multi-Task Learning"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1907.02226","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1907.02226"}},"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/sseung0703/KD_methods_with_TF","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sseung0703/Knowledge_distillation_via_TF2.0","reach":{"status":"ok"}}],"summary":{"unverified":18},"by_repo_kind":{"listed":{"samples":18,"ran":0,"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":"fa85bb41a865fdca","entry":"AB_distillation","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Multiple.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Multiple.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":"fa85bb41a865fdca"}},{"code_sha256_prefix":"aa0940bdc0c62f7c","entry":"Attention_head","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Relation.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Relation.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":"aa0940bdc0c62f7c"}},{"code_sha256_prefix":"ca4bc2eab0f28657","entry":"Attention_transfer","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Multiple.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Multiple.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":"ca4bc2eab0f28657"}},{"code_sha256_prefix":"5c6688b3a8175162","entry":"Cifar100","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"dataloader.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/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":"5c6688b3a8175162"}},{"code_sha256_prefix":"991dc3b2233b9039","entry":"DML","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Response.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Response.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":"991dc3b2233b9039"}},{"code_sha256_prefix":"333c5cd9cd3d43b5","entry":"Dataloader","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"dataloader.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/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":"333c5cd9cd3d43b5"}},{"code_sha256_prefix":"985f1187d24bf1ba","entry":"FSP","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Shared.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Shared.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":"985f1187d24bf1ba"}},{"code_sha256_prefix":"af573b60ae262326","entry":"Factor_Transfer","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Response.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Response.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":"af573b60ae262326"}},{"code_sha256_prefix":"15962ff839fd0f61","entry":"FitNet","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Multiple.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Multiple.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":"15962ff839fd0f61"}},{"code_sha256_prefix":"8c917630c7f3610d","entry":"Optimizer_w_DML","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"op_util.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/op_util.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":"8c917630c7f3610d"}},{"code_sha256_prefix":"708382ba3e636f17","entry":"Optimizer_w_Distillation","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"op_util.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/op_util.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":"708382ba3e636f17"}},{"code_sha256_prefix":"d5bd3262a6641027","entry":"Optimizer_w_Initializer","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"op_util.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/op_util.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":"d5bd3262a6641027"}},{"code_sha256_prefix":"2a07b6ca793208a0","entry":"RKD","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Relation.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Relation.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":"2a07b6ca793208a0"}},{"code_sha256_prefix":"898e7c28a1d56867","entry":"SVD","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/SVP.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/SVP.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":"898e7c28a1d56867"}},{"code_sha256_prefix":"f49f271ffa39ed4e","entry":"SVD_eid","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/SVP.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/SVP.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":"f49f271ffa39ed4e"}},{"code_sha256_prefix":"7c683b4652eec88b","entry":"Soft_logits","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/Response.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/Response.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":"7c683b4652eec88b"}},{"code_sha256_prefix":"3fef491ca58b676b","entry":"learning_rate_scheduler","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"train_w_distill.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/train_w_distill.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":"3fef491ca58b676b"}},{"code_sha256_prefix":"801ed5a418c05524","entry":"removenan","repo":"sseung0703/KD_methods_with_TF","repo_kind":"listed","path":"nets/SVP.py","file_url":"https://github.com/sseung0703/KD_methods_with_TF/blob/HEAD/nets/SVP.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":"801ed5a418c05524"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}