Multi-Hop Knowledge Graph Reasoning with Reward Shaping

Xi Victoria Lin, Richard Socher, Caiming Xiong
8/31/2018
cs.AIcs.CLcs.LG

Official code: salesforce/MultiHopKG (316 stars, BSD-3-Clause, PyTorch, last commit 2025-10-06).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

PyTorchBSD-3-Clause

Multi-hop knowledge graph reasoning learned via policy gradient with reward shaping and action dropout

31678Shell, PythonSep 26, 20181 years agoBSD-3-Clause
action-dropoutknowledge-graphmulti-hop-reasoningpolicy-gradientpytorch+2 more

Similar Papers

Cite this paper

@article{lin2018multihop,
  title  = {Multi-Hop Knowledge Graph Reasoning with Reward Shaping},
  author = {Xi Victoria Lin and Richard Socher and Caiming Xiong},
  year   = {2018},
  eprint = {1808.10568},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1808.10568}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1808.10568.svg)](https://codeofpaper.com/paper/1808.10568)

Discussion