Neuro-symbolic Natural Logic with Introspective Revision for Natural Language Inference

Yufei Feng, Xiaoyu Yang, Xiaodan Zhu, Michael A. Greenspan

Introduction

While Large Language Models (LLMs) like BERT and GPT have revolutionized Natural Language Processing (NLP), they often operate as "black boxes," making decisions through complex statistical patterns that lack transparency. This lack of interpretability is particularly problematic in Natural Language Inference (NLI), where models must determine if a premise entails or contradicts a hypothesis. Standard neural models frequently fail at basic logical tasks, such as understanding how truth values change under negation or quantifying word swaps.

This paper presents a neuro-symbolic framework that combines the pattern-recognition capabilities of neural networks with the structured, rule-based reasoning of "Natural Logic." By utilizing a novel training process called "Introspective Revision," the authors develop a system that not only achieves state-of-the-art performance on complex logical benchmarks but also provides human-readable explanations for its reasoning steps.

The Limitations of Purely Neural NLI

Modern transformers face three primary hurdles in logical reasoning:

  1. Monotonicity Inference: Models often struggle to understand how swapping words affects truth. For instance, while "all dogs bark" entails "all poodles bark," the inverse is not true. Conversely, under negation, the logic flips: "no dogs bark" does not entail "no poodles bark."
  2. Systematic Generalization: Neural models often fail to apply learned rules to novel combinations of words or quantifiers.
  3. Entangled Representations: The bi-directional attention mechanism in models like BERT allows information to flow across the entire sentence. While useful for context, this "entangles" the representation of individual phrases, making it nearly impossible to isolate the specific logical contribution of a single word or phrase to the final verdict.

Methodology: A Neuro-Symbolic Approach

The proposed framework addresses these issues by forcing the model to compose explicit symbolic reasoning paths. The architecture consists of three core components:

1. Local Relation Modeling

To prevent the "input entangling" found in bi-directional models, the authors utilize a uni-directional transformer (GPT-2). By processing sentences in discrete "chunks" or phrases, the model ensures that the prediction for one phrase pair is not influenced by future phrases. This preserves the causal structure necessary for a formal logical proof.

2. Natural Logic Backbone

The system relies on a symbolic backbone based on seven set-theoretic relations, including equivalence, forward entailment, and negation. The neural component predicts a relation for each phrase pair, which is then passed to a symbolic logic table. This table "composes" the individual relations to reach a final inference (Entailment, Contradiction, or Neutral).

3. Introspective Revision

Training symbolic models with Reinforcement Learning (RL) is notoriously difficult due to the "sparse reward" problem—most randomly sampled reasoning paths are incorrect, providing the model with little useful feedback. The authors introduce Introspective Revision to solve this:

  • Fail-and-Fix: If the model's initial reasoning path is incorrect, it triggers a revision process.
  • External Knowledge: The system consults external resources like WordNet to identify more plausible candidate relations for the phrases involved.
  • Grid Search: It performs a search to find a revised path that leads to the correct label.
  • Tutoring: The neural network then learns from these corrected paths, effectively using symbolic logic and external knowledge to "tutor" the neural weights.

Experimental Results

The model was trained on the standard SNLI dataset and evaluated on several challenging benchmarks designed to test logical rigor, including HELP, MED, and MoNLI.

Performance on Logical Reasoning

The neuro-symbolic model demonstrated a significant advantage over pure neural architectures in complex reasoning tasks:

  • Monotonicity (MoNLI): The model achieved 87.8% accuracy, vastly outperforming BERT-base (53.0%) and GPT-2 (57.5%).
  • Compositional Generalization: On tests involving unseen combinations of predicates and quantifiers, the model reached 95.1% accuracy, compared to BERT's 69.2%.
  • General Performance: Despite the strict logical constraints, the model remained competitive on the general SNLI test set with an accuracy of 87.5%.

Interpretability

A key advantage of this framework is its transparency. In human evaluations, 80% of the model's generated rationales (the sequence of logical steps) were judged as plausible. In contrast, a BERT-based equivalent provided plausible rationales only 29% of the time. This suggests that the model is not just guessing the correct label but is arriving at it through a valid logical process.

Discussion and Limitations

The research highlights that while bi-directional attention is often seen as a standard requirement for NLP, it can be a liability for formal logic. By restricting the model to uni-directional attention and symbolic composition, the authors achieve a "causal" proof structure.

However, the model is not without limitations. It remains dependent on external parsers (such as StanfordCoreNLP) to determine how specific words like "not" or "all" affect the logic of a sentence. Errors in these parsers can propagate through the system. Additionally, the Introspective Revision process is currently limited by the scope of WordNet; if a relationship involves domain-specific jargon not found in the database, the revision process is less effective.

Conclusion

This work represents a significant step toward more reliable and transparent AI. By integrating symbolic logic with neural learning through Introspective Revision, the authors demonstrate that it is possible to build models that are both high-performing and logically sound. Future work may focus on learning optimal sentence chunking strategies and reducing the dependency on static external knowledge bases.

Summary updated

BibTeX
@article{feng2022neuro,
  author = {Yufei Feng and Xiaoyu Yang and Xiaodan Zhu and Michael A. Greenspan},
  title = {{Neuro-symbolic Natural Logic with Introspective Revision for Natural Language Inference}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2022},
  doi = {10.1162/tacl\_a\_00458},
}
Figure