{"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/kgat-knowledge-graph-attention-network-for","title":"KGAT: Knowledge Graph Attention Network for Recommendation","arxiv_id":"1905.07854","date":"2019-05-20","proceeding":null,"authors":["Xiang Wang","Xiangnan He","Yixin Cao","Meng Liu","Tat-Seng Chua"],"abstract":"To provide more accurate, diverse, and explainable recommendation, it is compulsory to go beyond modeling user-item interactions and take side information into account. Traditional methods like factorization machine (FM) cast it as a supervised learning problem, which assumes each interaction as an independent instance with side information encoded. Due to the overlook of the relations among instances or items (e.g., the director of a movie is also an actor of another movie), these methods are insufficient to distill the collaborative signal from the collective behaviors of users. In this work, we investigate the utility of knowledge graph (KG), which breaks down the independent interaction assumption by linking items with their attributes. We argue that in such a hybrid structure of KG and user-item graph, high-order relations --- which connect two items with one or multiple linked attributes --- are an essential factor for successful recommendation. We propose a new method named Knowledge Graph Attention Network (KGAT) which explicitly models the high-order connectivities in KG in an end-to-end fashion. It recursively propagates the embeddings from a node's neighbors (which can be users, items, or attributes) to refine the node's embedding, and employs an attention mechanism to discriminate the importance of the neighbors. Our KGAT is conceptually advantageous to existing KG-based recommendation methods, which either exploit high-order relations by extracting paths or implicitly modeling them with regularization. Empirical results on three public benchmarks show that KGAT significantly outperforms state-of-the-art methods like Neural FM and RippleNet. Further studies verify the efficacy of embedding propagation for high-order relation modeling and the interpretability benefits brought by the attention mechanism.","url_abs":"https://arxiv.org/abs/1905.07854v2","url_pdf":"https://arxiv.org/pdf/1905.07854v2.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":"kgat-knowledge-graph-attention-network-for","repo_url":"https://github.com/xiangwang1223/knowledge_graph_attention_network","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"kgat-knowledge-graph-attention-network-for","repo_url":"https://github.com/LunaBlack/KGAT-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"kgat-knowledge-graph-attention-network-for","repo_url":"https://github.com/Userepic/KGAT-pytorch-master","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"kgat-knowledge-graph-attention-network-for","repo_url":"https://github.com/fumiyo0607/KGAN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"kgat-knowledge-graph-attention-network-for","repo_url":"https://github.com/giantonia/KGATv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"kgat-knowledge-graph-attention-network-for","repo_url":"https://github.com/jennyzhang0215/DGL-KGAT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"kgat-knowledge-graph-attention-network-for","repo_url":"https://github.com/zju-dbl/metakg","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"explainable-recommendation","task_name":"Explainable Recommendation"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"}],"methods":[{"method_slug":"interpretability","method_name":"Interpretability"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/link-prediction-on-movielens-25m","task":"Link Prediction","dataset":"MovieLens 25M","model":"KGAT","rank_in_archive_order":3,"of":7,"metrics":{"Hits@10":"0.8147","nDCG@10":"0.5236"},"uses_additional_data":false},{"leaderboard":"/sota/link-prediction-on-yelp","task":"Link Prediction","dataset":"Yelp","model":"KGAT","rank_in_archive_order":2,"of":9,"metrics":{"HR@10":"0.8762","nDCG@10":"0.6136"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1905.07854","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1905.07854"}},"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/zju-dbl/metakg","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Userepic/KGAT-pytorch-master","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fumiyo0607/KGAN","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/LunaBlack/KGAT-pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xiangwang1223/knowledge_graph_attention_network","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/giantonia/KGATv2","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jennyzhang0215/DGL-KGAT","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_violates":1,"ran_draft_wrong":2,"unverified":6},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1},"listed":{"samples":10,"ran":4,"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":1,"samples":[{"code_sha256_prefix":"ea02c0066939a02c","entry":"average_precision","repo":"zju-dbl/metakg","repo_kind":"listed","path":"utility/metrics.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/utility/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ea02c0066939a02c"}},{"code_sha256_prefix":"f16f715a59169c8a","entry":"hasNumbers","repo":"xiangwang1223/knowledge_graph_attention_network","repo_kind":"official","path":"Model/utility/helper.py","file_url":"https://github.com/xiangwang1223/knowledge_graph_attention_network/blob/HEAD/Model/utility/helper.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f16f715a59169c8a"}},{"code_sha256_prefix":"de0d0e47ac6bbe6c","entry":"precision_at_k","repo":"zju-dbl/metakg","repo_kind":"listed","path":"utility/metrics.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/utility/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"de0d0e47ac6bbe6c"}},{"code_sha256_prefix":"a943eb44a36720f5","entry":"read_cf","repo":"zju-dbl/metakg","repo_kind":"listed","path":"utility/data_loader.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/utility/data_loader.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a943eb44a36720f5"}},{"code_sha256_prefix":"4437293713f250ee","entry":"recall","repo":"zju-dbl/metakg","repo_kind":"listed","path":"utility/metrics.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/utility/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4437293713f250ee"}},{"code_sha256_prefix":"b07be870060c7e26","entry":"txt2list","repo":"xiangwang1223/knowledge_graph_attention_network","repo_kind":"official","path":"Model/utility/helper.py","file_url":"https://github.com/xiangwang1223/knowledge_graph_attention_network/blob/HEAD/Model/utility/helper.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":"b07be870060c7e26"}},{"code_sha256_prefix":"ddd78902563c0d71","entry":"uni2str","repo":"xiangwang1223/knowledge_graph_attention_network","repo_kind":"official","path":"Model/utility/helper.py","file_url":"https://github.com/xiangwang1223/knowledge_graph_attention_network/blob/HEAD/Model/utility/helper.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ddd78902563c0d71"}},{"code_sha256_prefix":"9a27969aaabab082","entry":"evaluate","repo":"LunaBlack/KGAT-pytorch","repo_kind":"listed","path":"main_kgat.py","file_url":"https://github.com/LunaBlack/KGAT-pytorch/blob/HEAD/main_kgat.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":"9a27969aaabab082"}},{"code_sha256_prefix":"0671d5a4cbb1c2ac","entry":"get_auc","repo":"zju-dbl/metakg","repo_kind":"listed","path":"utility/evaluate.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/utility/evaluate.py","link_basis":"harvester_set","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":"0671d5a4cbb1c2ac"}},{"code_sha256_prefix":"3f00ab41756c7332","entry":"read_item_list","repo":"zju-dbl/metakg","repo_kind":"listed","path":"construct_data.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/construct_data.py","link_basis":"harvester_set","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":"3f00ab41756c7332"}},{"code_sha256_prefix":"a62b98b0ef1ddefd","entry":"read_triplets","repo":"zju-dbl/metakg","repo_kind":"listed","path":"utility/data_loader.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/utility/data_loader.py","link_basis":"harvester_set","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":"a62b98b0ef1ddefd"}},{"code_sha256_prefix":"62574d6b7ffda3a6","entry":"read_user_list","repo":"zju-dbl/metakg","repo_kind":"listed","path":"construct_data.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/construct_data.py","link_basis":"harvester_set","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":"62574d6b7ffda3a6"}},{"code_sha256_prefix":"9d48d59360417a6e","entry":"remap_item","repo":"zju-dbl/metakg","repo_kind":"listed","path":"utility/data_loader.py","file_url":"https://github.com/zju-dbl/metakg/blob/HEAD/utility/data_loader.py","link_basis":"harvester_set","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":"9d48d59360417a6e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}