{"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/pie-a-parameter-and-inference-efficient","title":"PIE: a Parameter and Inference Efficient Solution for Large Scale Knowledge Graph Embedding Reasoning","arxiv_id":"2204.13957","date":"2022-04-29","proceeding":null,"authors":["Linlin Chao","Xiexiong Lin","Taifeng Wang","Wei Chu"],"abstract":"Knowledge graph (KG) embedding methods which map entities and relations to unique embeddings in the KG have shown promising results on many reasoning tasks. However, the same embedding dimension for both dense entities and sparse entities will cause either over parameterization (sparse entities) or under fitting (dense entities). Normally, a large dimension is set to get better performance. Meanwhile, the inference time grows log-linearly with the number of entities for all entities are traversed and compared. Both the parameter and inference become challenges when working with huge amounts of entities. Thus, we propose PIE, a \\textbf{p}arameter and \\textbf{i}nference \\textbf{e}fficient solution. Inspired from tensor decomposition methods, we find that decompose entity embedding matrix into low rank matrices can reduce more than half of the parameters while maintaining comparable performance. To accelerate model inference, we propose a self-supervised auxiliary task, which can be seen as fine-grained entity typing. By randomly masking and recovering entities' connected relations, the task learns the co-occurrence of entity and relations. Utilizing the fine grained typing, we can filter unrelated entities during inference and get targets with possibly sub-linear time requirement. Experiments on link prediction benchmarks demonstrate the proposed key capabilities. Moreover, we prove effectiveness of the proposed solution on the Open Graph Benchmark large scale challenge dataset WikiKG90Mv2 and achieve the state of the art performance.","url_abs":"https://arxiv.org/abs/2204.13957v2","url_pdf":"https://arxiv.org/pdf/2204.13957v2.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":"pie-a-parameter-and-inference-efficient","repo_url":"https://github.com/alipay/parameter_inference_efficient_pie","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"pie-a-parameter-and-inference-efficient","repo_url":"https://github.com/ant-research/parameter_inference_efficient_pie","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"entity-typing","task_name":"Entity Typing"},{"task_slug":"graph-embedding","task_name":"Graph Embedding"},{"task_slug":"knowledge-graph-embedding","task_name":"Knowledge Graph Embedding"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"tensor-decomposition","task_name":"Tensor Decomposition"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2204.13957","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.13957"}},"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/ant-research/parameter_inference_efficient_pie","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alipay/parameter_inference_efficient_pie","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":15},"by_repo_kind":{"official":{"samples":15,"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":"43b5e3fa582da3d7","entry":"count_all_paths","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/utils.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/utils.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":"43b5e3fa582da3d7"}},{"code_sha256_prefix":"018bf3f65be492cc","entry":"count_all_paths_with_mp","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/utils.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/utils.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":"018bf3f65be492cc"}},{"code_sha256_prefix":"5d2141cb615d084d","entry":"get_compatible_batch_size","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"candidate/utils.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/candidate/utils.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":"5d2141cb615d084d"}},{"code_sha256_prefix":"b5db0d52d633b48d","entry":"get_params_for_mp","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/utils.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/utils.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":"b5db0d52d633b48d"}},{"code_sha256_prefix":"f5ccd995ef379580","entry":"get_partition_dataset","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"candidate/KGDataset.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/candidate/KGDataset.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":"f5ccd995ef379580"}},{"code_sha256_prefix":"781f017533eedd24","entry":"get_server_partition_dataset","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"candidate/KGDataset.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/candidate/KGDataset.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":"781f017533eedd24"}},{"code_sha256_prefix":"ad37003f04543138","entry":"infer","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"candidate/get_candidate_dgl.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/candidate/get_candidate_dgl.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":"ad37003f04543138"}},{"code_sha256_prefix":"fe11f904a96ceb2c","entry":"load_model_config","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"candidate/utils.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/candidate/utils.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":"fe11f904a96ceb2c"}},{"code_sha256_prefix":"fd92338302edcbb5","entry":"read_entities","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/data_processer.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/data_processer.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":"fd92338302edcbb5"}},{"code_sha256_prefix":"d2bc5fbe86f233c4","entry":"read_relations","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/data_processer.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/data_processer.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":"d2bc5fbe86f233c4"}},{"code_sha256_prefix":"d2294a70e3d013fd","entry":"read_triplets","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/data_processer.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/data_processer.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":"d2294a70e3d013fd"}},{"code_sha256_prefix":"a29184cfc113cc69","entry":"test_step_loss","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/model.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/model.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":"a29184cfc113cc69"}},{"code_sha256_prefix":"e4b19c01ab75f646","entry":"test_step_score","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/model.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/model.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":"e4b19c01ab75f646"}},{"code_sha256_prefix":"6949df7260ec105e","entry":"thread_wrapped_func","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"candidate/utils.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/candidate/utils.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":"6949df7260ec105e"}},{"code_sha256_prefix":"de25933894de2114","entry":"train_step","repo":"alipay/parameter_inference_efficient_pie","repo_kind":"official","path":"entity_typing/src/model.py","file_url":"https://github.com/alipay/parameter_inference_efficient_pie/blob/HEAD/entity_typing/src/model.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":"de25933894de2114"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}