When can transformers reason with abstract symbols?
We investigate the capabilities of transformer models on relational reasoning tasks. In these tasks, models are trained on a set of strings encoding abstract relations, and are then tested out-of-distribution on data that contains symbols that did not appear in the training dataset. We prove that for any relational reasoning task in a large family of tasks, transformers learn the abstract relations and generalize to the test set when trained by gradient descent on sufficiently large quantities of training data. This is in contrast to classical fully-connected networks, which we prove fail to learn to reason. Our results inspire modifications of the transformer architecture that add only two trainable parameters per head, and that we empirically demonstrate improve data efficiency for learning to reason.
Code (1)
Tasks
Relational ReasoningSimilar Papers 제목 키워드 기반
When Symbol Names Should Not Matter: A Logistic Theory of Fresh-Symbol Classification
Template tasks have emerged as a clean testbed for asking whether transformers reason with abstract symbols rather than concrete token names. We study the fixed-label classification version of this problem, where train a…
Semantic Deception: When Reasoning Models Can't Compute an Addition
Large language models (LLMs) are increasingly used in situations where human values are at stake, such as decision-making tasks that involve reasoning when performed by humans. We investigate the so-called reasoning capa…
STEM-POM: Evaluating Language Models Math-Symbol Reasoning in Document Parsing
Advances in large language models (LLMs) have spurred research into enhancing their reasoning capabilities, particularly in math-rich STEM documents. While LLMs can generate equations or solve math-related queries, their…
2kIn-Context LearningMathMathematical ReasoningProperty Invariant Embedding for Automated Reasoning
Automated reasoning and theorem proving have recently become major challenges for machine learning. In other domains, representations that are able to abstract over unimportant transformations, such as abstraction over t…
Automated Theorem ProvingGraph Neural NetworkSymbols as a Lingua Franca for Bridging Human-AI Chasm for Explainable and Advisable AI Systems
Despite the surprising power of many modern AI systems that often learn their own representations, there is significant discontent about their inscrutability and the attendant problems in their ability to interact with h…