{"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/stargraph-a-coarse-to-fine-representation","title":"StarGraph: Knowledge Representation Learning based on Incomplete Two-hop Subgraph","arxiv_id":"2205.14209","date":"2022-05-27","proceeding":null,"authors":["Hongzhu Li","Xiangrui Gao","Linhui Feng","Yafeng Deng","Yuhui Yin"],"abstract":"Conventional representation learning algorithms for knowledge graphs (KG) map each entity to a unique embedding vector, ignoring the rich information contained in the neighborhood. We propose a method named StarGraph, which gives a novel way to utilize the neighborhood information for large-scale knowledge graphs to obtain entity representations. An incomplete two-hop neighborhood subgraph for each target node is at first generated, then processed by a modified self-attention network to obtain the entity representation, which is used to replace the entity embedding in conventional methods. We achieved SOTA performance on ogbl-wikikg2 and got competitive results on fb15k-237. The experimental results proves that StarGraph is efficient in parameters, and the improvement made on ogbl-wikikg2 demonstrates its great effectiveness of representation learning on large-scale knowledge graphs. The code is now available at \\url{https://github.com/hzli-ucas/StarGraph}.","url_abs":"https://arxiv.org/abs/2205.14209v2","url_pdf":"https://arxiv.org/pdf/2205.14209v2.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":"stargraph-a-coarse-to-fine-representation","repo_url":"https://github.com/hzli-ucas/stargraph","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"stargraph-a-coarse-to-fine-representation","repo_url":"https://github.com/hzli-ucas/StarGraph","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"entity-embeddings","task_name":"Entity Embeddings"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"two","task_name":"Vocal Bursts Valence Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/link-property-prediction-on-ogbl-wikikg2","task":"Link Property Prediction","dataset":"ogbl-wikikg2","model":"StarGraph + TripleRE","rank_in_archive_order":6,"of":30,"metrics":{"Ext. data":"No","Number of params":"86762146","Test MRR":"0.7201 ± 0.0011","Validation MRR":"0.7288 ± 0.0008"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.14209","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.14209"}},"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":"deterministic:regex_extraction","url":"https://github.com/hzli-ucas/StarGraph","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hzli-ucas/stargraph","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"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":6,"samples":[{"code_sha256_prefix":"f3aa96e814dfeea9","entry":"DropPath","repo":"hzli-ucas/stargraph","repo_kind":"official","path":"model.py","file_url":"https://github.com/hzli-ucas/stargraph/blob/HEAD/model.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":"f3aa96e814dfeea9"}},{"code_sha256_prefix":"017af27b9d345345","entry":"MLP","repo":"hzli-ucas/stargraph","repo_kind":"official","path":"model.py","file_url":"https://github.com/hzli-ucas/stargraph/blob/HEAD/model.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":"017af27b9d345345"}},{"code_sha256_prefix":"3b2bf685d793bc1f","entry":"ReducedAttentionLayer","repo":"hzli-ucas/stargraph","repo_kind":"official","path":"model.py","file_url":"https://github.com/hzli-ucas/stargraph/blob/HEAD/model.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":"3b2bf685d793bc1f"}},{"code_sha256_prefix":"479ae90c7dfc70a7","entry":"TransformerBlock","repo":"hzli-ucas/stargraph","repo_kind":"official","path":"model.py","file_url":"https://github.com/hzli-ucas/stargraph/blob/HEAD/model.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":"479ae90c7dfc70a7"}},{"code_sha256_prefix":"c803252b5e2599da","entry":"no_error_listdir","repo":"hzli-ucas/stargraph","repo_kind":"official","path":"model.py","file_url":"https://github.com/hzli-ucas/stargraph/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c803252b5e2599da"}},{"code_sha256_prefix":"d5b8c7847df8264d","entry":"KGEModel","repo":"hzli-ucas/stargraph","repo_kind":"official","path":"model.py","file_url":"https://github.com/hzli-ucas/stargraph/blob/HEAD/model.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":"d5b8c7847df8264d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}