{"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/nodepiece-compositional-and-parameter","title":"NodePiece: Compositional and Parameter-Efficient Representations of Large Knowledge Graphs","arxiv_id":"2106.12144","date":"2021-06-23","proceeding":"ICLR 2022 4","authors":["Mikhail Galkin","Etienne Denis","Jiapeng Wu","William L. Hamilton"],"abstract":"Conventional representation learning algorithms for knowledge graphs (KG) map each entity to a unique embedding vector. Such a shallow lookup results in a linear growth of memory consumption for storing the embedding matrix and incurs high computational costs when working with real-world KGs. Drawing parallels with subword tokenization commonly used in NLP, we explore the landscape of more parameter-efficient node embedding strategies with possibly sublinear memory requirements. To this end, we propose NodePiece, an anchor-based approach to learn a fixed-size entity vocabulary. In NodePiece, a vocabulary of subword/sub-entity units is constructed from anchor nodes in a graph with known relation types. Given such a fixed-size vocabulary, it is possible to bootstrap an encoding and embedding for any entity, including those unseen during training. Experiments show that NodePiece performs competitively in node classification, link prediction, and relation prediction tasks while retaining less than 10% of explicit nodes in a graph as anchors and often having 10x fewer parameters. To this end, we show that a NodePiece-enabled model outperforms existing shallow models on a large OGB WikiKG 2 graph having 70x fewer parameters.","url_abs":"https://arxiv.org/abs/2106.12144v2","url_pdf":"https://arxiv.org/pdf/2106.12144v2.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":"nodepiece-compositional-and-parameter","repo_url":"https://github.com/migalkin/NodePiece","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"nodepiece-compositional-and-parameter","repo_url":"https://github.com/AutoML-Research/KGBench","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"nodepiece-compositional-and-parameter","repo_url":"https://github.com/migalkin/NodePiece/tree/main/ogb","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"nodepiece-compositional-and-parameter","repo_url":"https://github.com/pykeen/ilpc2022","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"node-classification","task_name":"Node Classification"},{"task_slug":null,"task_name":"Relation"},{"task_slug":"relation-prediction","task_name":"Relation Prediction"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/link-property-prediction-on-ogbl-wikikg2","task":"Link Property Prediction","dataset":"ogbl-wikikg2","model":"NodePiece + AutoSF","rank_in_archive_order":18,"of":30,"metrics":{"Ext. data":"No","Number of params":"6860602","Test MRR":"0.5703 ± 0.0035","Validation MRR":"0.5806 ± 0.0047"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2106.12144","atlas_url":"https://app.syntology.ai/?focus=2106.12144","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.12144"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/pykeen/ilpc2022","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/migalkin/NodePiece/tree/main/ogb","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/AutoML-Research/KGBench","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/migalkin/NodePiece","reach":null}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":1,"ran":0,"repositories":1},"listed":{"samples":6,"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":"79e8c86b8cbf34bf","entry":"index_KvsAll","repo":"AutoML-Research/KGBench","repo_kind":"listed","path":"kgbench/indexing.py","file_url":"https://github.com/AutoML-Research/KGBench/blob/HEAD/kgbench/indexing.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":"79e8c86b8cbf34bf"}},{"code_sha256_prefix":"8de5ea6adbb76af2","entry":"index_relation_types","repo":"AutoML-Research/KGBench","repo_kind":"listed","path":"kgbench/indexing.py","file_url":"https://github.com/AutoML-Research/KGBench/blob/HEAD/kgbench/indexing.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":"8de5ea6adbb76af2"}},{"code_sha256_prefix":"016f6033e3fdf5c1","entry":"index_relations_per_type","repo":"AutoML-Research/KGBench","repo_kind":"listed","path":"kgbench/indexing.py","file_url":"https://github.com/AutoML-Research/KGBench/blob/HEAD/kgbench/indexing.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":"016f6033e3fdf5c1"}},{"code_sha256_prefix":"c04bd04c3945c863","entry":"init_from","repo":"AutoML-Research/KGBench","repo_kind":"listed","path":"kgbench/misc.py","file_url":"https://github.com/AutoML-Research/KGBench/blob/HEAD/kgbench/misc.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":"c04bd04c3945c863"}},{"code_sha256_prefix":"3087bb1d9186ca95","entry":"is_number","repo":"AutoML-Research/KGBench","repo_kind":"listed","path":"kgbench/misc.py","file_url":"https://github.com/AutoML-Research/KGBench/blob/HEAD/kgbench/misc.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":"3087bb1d9186ca95"}},{"code_sha256_prefix":"f7fbea47d530863f","entry":"parse_args","repo":"migalkin/NodePiece","repo_kind":"official","path":"ogb/run_ogb.py","file_url":"https://github.com/migalkin/NodePiece/blob/HEAD/ogb/run_ogb.py","link_basis":"first_harvest_node","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":"f7fbea47d530863f"}},{"code_sha256_prefix":"5ebd841a3319a390","entry":"which","repo":"AutoML-Research/KGBench","repo_kind":"listed","path":"kgbench/misc.py","file_url":"https://github.com/AutoML-Research/KGBench/blob/HEAD/kgbench/misc.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":"5ebd841a3319a390"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}