Papers › Embedding Logical Queries on Knowledge Graphs

Embedding Logical Queries on Knowledge Graphs

5 Jun 2018NeurIPS 2018 12arXiv:1806.01445archive 2025-07-28

William L. Hamilton, Payal Bajaj, Marinka Zitnik, Dan Jurafsky, Jure Leskovec

Learning low-dimensional embeddings of knowledge graphs is a powerful approach used to predict unobserved or missing edges between entities. However, an open challenge in this area is developing techniques that can go beyond simple edge prediction and handle more complex logical queries, which might involve multiple unobserved edges, entities, and variables. For instance, given an incomplete biological knowledge graph, we might want to predict "em what drugs are likely to target proteins involved with both diseases X and Y?" -- a query that requires reasoning about all possible proteins that {\em might} interact with diseases X and Y. Here we introduce a framework to efficiently make predictions about conjunctive logical queries -- a flexible but tractable subset of first-order logic -- on incomplete knowledge graphs. In our approach, we embed graph nodes in a low-dimensional space and represent logical operators as learned geometric operations (e.g., translation, rotation) in this embedding space. By performing logical operations within a low-dimensional embedding space, our approach achieves a time complexity that is linear in the number of query variables, compared to the exponential complexity required by a naive enumeration-based approach. We demonstrate the utility of this framework in two application studies on real-world datasets with millions of relations: predicting logical relationships in a network of drug-gene-disease interactions and in a graph-based representation of social interactions derived from a popular web forum.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1806.01445")

Code

Syntology Ran 4 of 4 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong.

By repository: community (archive-listed): 3 samples from 1 repository, 3 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

williamleif/graphqembed officialmentioned in paperpytorch report
Blidge/KGReasoning mentioned on GitHubpytorch report
LHY-24/KG-Compilation mentioned on GitHubpytorch report
francoisluus/KGReasoning mentioned on GitHubpytorch report
pminervini/kgreasoning mentioned on GitHubpytorch report
snap-stanford/KGReasoning mentioned on GitHubpytorchMIT report
zhiweihu1103/qe-temp mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

4 samples harvested; 4 ran; 1 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong

Licence: 1 of the 4 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from francoisluus/KGReasoning. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

eval_tuple francoisluus/KGReasoning/util.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 08bc9653c017dfb5 · report
list2tuple francoisluus/KGReasoning/util.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 8c314b5b308ab1ad · report
tuple2list francoisluus/KGReasoning/util.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · bbd072fbd86e1541 · report
Identity identical code first harvested elsewhere ran · honoured contract fingerprinted licence of this copy not recorded · f44985272d18127a · report

Tasks

Complex Query AnsweringKnowledge Graphs

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Complex Query Answering FB15k GQE MRR 1p 0.546 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k GQE MRR 2i 0.397 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k GQE MRR 2p 0.153 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k GQE MRR 2u 0.221 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k GQE MRR 3i 0.514 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k GQE MRR 3p 0.108 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k GQE MRR ip 0.191 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k GQE MRR pi 0.276 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k GQE MRR up 0.116 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR 1p 0.35 #6 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR 2i 0.233 #6 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR 2p 0.072 #6 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR 2u 0.082 #6 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR 3i 0.346 #6 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR 3p 0.053 #6 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR ip 0.107 #6 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR pi 0.165 #6 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 GQE MRR up 0.057 #6 of 9 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections