{"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/beta-embeddings-for-multi-hop-logical","title":"Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs","arxiv_id":"2010.11465","date":"2020-10-22","proceeding":"NeurIPS 2020 12","authors":["Hongyu Ren","Jure Leskovec"],"abstract":"One of the fundamental problems in Artificial Intelligence is to perform complex multi-hop logical reasoning over the facts captured by a knowledge graph (KG). This problem is challenging, because KGs can be massive and incomplete. Recent approaches embed KG entities in a low dimensional space and then use these embeddings to find the answer entities. However, it has been an outstanding challenge of how to handle arbitrary first-order logic (FOL) queries as present methods are limited to only a subset of FOL operators. In particular, the negation operator is not supported. An additional limitation of present methods is also that they cannot naturally model uncertainty. Here, we present BetaE, a probabilistic embedding framework for answering arbitrary FOL queries over KGs. BetaE is the first method that can handle a complete set of first-order logical operations: conjunction ($\\wedge$), disjunction ($\\vee$), and negation ($\\neg$). A key insight of BetaE is to use probabilistic distributions with bounded support, specifically the Beta distribution, and embed queries/entities as distributions, which as a consequence allows us to also faithfully model uncertainty. Logical operations are performed in the embedding space by neural operators over the probabilistic embeddings. We demonstrate the performance of BetaE on answering arbitrary FOL queries on three large, incomplete KGs. While being more general, BetaE also increases relative performance by up to 25.4% over the current state-of-the-art KG reasoning methods that can only handle conjunctive queries without negation.","url_abs":"https://arxiv.org/abs/2010.11465v1","url_pdf":"https://arxiv.org/pdf/2010.11465v1.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":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/Blidge/KGReasoning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/Jacfger/simple-stuffs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/LHY-24/KG-Compilation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/francoisluus/KGReasoning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/hkust-knowcomp/efo-1-qa-benchmark","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/pminervini/kgreasoning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/snap-stanford/KGReasoning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/uclnlp/cqd","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"beta-embeddings-for-multi-hop-logical","repo_url":"https://github.com/zhiweihu1103/qe-temp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"complex-query-answering","task_name":"Complex Query Answering"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"logical-reasoning","task_name":"Logical Reasoning"},{"task_slug":"negation","task_name":"Negation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/complex-query-answering-on-fb15k","task":"Complex Query Answering","dataset":"FB15k","model":"BetaE","rank_in_archive_order":6,"of":9,"metrics":{"MRR 1p":"0.651","MRR 2i":"0.558","MRR 2p":"0.257","MRR 2u":"0.401","MRR 3i":"0.665","MRR 3p":"0.247","MRR ip":"0.281","MRR pi":"0.439","MRR up":"0.252"},"uses_additional_data":false},{"leaderboard":"/sota/complex-query-answering-on-fb15k-237","task":"Complex Query Answering","dataset":"FB15k-237","model":"BetaE","rank_in_archive_order":5,"of":9,"metrics":{"MRR 1p":"0.39","MRR 2i":"0.288","MRR 2p":"0.109","MRR 2u":"0.124","MRR 3i":"0.425","MRR 3p":"0.1","MRR ip":"0.126","MRR pi":"0.224","MRR up":"0.097"},"uses_additional_data":false},{"leaderboard":"/sota/complex-query-answering-on-nell-995","task":"Complex Query Answering","dataset":"NELL-995","model":"BetaE","rank_in_archive_order":5,"of":6,"metrics":{"MRR 1p":"0.53","MRR 2i":"0.376","MRR 2p":"0.13","MRR 2u":"0.122","MRR 3i":"0.475","MRR 3p":"0.114","MRR ip":"0.143","MRR pi":"0.241","MRR up":"0.085"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2010.11465","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.11465"}},"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/hyren/query2box","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/snap-stanford/KGReasoning","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pminervini/kgreasoning","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Blidge/KGReasoning","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/francoisluus/KGReasoning","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhiweihu1103/qe-temp","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hkust-knowcomp/efo-1-qa-benchmark","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Jacfger/simple-stuffs","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/LHY-24/KG-Compilation","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/uclnlp/cqd","reach":null}],"summary":{"ran":3,"ran_honours":2,"ran_draft_wrong":3,"unverified":6},"by_repo_kind":{"listed":{"samples":14,"ran":8,"repositories":4}},"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":1,"samples":[{"code_sha256_prefix":"15f1515d95ce51d1","entry":"BetaIntersection","repo":"LHY-24/KG-Compilation","repo_kind":"listed","path":"src/models.py","file_url":"https://github.com/LHY-24/KG-Compilation/blob/HEAD/src/models.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":"15f1515d95ce51d1"}},{"code_sha256_prefix":"65d51f93f096ca1a","entry":"BetaIntersection","repo":"Jacfger/simple-stuffs","repo_kind":"listed","path":"fol/estimator_beta.py","file_url":"https://github.com/Jacfger/simple-stuffs/blob/HEAD/fol/estimator_beta.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"65d51f93f096ca1a"}},{"code_sha256_prefix":"bc022c5d939d4dff","entry":"BetaProjection","repo":"Jacfger/simple-stuffs","repo_kind":"listed","path":"fol/estimator_beta.py","file_url":"https://github.com/Jacfger/simple-stuffs/blob/HEAD/fol/estimator_beta.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc022c5d939d4dff"}},{"code_sha256_prefix":"f44985272d18127a","entry":"Identity","repo":"snap-stanford/KGReasoning","repo_kind":"listed","path":"models.py","file_url":"https://github.com/snap-stanford/KGReasoning/blob/HEAD/models.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f44985272d18127a"}},{"code_sha256_prefix":"08bc9653c017dfb5","entry":"eval_tuple","repo":"snap-stanford/KGReasoning","repo_kind":"listed","path":"util.py","file_url":"https://github.com/snap-stanford/KGReasoning/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"08bc9653c017dfb5"}},{"code_sha256_prefix":"8c314b5b308ab1ad","entry":"list2tuple","repo":"snap-stanford/KGReasoning","repo_kind":"listed","path":"create_queries.py","file_url":"https://github.com/snap-stanford/KGReasoning/blob/HEAD/create_queries.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c314b5b308ab1ad"}},{"code_sha256_prefix":"b602fff455d94358","entry":"make_batches","repo":"uclnlp/cqd","repo_kind":"listed","path":"kbc/models.py","file_url":"https://github.com/uclnlp/cqd/blob/HEAD/kbc/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b602fff455d94358"}},{"code_sha256_prefix":"bbd072fbd86e1541","entry":"tuple2list","repo":"snap-stanford/KGReasoning","repo_kind":"listed","path":"create_queries.py","file_url":"https://github.com/snap-stanford/KGReasoning/blob/HEAD/create_queries.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bbd072fbd86e1541"}},{"code_sha256_prefix":"83454511701e3bdd","entry":"BetaEstimator","repo":"Jacfger/simple-stuffs","repo_kind":"listed","path":"fol/estimator_beta.py","file_url":"https://github.com/Jacfger/simple-stuffs/blob/HEAD/fol/estimator_beta.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":"83454511701e3bdd"}},{"code_sha256_prefix":"c1c62def2f1c5499","entry":"DynKBCSingleton","repo":"uclnlp/cqd","repo_kind":"listed","path":"kbc/models.py","file_url":"https://github.com/uclnlp/cqd/blob/HEAD/kbc/models.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":"c1c62def2f1c5499"}},{"code_sha256_prefix":"a3016c183214fb5a","entry":"KBCModel","repo":"uclnlp/cqd","repo_kind":"listed","path":"kbc/models.py","file_url":"https://github.com/uclnlp/cqd/blob/HEAD/kbc/models.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":"a3016c183214fb5a"}},{"code_sha256_prefix":"ccc626ec21ffdcfb","entry":"QuerDAG","repo":"uclnlp/cqd","repo_kind":"listed","path":"kbc/models.py","file_url":"https://github.com/uclnlp/cqd/blob/HEAD/kbc/models.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":"ccc626ec21ffdcfb"}},{"code_sha256_prefix":"dfce66d833684f59","entry":"Regularizer","repo":"uclnlp/cqd","repo_kind":"listed","path":"kbc/models.py","file_url":"https://github.com/uclnlp/cqd/blob/HEAD/kbc/models.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":"dfce66d833684f59"}},{"code_sha256_prefix":"75304c63d0f3ce0c","entry":"construct_graph","repo":"snap-stanford/KGReasoning","repo_kind":"listed","path":"create_queries.py","file_url":"https://github.com/snap-stanford/KGReasoning/blob/HEAD/create_queries.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":"75304c63d0f3ce0c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}