DeepAI AI Chat
Log In Sign Up

Transformers as Soft Reasoners over Language

by   Peter Clark, et al.
Allen Institute for Artificial Intelligence

AI has long pursued the goal of having systems reason over *explicitly provided* knowledge, but building suitable representations has proved challenging. Here we explore whether transformers can similarly learn to reason (or emulate reasoning), but using rules expressed in language, thus bypassing a formal representation. We provide the first demonstration that this is possible, and characterize the extent of this capability. To do this, we use a collection of synthetic datasets that test increasing levels of reasoning complexity (number of rules, presence of negation, and depth of chaining). We find transformers appear to learn rule-based reasoning with high (99 on these datasets, and in a way that generalizes to test data requiring substantially deeper chaining than in the training data (95 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 a limited "soft theorem prover" operating over explicit theories in language. This in turn suggests new possibilities for explainability, correctability, and counterfactual reasoning in question-answering. All datasets and a live demo are available at


page 7

page 8


Can Transformers Reason About Effects of Actions?

A recent work has shown that transformers are able to "reason" with fact...

AbductionRules: Training Transformers to Explain Unexpected Inputs

Transformers have recently been shown to be capable of reliably performi...

Pushing the Limits of Rule Reasoning in Transformers through Natural Language Satisfiability

Investigating the reasoning abilities of transformer models, and discove...

Learning Symbolic Rules for Reasoning in Quasi-Natural Language

Symbolic reasoning, rule-based symbol manipulation, is a hallmark of hum...

Does entity abstraction help generative Transformers reason?

Pre-trained language models (LMs) often struggle to reason logically or ...

Transformers generalize differently from information stored in context vs in weights

Transformer models can use two fundamentally different kinds of informat...

Extending Equational Monadic Reasoning with Monad Transformers

There is a recent interest for the verification of monadic programs usin...