Dynamic Generation of Interpretable Inference Rules in a Neuro-Symbolic Expert System

Nathaniel Weir, Benjamin Van Durme

Abstract

We present an approach for systematic reasoning that produces human interpretable proof trees grounded in a factbase. Our solution resembles the style of a classic Prolog-based inference engine, where we replace handcrafted rules through a combination of neural language modeling, guided generation, and semiparametric dense retrieval. This novel reasoning engine, NELLIE, dynamically instantiates interpretable inference rules that capture and score entailment (de)compositions over natural language statements. NELLIE provides competitive performance on scientific QA datasets requiring structured explanations over multiple facts.

Introduction

In the quest for artificial intelligence that we can actually trust, researchers have long faced a trade-off. Large Language Models (LLMs) are incredibly flexible but prone to "hallucinations" and operate as opaque black boxes. Conversely, symbolic Expert Systems are transparent and logically sound but brittle and expensive to build. NELLIE (Neuro-Symbolic Large LM Inference Engine) attempts to marry these two worlds by performing systematic reasoning over natural language, producing human-readable "proof trees" strictly grounded in a corpus of authoritative facts.

Methodology: Reimagining the Expert System

NELLIE reimagines the classical expert system by replacing handcrafted rules with neural components. It uses a backward chaining search to recursively "prove" a hypothesis by breaking it down into simpler sub-claims. Unlike traditional systems that require facts to be converted into rigid code, NELLIE performs this rigorous reasoning directly on natural language text.

NELLIE's reasoning process: A hypothesis is recursively decomposed into sub-claims using template-conditioned language models and dense retrieval, with each step verified by NLI-based filters.

Key innovations include:

  • Dynamic Rule Generation (DRG): Instead of static rules, NELLIE uses a T5-3B model to generate candidate "decomposition rules" on the fly.
  • Weak Unification via NLI: NELLIE uses Natural Language Inference (NLI) models to perform "weak unification," matching generated claims to semantically equivalent facts in the corpus (e.g., matching "utilize" with "is used by").
  • Template-Conditioned Generation (TCG): To bridge the gap between free-form generation and fixed corpus facts, NELLIE uses templates (e.g., " is a kind of ") based on the structure of its knowledge base. This nudges the LLM toward rules that are more likely to find a match in the actual text corpus.
  • Dense Retrieval: FAISS-based vector search allows the system to ground the "leaves" of its proof tree in thousands of candidate facts from an authoritative text corpus.

Key Results and Insights

NELLIE demonstrates that grounding can be treated as a hard constraint without sacrificing performance. On the EntailmentBank QA benchmark, NELLIE (3B parameters) achieved 71.4% accuracy, significantly outperforming the similarly sized Entailer-3B (48.7%) and nearly matching the much larger Entailer-11B (73.2%).

Human evaluation of NELLIE’s correct answers found that 78% of the generated proof trees were "perfectly acceptable," ensuring the system arrives at the right answer for the right reasons.

Scaling with Knowledge

A unique advantage of NELLIE is its ability to improve without retraining. Unlike standard LLMs limited by their training data, NELLIE is improvable merely by adding statements to its knowledge base. By adding a pool of common knowledge facts to its retrieval index, the system's accuracy on OpenBookQA increased by 11-12%.

Performance boost on the WorldTree dataset when adding common knowledge facts, demonstrating NELLIE's ability to scale with external information.

Limitations and Future Work

While successful, NELLIE faces challenges related to search complexity, as the requirement for full grounding makes the search space massive. The system also occasionally falls for logical fallacies, such as property inheritance errors (e.g., concluding a penguin can fly because it is a bird). Future work will explore more sophisticated self-correction mechanisms and tighter integration between retrieval and generation to further prune the search space.

Summary updated

Abstract

We present an approach for systematic reasoning that produces human interpretable proof trees grounded in a factbase. Our solution resembles the style of a classic Prolog-based inference engine, where we replace handcrafted rules through a combination of neural language modeling, guided generation, and semiparametric dense retrieval. This novel reasoning engine, NELLIE, dynamically instantiates interpretable inference rules that capture and score entailment (de)compositions over natural language statements. NELLIE provides competitive performance on scientific QA datasets requiring structured explanations over multiple facts.
BibTeX
@inproceedings{weir2024dynamic,
  author = {Nathaniel Weir and Benjamin Van Durme},
  title = {{Dynamic Generation of Interpretable Inference Rules in a Neuro-Symbolic Expert System}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=782ySPQoqw},
}
Figure