Papers › Complex Query Answering with Neural Link Predictors

Complex Query Answering with Neural Link Predictors

6 Nov 2020ICLR 2021 1arXiv:2011.03459archive 2025-07-28

Erik Arakelyan, Daniel Daza, Pasquale Minervini, Michael Cochez

Neural link predictors are immensely useful for identifying missing edges in large scale Knowledge Graphs. However, it is still not clear how to use these models for answering more complex queries that arise in a number of domains, such as queries using logical conjunctions (∧), disjunctions (∨) and existential quantifiers (∃), while accounting for missing edges. In this work, we propose a framework for efficiently answering complex queries on incomplete Knowledge Graphs. We translate each query into an end-to-end differentiable objective, where the truth value of each atom is computed by a pre-trained neural link predictor. We then analyse two solutions to the optimisation problem, including gradient-based and combinatorial search. In our experiments, the proposed approach produces more accurate results than state-of-the-art methods -- black-box neural models trained on millions of generated queries -- without the need of training on a large and diverse set of complex queries. Using orders of magnitude less training data, we obtain relative improvements ranging from 8% up to 40% in Hits@3 across different knowledge graphs containing factual information. Finally, we demonstrate that it is possible to explain the outcome of our model in terms of the intermediate solutions identified for each of the complex query atoms. All our source code and datasets are available online, at https://github.com/uclnlp/cqd.

PaperPDFConference PDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

No sample from the archive's official repository (uclnlp/cqd) is linked to this paper; the 7 samples below come from 2 community repositories. Syntology harvested code from uclnlp/cqd for another paper.

uclnlp/cqd: Syntology's graph links these samples to Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs (arXiv:2010.11465; that paper's own run record: 9 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 2 honoured, 0 violated, 4 with no contract checked; 3 where Syntology's instrument failed) · 5 unverified); nothing checks that they implement this paper's method.

Syntology 7 code samples harvested from 2 repositories linked to this paper: 5 ran (of which 2 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 7 samples from 2 repositories, 5 ran (4 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

uclnlp/cqd officialmentioned in paperpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs (arXiv:2010.11465; that paper's own run record: 9 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 2 honoured, 0 violated, 4 with no contract checked; 3 where Syntology's instrument failed) · 5 unverified); nothing checks that they implement this paper's method. report
Blidge/KGReasoning mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Query2box: Reasoning over Knowledge Graphs in Vector Space using Box Embeddings (arXiv:2002.05969; that paper's own run record: 30 ran (of which 13 constructed an object rather than computing a result; 18 with no instrument failure: 1 honoured, 0 violated, 17 with no contract checked; 12 where Syntology's instrument failed) · 11 unverified); nothing checks that they implement this paper's method. report
LHY-24/KG-Compilation mentioned on GitHubpytorchSyntology: 4 samples, 3 ran (0 instrument-failed) · 1 unverified report
dice-group/dice-embeddings mentioned on GitHubpytorchSyntology: 3 samples, 2 ran (1 instrument-failed) · 1 unverified report
pminervini/kgreasoning mentioned on GitHubpytorchSyntology: not harvested 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

7 samples harvested: 5 ran (of which 2 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · our draft was wrong
4ran
2unverified

Licence: 4 of the 7 samples are 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 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

LHY-24/KG-Compilation community (archive-listed) 4 samples, 3 ran (0 instrument-failed) · 1 unverified
BetaIntersection src/operator_fuser.py ran no licence file found · pointer only · 8ffbdd40f46c7744 · report fixture: signature inputs:list/1/Tensor · returned Tensor · level recorded 2026-09-24
BetaUnion src/operator_fuser.py ran no licence file found · pointer only · af41baf7167a162e · report fixture: signature inputs:list/1/Tensor · returned NoneType · level recorded 2026-09-24
FusedOperator src/operator_fuser.py ran no licence file found · pointer only · f500993bdc21b4ce · report fixture: returned FusedOperator · level recorded 2026-09-22
OperatorFuser src/operator_fuser.py unverified no licence file found · pointer only · 10e78fd3323d9e98 · report
dice-group/dice-embeddings community (archive-listed) 3 samples, 2 ran (1 instrument-failed) · 1 unverified
QueryGenerator dicee/query_generator.py ran MIT (permissive) · 6bf9498fc1a88844 · report fixture: returned QueryGenerator · level recorded 2026-09-22
load_pickle in 115 papers dicee/query_generator.py ran · our draft was wrong MIT (permissive) · 5484d29ab2e86ff8 · report fixture: signature file_path:str/0/str · returned dict · level recorded 2026-09-22
save_pickle dicee/query_generator.py unverified MIT (permissive) · 8f9261c61b1a5014 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

3 assemblies on this paper: 3 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

3 sibling assemblies for framework for efficiently answering complex queries on incomplete Knowledge Graphs (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for framework for efficiently answering complex queries on incomplete Knowledge Graphs (graph method: framework for efficiently answering complex queries on incomplete Knowledge Graphs). 3 bricks; individually on a fixture: 2 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 1 where Syntology's instrument failed) · 1 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. QueryGenerator entry · level 1 · ran · 6bf9498fc1a88844
  2. load_pickle helper · level 1 · ran · our draft was wrong · 5484d29ab2e86ff8
  3. save_pickle helper · level 0 · unverified · 8f9261c61b1a5014

harvested Assembly for framework for efficiently answering complex queries on incomplete Knowledge Graphs (graph method: framework for efficiently answering complex queries on incomplete Knowledge Graphs). 4 bricks; individually on a fixture: 3 ran (of which 1 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. OperatorFuser entry · level 0 · unverified · 10e78fd3323d9e98
  2. BetaIntersection model · level 1 · ran · 8ffbdd40f46c7744
  3. BetaUnion model · level 1 · ran · af41baf7167a162e
  4. FusedOperator helper · level 1 · ran · f500993bdc21b4ce

harvested Assembly for framework for efficiently answering complex queries on incomplete Knowledge Graphs (graph method: framework for efficiently answering complex queries on incomplete Knowledge Graphs). 14 bricks; individually on a fixture: 8 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 8 where Syntology's instrument failed) · 6 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. CQD entry · level 0 · unverified · 9b8c70940dfe67a9
  2. N3 helper · level 0 · unverified · 13dc0495d6916564
  3. query_1p helper · level 0 · unverified · 38511adc942a62d6
  4. query_2i helper · level 0 · unverified · b821d97259813ae4
  5. query_2p helper · level 1 · ran · our draft was wrong · c347b52e0b2d0f36
  6. query_2u_dnf helper · level 0 · unverified · c5eb44c00d8b7df8
  7. query_3i helper · level 1 · ran · our draft was wrong · 52f5e28fee4638ab
  8. query_3p helper · level 1 · ran · our draft was wrong · 805d2b1bc7c0dc90
  9. query_ip helper · level 0 · unverified · 2493b517068163e8
  10. query_pi helper · level 1 · ran · our draft was wrong · 51a131fbee1009cf
  11. query_to_atoms helper · level 1 · ran · our draft was wrong · bc5f262d753a9eb4
  12. query_up_dnf helper · level 1 · ran · our draft was wrong · 02f4d333d76fc417
  13. score_candidates helper · level 1 · ran · our draft was wrong · b97e0b8fe06b9171
  14. flatten_structure helper · level 1 · ran · our draft was wrong · d7c6b03fd8f6a3bc

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2011.03459") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Complex Query AnsweringKnowledge Graphs

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Complex Query Answering FB15k CQD MRR 1p 0.892 #2 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD MRR 2i 0.771 #2 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD MRR 2p 0.653 #2 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD MRR 2u 0.723 #2 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD MRR 3i 0.806 #2 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD MRR ip 0.716 #2 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 1p 0.918 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 2i 0.796 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 2p 0.779 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 2u 0.839 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 3i 0.837 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 3p 0.577 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 ip 0.375 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 pi 0.658 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-Beam Hits@3 up 0.345 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 1p 0.918 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 2i 0.796 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 2p 0.454 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 2u 0.816 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 3i 0.837 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 3p 0.191 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 ip 0.336 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 pi 0.513 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k CQD-CO Hits@3 up 0.319 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD MRR 3i 0.486 #7 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 1p 0.512 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 2i 35.2 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 2p 0.213 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 2u 0.281 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 3i 0.457 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 3p 0.131 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 ip 0.146 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 pi 0.222 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-CO Hits@3 up 0.132 #8 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 1p 0.512 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 2i 0.352 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 2p 0.288 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 2u 0.284 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 3i 0.457 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 3p 0.221 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 ip 0.129 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 pi 0.249 #9 of 9 Archive leaderboard report
Complex Query Answering FB15k-237 CQD-Beam Hits@3 up 0.121 #9 of 9 Archive leaderboard report
Complex Query Answering NELL-995 CQD MRR 1p 0.604 #2 of 6 Archive leaderboard report
Complex Query Answering NELL-995 CQD MRR 2i 0.436 #2 of 6 Archive leaderboard report
Complex Query Answering NELL-995 CQD MRR ip 0.256 #2 of 6 Archive leaderboard report
Complex Query Answering NELL995 CQD-Beam Hits@3 2p 0.350 #1 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-Beam Hits@3 3p 0.288 #1 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-Beam Hits@3 ip 0.171 #1 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-Beam Hits@3 pi 0.277 #1 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-Beam Hits@3 up 0.156 #1 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 1p 0.667 #2 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 2i 0.410 #2 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 2p 0.265 #2 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 2u 0.531 #2 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 3i 0.529 #2 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 3p 0.220 #2 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 ip 0.196 #2 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 pi 0.302 #2 of 2 Archive leaderboard report
Complex Query Answering NELL995 CQD-CO Hits@3 up 0.194 #2 of 2 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