arXiv:2610.32104cs.LGOct 2026

Manuscript Offprint

arXiv:2610.32104

Putting Transformer Theories to the Test

Awni Altabaa, Tobias Schnabel, Kiran Tomlinson

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Several formal theories have been developed to characterize the capabilities and limitations of the transformer architecture, each employing different abstractions that capture different features of the architecture. Due to the differences in their underlying assumptions and conceptual frameworks, these theories can disagree in their predictions about what tasks transformers find easy or hard. We map out seven theories of transformer capability (Star-free, AC 0^{0}, TC 0^{0}, C-RASP, MPC, BAPO, and Sensitivity) and translate their results into a common matrix of predictions across a suite of tasks covering different computational structures. We provide new theoretical results to complete this matrix. We then evaluate theoretical predictions through controlled experiments measuring in-distribution sample complexity, length generalization, and pretrained language model performance. We find that no single theory explains the observed pattern of successes and failures. When a theory does not capture the transformer behaviors relevant to a task, its predictions break down; for instance, we show that the k-hop induction task is predicted hard by C-RASP because it does not model content-dependent attention, but we train small transformers on this task that length-generalize. Similarly, theories assuming hard attention like AC 0^{0} and BAPO predict binary majority to be hard, for which we also find success in practice. Together, our results point to several specific features that a theory of transformers must capture: soft rather than hard attention, dynamic content-dependent retrieval, bounded computation at each position, an account of learnability and inductive biases, and a combination of upper and lower bounds.

1 Introduction

Since its introduction by Vaswani et al. (2017), the transformer architecture has seen enormous practical success, becoming the workhorse of modern artificial intelligence. In response to this rapid advance in empirical performance, a variety of different theoretical research has emerged to try to explain the capabilities and limitations of the transformer architecture (Strobl et al., 2024; Hahn, 2020; Merrill, Sabharwal, and Smith, 2022; Weiss, Goldberg, and Yahav, 2021; Schnabel et al., 2025; Sanford, Hsu, and Telgarsky, 2024, among many others). With this improved understanding, research can be guided towards the most promising modified architectures and learning algorithms (e.g., Merrill et al., 2026). A theory is most valuable when it can explain and make predictions about real-world phenomena (Popper, 1959; Kuhn, 1962), for instance, if a theory of transformers accurately predicts which tasks they will solve in practice. However, given the complexity of real-world neural networks, theoretical analyses of transformers have used different abstractions and assumptions leading to different hardness predictions for different tasks. As a result, it is not always clear which theories or abstractions we should keep in mind when reasoning about the behavior of transformers.

In this work, we seek to shrink the gap between transformer theory and practice by comparing

∗^{*}Part of this work was done while interning at Microsoft Research.

predictions from seven different theoretical frameworks against the empirical performance of small task-specific transformers as well as frontier language models. For this comparison, we identify a collection of common tasks that are predicted easy or hard for transformers across theories, including Boolean problems like majority and parity, graph problems like reachability, and syntactic problems like Dyck string recognition. Where existing analyses are lacking, we provide new theoretical results and constructions.

At a high level, our results illustrate that no theory fully captures the behavior of either small task-specific transformers or of large pretrained language models. Across theories, predictions that a problem is hard tend to be much more accurate than predictions that a problem is easy. This highlights a weakness of current theoretical practice: “easy” predictions tend to be a result of handcrafted constructions, but there is no guarantee that training can identify these constructions. Moreover, certain theoretical frameworks only provide loose upper bounds, so their easy predictions only say that a task is not ruled out. Conversely, a correct hard prediction does not imply a correct explanation for the failure. For example, transformers fail to fit even their training data on PARITY, which points to an optimization barrier rather than the expressivity limits behind several theories’ hardness predictions. Additionally, positional encodings strongly affect whether a transformer length-generalizes, and our experiments show that different encodings are needed for different tasks; current theory does not account for these inductive biases. This motivates future theoretical focus on learnability and inductive biases, an area that has seen only limited progress relative to the work on expressivity (Hahn and Rofin, 2024; Huang et al., 2025a; Golowich et al., 2025). Our experiments also show that pretrained LLMs behave differently from small transformers trained from scratch, which suggests that a theory of LLMs must also account for their data and training, not only the architecture.

At a more granular level, each theory captures some features of transformers and omits others, and our experiments show that its predictions tend to fail when performance depends on a feature it omits. For example, theories that assume hard attention (Hao, Angluin, and Frank, 2022; Yang, Chiang, and Angluin, 2024; Barceló et al., 2024) cannot express global aggregation, so they predict that tasks such as MAJORITY are hard, yet transformers learn these tasks and even length-generalize. In contrast, the popular C-RASP abstraction (Yang and Chiang, 2024; Yang, Cadilhac, and Chiang, 2025) captures global aggregation by modeling attention as uniform averaging, but cannot express content-dependent retrieval. We prove that C-RASP requires exponential size to solve a retrieval task that softmax attention transformers solve efficiently, and we observe the same gap in trained transformers. In the other direction, theories that rely on loose upper bounds from circuit complexity, or that model only communication and allow unbounded local computation, predict that transformers can solve many tasks that they fail to learn in practice. (Put another way, a theoretical analysis providing only upper bounds is an incomplete account of what tasks we should expect transformers to solve.) Together, these results guide the search for more practical theories of transformers, built on compact abstractions whose primitives capture the essential features that explain what transformers can learn.