{"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/diffkg-knowledge-graph-diffusion-model-for","title":"DiffKG: Knowledge Graph Diffusion Model for Recommendation","arxiv_id":"2312.16890","date":"2023-12-28","proceeding":null,"authors":["Yangqin Jiang","Yuhao Yang","Lianghao Xia","Chao Huang"],"abstract":"Knowledge Graphs (KGs) have emerged as invaluable resources for enriching recommendation systems by providing a wealth of factual information and capturing semantic relationships among items. Leveraging KGs can significantly enhance recommendation performance. However, not all relations within a KG are equally relevant or beneficial for the target recommendation task. In fact, certain item-entity connections may introduce noise or lack informative value, thus potentially misleading our understanding of user preferences. To bridge this research gap, we propose a novel knowledge graph diffusion model for recommendation, referred to as DiffKG. Our framework integrates a generative diffusion model with a data augmentation paradigm, enabling robust knowledge graph representation learning. This integration facilitates a better alignment between knowledge-aware item semantics and collaborative relation modeling. Moreover, we introduce a collaborative knowledge graph convolution mechanism that incorporates collaborative signals reflecting user-item interaction patterns, guiding the knowledge graph diffusion process. We conduct extensive experiments on three publicly available datasets, consistently demonstrating the superiority of our DiffKG compared to various competitive baselines. We provide the source code repository of our proposed DiffKG model at the following link: https://github.com/HKUDS/DiffKG.","url_abs":"https://arxiv.org/abs/2312.16890v1","url_pdf":"https://arxiv.org/pdf/2312.16890v1.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":"diffkg-knowledge-graph-diffusion-model-for","repo_url":"https://github.com/hkuds/diffkg","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"graph-representation-learning","task_name":"Graph Representation Learning"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"model","task_name":"model"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2312.16890","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.16890"}},"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/hkuds/diffkg","reach":{"status":"ok"}}],"summary":{"ran":3},"by_repo_kind":{"official":{"samples":3,"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":3,"samples":[{"code_sha256_prefix":"66e8fbd6e8423e37","entry":"calcRegLoss","repo":"hkuds/diffkg","repo_kind":"official","path":"Utils/Utils.py","file_url":"https://github.com/hkuds/diffkg/blob/HEAD/Utils/Utils.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":"66e8fbd6e8423e37"}},{"code_sha256_prefix":"4a8ad31f6957c7e2","entry":"innerProduct","repo":"hkuds/diffkg","repo_kind":"official","path":"Utils/Utils.py","file_url":"https://github.com/hkuds/diffkg/blob/HEAD/Utils/Utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a8ad31f6957c7e2"}},{"code_sha256_prefix":"350a398356fb2725","entry":"pairPredict","repo":"hkuds/diffkg","repo_kind":"official","path":"Utils/Utils.py","file_url":"https://github.com/hkuds/diffkg/blob/HEAD/Utils/Utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"350a398356fb2725"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}