Papers › Multi-Hop Knowledge Graph Reasoning with Reward Shaping

Multi-Hop Knowledge Graph Reasoning with Reward Shaping

31 Aug 2018EMNLP 2018 10arXiv:1808.10568archive 2025-07-28

Xi Victoria Lin, Richard Socher, Caiming Xiong

Multi-hop reasoning is an effective approach for query answering (QA) over incomplete knowledge graphs (KGs). The problem can be formulated in a reinforcement learning (RL) setup, where a policy-based agent sequentially extends its inference path until it reaches a target. However, in an incomplete KG environment, the agent receives low-quality rewards corrupted by false negatives in the training data, which harms generalization at test time. Furthermore, since no golden action sequence is used for training, the agent can be misled by spurious search trajectories that incidentally lead to the correct answer. We propose two modeling advances to address both issues: (1) we reduce the impact of false negative supervision by adopting a pretrained one-hop embedding model to estimate the reward of unobserved facts; (2) we counter the sensitivity to spurious paths of on-policy RL by forcing the agent to explore a diverse set of paths using randomly generated edge masks. Our approach significantly improves over existing path-based KGQA models on several benchmark datasets and is comparable or better than embedding-based models.

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

Code

Syntology Ran 0 of 12 code samples harvested from 2 repositories linked to this paper; 12 have no recorded run.

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

salesforce/MultiHopKG officialmentioned on GitHubpytorchBSD-3-Clause report
kingsaint/InductiveExplainableLinkPrediction mentioned on GitHubpytorchBSD-3-Clause 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

12 samples harvested; 0 ran; 0 honoured the contract we drafted; 12 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.

12unverified

Licence: 1 of the 12 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

batch_lookup salesforce/MultiHopKG/src/utils/ops.py official repository unverified BSD-3-Clause (permissive) · bf5d078656e9a5cb · report
change_to_test_model_path salesforce/MultiHopKG/src/data_utils.py official repository unverified BSD-3-Clause (permissive) · cfe498d227766f79 · report
check_answer_ratio salesforce/MultiHopKG/src/data_utils.py official repository unverified BSD-3-Clause (permissive) · 10c22da7cb9db158 · report
check_relation_answer_ratio salesforce/MultiHopKG/src/data_utils.py official repository unverified BSD-3-Clause (permissive) · a7e3705996bcffee · report
compute_venn_areas salesforce/MultiHopKG/src/error_analysis/analysis_modules.py official repository unverified BSD-3-Clause (permissive) · 84a0e853fae6b04f · report
convert_to_dist salesforce/MultiHopKG/src/utils/ops.py official repository unverified BSD-3-Clause (permissive) · 788b295e650aa151 · report
entropy salesforce/MultiHopKG/src/utils/ops.py official repository unverified BSD-3-Clause (permissive) · 84a908f10b383452 · report
get_complex_kg_state_dict salesforce/MultiHopKG/src/emb/fact_network.py official repository unverified BSD-3-Clause (permissive) · f19a8b7eac90f996 · report
get_conve_kg_state_dict salesforce/MultiHopKG/src/emb/fact_network.py official repository unverified BSD-3-Clause (permissive) · 54cd6b30f57076ba · report
get_conve_nn_state_dict salesforce/MultiHopKG/src/emb/fact_network.py official repository unverified BSD-3-Clause (permissive) · 2d2c990dd61cae71 · report
visualize_step salesforce/MultiHopKG/src/utils/vis.py official repository unverified BSD-3-Clause (permissive) · cde5ea85581be0d2 · report
check_relation_answer_ratio kingsaint/InductiveExplainableLinkPrediction/src/data_utils.py community (archive-listed) unverified BSD-3-Clause recorded; this copy not marked cleared · pointer only · 567cf7c18073ed45 · report

Tasks

Knowledge Graph EmbeddingsKnowledge GraphsReinforcement LearningReinforcement Learning (RL)

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