Abstract
Automated Theorem Proving (ATP) deals with the development of computer programs being able to show that some conjectures (queries) are a logical consequence of a set of axioms (facts and rules). While traditional ATPs require formal logic inputs, recent transformer-based architectures like RuleTaker have attempted to derive conjectures from axioms expressed in natural language. However, these models often struggle to generalize to reasoning depths beyond their training data. We propose the Neural Unifier, an architecture that mimics backward chaining to achieve state-of-the-art generalization, answering deep queries even when trained only on shallow ones. Our approach demonstrates that by mimicking well-known inference procedures, neural models can solve complex reasoning tasks with significantly less complex training data.
Introduction: The Challenge of Natural Language Reasoning
Traditional Automated Theorem Proving (ATP) relies on formal logic, requiring human experts to translate natural language into symbolic formulas. Recent advancements in deep learning have attempted to bypass this translation step by training Transformers to reason directly over text. Models like RuleTaker treat reasoning as a binary classification task: given a set of facts and rules in English, is a specific query True or False?
While promising, these "black-box" models face a significant hurdle: generalization. A standard Transformer trained on 1-step or 2-step logic problems typically fails when confronted with 5-step problems. To achieve high accuracy on deep reasoning, these models currently require massive datasets of complex examples, which are difficult to curate for real-world applications.
The Neural Unifier Architecture
To address this, we developed the Neural Unifier, a modular architecture designed to mimic the classical "backward chaining" inference strategy. Backward chaining starts with a goal and works backward through rules to find supporting facts. The system consists of two primary components:
- Fact-checking Unit (FU): This component is pre-trained on simple "depth-0" queries (direct fact lookups) and then frozen.
- Unification Unit (UU): The core reasoning engine. It takes a complex query and a set of rules, attempting to transform the query into a simpler intermediate representation.
The training process employs a unique "inductive bias" trick. The UU's output is fed into the frozen FU. Errors in the FU's prediction are backpropagated into the UU, forcing it to learn how to "unify" complex queries with rules into simpler forms that the fact-checker can eventually validate. This allows the model to learn the fundamental mechanism of logical simplification rather than just memorizing linguistic patterns.
Experimental Results and Generalization
We evaluated the Neural Unifier across several benchmarks, including synthetic rule reasoning data, paraphrased natural language datasets, and zero-shot domain transfers (e.g., electrical circuits).
The most significant finding is the model's ability to perform "Zero-Shot Depth" reasoning. As shown in the performance data, when the Neural Unifier (NU) is trained on queries requiring only up to 2 steps of logic (D=2), it maintains an impressive 95.0% accuracy on queries requiring 5 steps of reasoning. In contrast, the previous state-of-the-art RuleTaker (RT) models see a sharp decline in performance when tested on depths exceeding their training distribution.
Furthermore, the model proved robust against linguistic variations. On paraphrased datasets where rules and facts are expressed in creative, non-formulaic language, the NU maintained near-perfect accuracy on provable queries. While the model is exceptionally good at "provable" queries, it performs less consistently on queries that are false due to the "Closed World Assumption," suggesting that proving a negative remains a distinct challenge.
Conclusion and Future Directions
The Neural Unifier demonstrates that by embedding structural algorithmic logic—like backward chaining—into neural architectures, we can create models that generalize far beyond their training data. While the current model performs unification in a "hidden" vector space, future work will focus on improving interpretability to make these intermediate steps human-readable. Additionally, we aim to expand the architecture to handle abductive reasoning and move toward an "Open World Assumption" where the model can identify when information is insufficient to reach a conclusion.
Summary updated