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

arXiv: https://arxiv.org/abs/1906.06187 · HTML: https://mlsanity.com/paper/1906.06187/

## Key facts

- Cited by 37 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 14 Jun 2019.

## Built on by (most cited first, 30 of 37)

- [From Statistical Relational to Neurosymbolic Artificial Intelligence: a Survey](https://mlsanity.com/paper/2108.11451/) (2021)
- [Generating Natural Language Proofs with Verifier-Guided Search](https://mlsanity.com/paper/2205.12443/) (2022)
- [Natural Language Deduction through Search over Statement Compositions](https://mlsanity.com/paper/2201.06028/) (2022)
- [Towards Data-and Knowledge-Driven Artificial Intelligence: A Survey on Neuro-Symbolic Computing](https://mlsanity.com/paper/2210.15889/) (2022)
- [PEDANTS: Cheap but Effective and Interpretable Answer Equivalence](https://mlsanity.com/paper/2402.11161/) (2024)
- [FaiRR: Faithful and Robust Deductive Reasoning over Natural Language](https://mlsanity.com/paper/2203.10261/) (2022)
- [Flexible Generation of Natural Language Deductions](https://mlsanity.com/paper/2104.08825/) (2021)
- [TILP: Differentiable Learning of Temporal Logical Rules on Knowledge Graphs](https://mlsanity.com/paper/2402.12309/) (2024)
- [Leveraging the Inductive Bias of Large Language Models for Abstract Textual Reasoning](https://mlsanity.com/paper/2110.02370/) (2021)
- [Logical Reasoning with Span-Level Predictions for Interpretable and Robust NLI Models](https://mlsanity.com/paper/2205.11432/) (2022)
- [NELLIE: A Neuro-Symbolic Inference Engine for Grounded, Compositional, and Explainable Reasoning](https://mlsanity.com/paper/2209.07662/) (2022)
- [Enhancing Ethical Explanations of Large Language Models through Iterative Symbolic Refinement](https://mlsanity.com/paper/2402.00745/) (2024)
- [Explainability in Practice: A Survey of Explainable NLP Across Various Domains](https://mlsanity.com/paper/2502.00837/) (2025)
- [Behavior Cloned Transformers are Neurosymbolic Reasoners](https://mlsanity.com/paper/2210.07382/) (2022)
- [Learning Symbolic Rules for Reasoning in Quasi-Natural Language](https://mlsanity.com/paper/2111.12038/) (2021)
- [Neuro-symbolic Natural Logic with Introspective Revision for Natural Language Inference](https://mlsanity.com/paper/2203.04857/) (2022)
- [Interpretable Proof Generation via Iterative Backward Reasoning](https://mlsanity.com/paper/2205.10714/) (2022)
- [Neural Unification for Logic Reasoning over Natural Language](https://mlsanity.com/paper/2109.08460/) (2021)
- [Defining neurosymbolic AI](https://mlsanity.com/paper/2507.11127/) (2025)
- [A Critical Review of Inductive Logic Programming Techniques for Explainable AI](https://mlsanity.com/paper/2112.15319/) (2021)
- [Teaching Probabilistic Logical Reasoning to Transformers](https://mlsanity.com/paper/2305.13179/) (2023)
- [Dspy-based Neural-Symbolic Pipeline to Enhance Spatial Reasoning in LLMs](https://mlsanity.com/paper/2411.18564/) (2024)
- [On the Challenges of Evaluating Compositional Explanations in Multi-Hop Inference: Relevance, Completeness, and Expert Ratings](https://mlsanity.com/paper/2109.03334/) (2021)
- [Inference to the Best Explanation in Large Language Models](https://mlsanity.com/paper/2402.10767/) (2024)
- [Asking the Right Questions in Low Resource Template Extraction](https://mlsanity.com/paper/2205.12643/) (2022)
- [Probabilistic Graph Reasoning for Natural Proof Generation](https://mlsanity.com/paper/2107.02418/) (2021)
- [NatLogAttack: A Framework for Attacking Natural Language Inference Models with Natural Logic](https://mlsanity.com/paper/2307.02849/) (2023)
- [Spatial Knowledge-Infused Hierarchical Learning: An Application in Flood Mapping on Earth Imagery](https://mlsanity.com/paper/2312.07767/) (2023)
- [Generative Interpretability via Scalable Neuro-Symbolic Models](https://mlsanity.com/paper/2609.13529/) (2026)
- [Semantic Reasoning with Differentiable Graph Transformations](https://mlsanity.com/paper/2107.09579/) (2021)

## Abstract (arXiv)

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