Papers › UniKGQA: Unified Retrieval and Reasoning for Solving Multi-hop Question Answering Over...

UniKGQA: Unified Retrieval and Reasoning for Solving Multi-hop Question Answering Over Knowledge Graph

2 Dec 2022arXiv:2212.00959archive 2025-07-28

Jinhao Jiang, Kun Zhou, Wayne Xin Zhao, Ji-Rong Wen

Multi-hop Question Answering over Knowledge Graph~(KGQA) aims to find the answer entities that are multiple hops away from the topic entities mentioned in a natural language question on a large-scale Knowledge Graph (KG). To cope with the vast search space, existing work usually adopts a two-stage approach: it first retrieves a relatively small subgraph related to the question and then performs the reasoning on the subgraph to find the answer entities accurately. Although these two stages are highly related, previous work employs very different technical solutions for developing the retrieval and reasoning models, neglecting their relatedness in task essence. In this paper, we propose UniKGQA, a novel approach for multi-hop KGQA task, by unifying retrieval and reasoning in both model architecture and parameter learning. For model architecture, UniKGQA consists of a semantic matching module based on a pre-trained language model~(PLM) for question-relation semantic matching, and a matching information propagation module to propagate the matching information along the directed edges on KGs. For parameter learning, we design a shared pre-training task based on question-relation matching for both retrieval and reasoning models, and then propose retrieval- and reasoning-oriented fine-tuning strategies. Compared with previous studies, our approach is more unified, tightly relating the retrieval and reasoning stages. Extensive experiments on three benchmark datasets have demonstrated the effectiveness of our method on the multi-hop KGQA task. Our codes and data are publicly available at~\url{https://github.com/RUCAIBox/UniKGQA}.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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="2212.00959")

Code

Syntology Ran 9 of 17 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 9 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

rucaibox/unikgqa officialmentioned in papermentioned on GitHubpytorchMIT 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

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

9ran
8unverified

Licence: 0 of the 17 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 RUCAIBox/UniKGQA. “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.

compute_gold_const_rel_recall RUCAIBox/UniKGQA/UniModel/extract_abstract_subgraph.py official repository ran MIT (permissive) · 33c05189007d001e · report
compute_gold_rel_str_recall RUCAIBox/UniKGQA/UniModel/extract_abstract_subgraph.py official repository ran MIT (permissive) · c9ddcdb426b7415c · report
extract_shortest_paths RUCAIBox/UniKGQA/UniModel/extract_abstract_subgraph.py official repository ran MIT (permissive) · a8bf75a4078ff37e · report
get_answers RUCAIBox/UniKGQA/UniModel/convert_abs_to_NSM_format.py official repository ran MIT (permissive) · 6cc4c2a66647120f · report
get_global_const_entities RUCAIBox/UniKGQA/UniModel/convert_inst_to_NSM_format.py official repository ran MIT (permissive) · e27d30e88c385923 · report
get_global_topic_entities RUCAIBox/UniKGQA/UniModel/convert_abs_to_NSM_format.py official repository ran MIT (permissive) · bc4cb80d7dd8de17 · report
get_global_topic_entity RUCAIBox/UniKGQA/UniModel/convert_inst_to_NSM_format.py official repository ran MIT (permissive) · 26dd036f60f5cb63 · report
get_meta_info_gold_entities RUCAIBox/UniKGQA/UniModel/map_kg_2_global_id.py official repository ran MIT (permissive) · 256c66dbbebcc087 · report
load_dict RUCAIBox/UniKGQA/UniModel/convert_abs_to_NSM_format.py official repository ran MIT (permissive) · d1508d96f5948a8e · report
construct_contrastive_pos_neg_paths RUCAIBox/UniKGQA/UniModel/extract_valid_weak_paths.py official repository unverified MIT (permissive) · 8764d92556a06708 · report
construct_contrastive_pos_neg_paths RUCAIBox/UniKGQA/UniModel/s1_construct_relation_retrieval_training_data.py official repository unverified MIT (permissive) · 8e4f03b5d7ed6f80 · report
extract_shortest_paths RUCAIBox/UniKGQA/UniModel/s2_extract_abstract_subgraph.py official repository unverified MIT (permissive) · e8ced166b1cf4873 · report
get_neg_rels_neibouring RUCAIBox/UniKGQA/UniModel/s1_construct_relation_retrieval_training_data.py official repository unverified MIT (permissive) · 068354e2944b30d0 · report
get_paths_from_tpe_to_ans RUCAIBox/UniKGQA/UniModel/s0_extract_weak_super_relations.py official repository unverified MIT (permissive) · fba844611b43fecd · report
get_paths_from_tpe_to_ans_with_specific_hop RUCAIBox/UniKGQA/UniModel/s0_extract_weak_super_relations.py official repository unverified MIT (permissive) · eb939eeb1bbe1dda · report
get_paths_from_tpe_to_cpes RUCAIBox/UniKGQA/UniModel/s0_extract_weak_super_relations.py official repository unverified MIT (permissive) · a93b4bf7311c5d95 · report
get_subgraph RUCAIBox/UniKGQA/UniModel/s2_extract_abstract_subgraph.py official repository unverified MIT (permissive) · 52af9ff41cf852e7 · report

Tasks

Language ModellingMulti-hop Question AnsweringQuestion AnsweringRetrieval

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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