Abstract
Beginning with McCarthy's Advice Taker (1959), AI has pursued the goal of providing a system with explicit, general knowledge and having the system reason over that knowledge. However, expressing the knowledge in a formal (logical or probabilistic) representation has been a major obstacle to this research. This paper investigates a modern approach to this problem where the facts and rules are provided as natural language sentences, thus bypassing a formal representation. We train transformers to reason (or emulate reasoning) over these sentences using synthetically generated data. Our models, that we call RuleTakers, provide the first empirical demonstration that this kind of soft reasoning over language is learnable, can achieve high (99%) accuracy, and generalizes to test data requiring substantially deeper chaining than seen during training (95%+ scores). We also demonstrate that the models transfer well to two hand-authored rulebases, and to rulebases paraphrased into more natural language. These findings are significant as it suggests a new role for transformers, namely as limited "soft theorem provers" operating over explicit theories in language. This in turn suggests new possibilities for explainability, correctability, and counterfactual reasoning in question-answering.
Introduction: The Reasoning Gap
For decades, artificial intelligence research has navigated a divide between symbolic logic—which offers precision but struggles with the ambiguity of human language—and connectionist deep learning, which excels at language processing but often lacks transparent multi-step reasoning capabilities. Traditionally, enabling a machine to reason required "semantic parsing," the difficult and brittle process of translating natural language into formal representations like first-order logic.
This research explores a third path: can we skip formal logic entirely? By training Transformers to treat natural language sentences directly as rules and facts, the authors demonstrate that these models can act as "soft theorem provers," emulating deductive reasoning without explicit symbolic translation.
Methodology: Emulating Logic in Natural Language
Comparison between traditional formal reasoning and the proposed linguistic analog using Transformers. Source, p. 2
The researchers developed a "synthetic-to-natural" pipeline to train their models, dubbed RuleTakers. The process involved:
- Theory Generation: Using a formal logic engine to create thousands of theories consisting of facts (e.g., "Alan is blue") and rules (e.g., "If someone is young and round then they are kind").
- Logic Emulation: A formal reasoner calculated implications based on the "Closed World Assumption" (unprovable statements are considered false).
- Linguistic Synthesis: These formal structures were converted into templated English sentences.
- Training: A RoBERTa-large model was fine-tuned as a binary classifier to predict the truth value of a statement given a context of facts and rules.
To ensure the model learned the underlying logic rather than simple linguistic patterns, the team tested it against deeper reasoning chains than those seen during training and used crowdworkers to paraphrase rules into varied, natural English (the ParaRules dataset).
Experimental Results and Generalization
Accuracy of RuleTaker models across varying reasoning depths, demonstrating strong generalization to deeper chains. Source, p. 5
The results indicate that Transformers are remarkably capable of learning the "algorithm" of deduction. RuleTakers achieved near-perfect 99% accuracy on test data within their training depth. More significantly, the models demonstrated robust generalization to deeper reasoning chains. For instance, a model trained only on reasoning depths up to 3 (Mod3) still achieved 97.6% accuracy on problems requiring 5 steps of inference.
Beyond synthetic data, the models showed impressive zero-shot transfer capabilities. Without additional training, they solved hand-authored logic puzzles (like the "Birds" and "Electricity" rulebases) with over 90% accuracy, despite the novel vocabulary and rules. This suggests the models are learning a generalizable reasoning process rather than just memorizing specific templates.
Discussion and Future Directions
While RuleTakers represent a significant step toward explainable AI, limitations remain. Current models handle relatively simple single-variable rules; moving toward multi-variable implications (e.g., familial relationships) is a necessary next step. Additionally, the fixed context window of current Transformers limits the size of the knowledge base they can reason over at once.
Despite these challenges, the ability of Transformers to perform "soft reasoning" over language opens new doors for AI systems that are both linguistically flexible and logically rigorous, providing a foundation for more transparent and correctable question-answering systems.
Summary updated