NLProlog: Reasoning with Weak Unification for Question Answering in Natural Language

Leon Weber, Pasquale Minervini, Jannes Münchmeyer, Ulf Leser, Tim Rocktäschel
6/14/2019
cs.CLcs.LO

Official code: leonweber/nlprolog (75 stars, Python, MIT, last commit 2021-05-25).

Abstract

Rule-based models are attractive for various tasks because they inherently lead to interpretable and explainable decisions and can easily incorporate prior knowledge. However, such systems are difficult to apply to problems involving natural language, due to its linguistic variability.

Show full abstract

In contrast, neural models can cope very well with ambiguity by learning distributed representations of words and their composition from data, but lead to models that are difficult to interpret. In this paper, we describe a model combining neural networks with logic programming in a novel manner for solving multi-hop reasoning tasks over natural language. Specifically, we propose to use a Prolog prover which we extend to utilize a similarity function over pretrained sentence encoders. We fine-tune the representations for the similarity function via backpropagation. This leads to a system that can apply rule-based reasoning to natural language, and induce domain-specific rules from training data. We evaluate the proposed system on two different question answering tasks, showing that it outperforms two baselines -- BIDAF (Seo et al., 2016a) and FAST QA (Weissenborn et al., 2017b) on a subset of the WikiHop corpus and achieves competitive results on the MedHop data set (Welbl et al., 2017).

View on arXivView PDF

Code Implementations(1)

leonweber/nlprologOfficial100%
MIT

Neural Logic Reasoning for Question Answering

7511Python, Jupyter NotebookMay 17, 20195 years agoMIT

Similar Papers

Cite this paper

@article{weber2019nlprolog,
  title  = {NLProlog: Reasoning with Weak Unification for Question Answering in Natural Language},
  author = {Leon Weber and Pasquale Minervini and Jannes Münchmeyer and Ulf Leser and Tim Rocktäschel},
  year   = {2019},
  eprint = {1906.06187},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1906.06187}
}

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/1906.06187.svg)](https://codeofpaper.com/paper/1906.06187)

Discussion