{"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/logical-entity-representation-in-knowledge","title":"Logical Entity Representation in Knowledge-Graphs for Differentiable Rule Learning","arxiv_id":"2305.12738","date":"2023-05-22","proceeding":null,"authors":["Chi Han","Qizheng He","Charles Yu","Xinya Du","Hanghang Tong","Heng Ji"],"abstract":"Probabilistic logical rule learning has shown great strength in logical rule mining and knowledge graph completion. It learns logical rules to predict missing edges by reasoning on existing edges in the knowledge graph. However, previous efforts have largely been limited to only modeling chain-like Horn clauses such as $R_1(x,z)\\land R_2(z,y)\\Rightarrow H(x,y)$. This formulation overlooks additional contextual information from neighboring sub-graphs of entity variables $x$, $y$ and $z$. Intuitively, there is a large gap here, as local sub-graphs have been found to provide important information for knowledge graph completion. Inspired by these observations, we propose Logical Entity RePresentation (LERP) to encode contextual information of entities in the knowledge graph. A LERP is designed as a vector of probabilistic logical functions on the entity's neighboring sub-graph. It is an interpretable representation while allowing for differentiable optimization. We can then incorporate LERP into probabilistic logical rule learning to learn more expressive rules. Empirical results demonstrate that with LERP, our model outperforms other rule learning methods in knowledge graph completion and is comparable or even superior to state-of-the-art black-box methods. Moreover, we find that our model can discover a more expressive family of logical rules. LERP can also be further combined with embedding learning methods like TransE to make it more interpretable.","url_abs":"https://arxiv.org/abs/2305.12738v1","url_pdf":"https://arxiv.org/pdf/2305.12738v1.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":"logical-entity-representation-in-knowledge","repo_url":"https://github.com/glaciohound/lerp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"knowledge-graph-completion","task_name":"Knowledge Graph Completion"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"link-prediction","task_name":"Link Prediction"}],"methods":[{"method_slug":"transe","method_name":"TransE"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/link-prediction-on-wn18rr","task":"Link Prediction","dataset":"WN18RR","model":"LERP","rank_in_archive_order":11,"of":75,"metrics":{"Hits@1":"0.593","Hits@10":"0.682","Hits@3":"0.634","MRR":"0.622"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.12738","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.12738"}},"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/glaciohound/lerp","reach":null}],"summary":{"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"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":"1840f858fcd13697","entry":"categorical_softmax_entropy","repo":"glaciohound/lerp","repo_kind":"official","path":"lerp/lerpnet.py","file_url":"https://github.com/glaciohound/lerp/blob/HEAD/lerp/lerpnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1840f858fcd13697"}},{"code_sha256_prefix":"40efaff58c607c15","entry":"sparse_lambda","repo":"glaciohound/lerp","repo_kind":"official","path":"lerp/lerpnet.py","file_url":"https://github.com/glaciohound/lerp/blob/HEAD/lerp/lerpnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"40efaff58c607c15"}},{"code_sha256_prefix":"9c688df7218fb23e","entry":"LerpChaining","repo":"glaciohound/lerp","repo_kind":"official","path":"lerp/lerpnet.py","file_url":"https://github.com/glaciohound/lerp/blob/HEAD/lerp/lerpnet.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":"9c688df7218fb23e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}