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

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

14 Jun 2019ACL 2019 7arXiv:1906.06187archive 2025-07-28

Leon Weber, Pasquale Minervini, Jannes Münchmeyer, Ulf Leser, Tim Rocktäschel

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. 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).

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

Code

Syntology Ran 0 of 11 code samples harvested from 1 repository linked to this paper; 11 have no recorded run.

By repository: official repository: 11 samples 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.

leonweber/nlprolog officialmentioned in paperpytorchMIT 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

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

11unverified

Licence: 0 of the 11 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 leonweber/nlprolog. “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.

batched_weighted_sum leonweber/nlprolog/utils.py official repository unverified MIT (permissive) · 6c8c3d4b27fb45b3 · report
build_tree leonweber/nlprolog/visualize_proof_tree.py official repository unverified MIT (permissive) · 66053e173ef275e6 · report
clean_text leonweber/nlprolog/preprocessing.py official repository unverified MIT (permissive) · 5dc0130fdfd31748 · report
cosine_similarity leonweber/nlprolog/model.py official repository unverified MIT (permissive) · e8c9a1f414af2fce · report
get_linear leonweber/nlprolog/model.py official repository unverified MIT (permissive) · 02f07f3773ca95ee · report
luk leonweber/nlprolog/prolog.py official repository unverified MIT (permissive) · 49c3bc68899deda4 · report
make_title leonweber/nlprolog/preprocessing.py official repository unverified MIT (permissive) · 1f0f6e29595f9263 · report
plot leonweber/nlprolog/visualize_proof_tree.py official repository unverified MIT (permissive) · b6a8a382d767df09 · report
prod leonweber/nlprolog/prolog.py official repository unverified MIT (permissive) · f97356fe5f557abd · report
sim leonweber/nlprolog/model.py official repository unverified MIT (permissive) · a2e8d8ee2aa98330 · report
truncate leonweber/nlprolog/preprocessing.py official repository unverified MIT (permissive) · 0d57be32fa41e563 · report

Tasks

Question AnsweringSentence

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