A model of errors in transformers
Suvrat Raju, and Praneeth Netrapalli · 2026
Read A model of errors in transformers by Suvrat Raju, and Praneeth Netrapalli (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-14175.txt.
Introduction
Suvrat Raju and Praneeth Netrapalli model why language models err on tasks with one right answer in 2026. Arithmetic is a prime case: it requires a deterministic output. Repetitive processing of tokens from a small set of alternatives is an other. The team argues errors arise inside the attention mechanism.
Small errors in attention accumulate as processing proceeds. When they cross a threshold, the prediction flips to a wrong one. The team derives a quantitative two-parameter relationship from this insight. It links accuracy to the complexity of the task in a testable way.
Catalog record
| CREATOR | Suvrat Raju, and Praneeth Netrapalli |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 71 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2601-14175
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A model of errors in transformers Suvrat Raju, and Praneeth Netrapalli Abstract We study the error rate of LLMs on tasks like arithmetic that require a deterministic output, and repetitive processing of tokens drawn from a small set of alternatives. We argue that incorrect predictions arise when small errors in the attention mechanism accumulate to cross a threshold, and use this insight to derive a quantitative two-parameter relationship between the accuracy and the complexity of the task. The two parameters vary with the prompt and the model; they can be interpreted in terms of an elementary noise rate, and the number of plausible erroneous tokens that can be predicted. Our analysis is inspired by an “effective field theory” perspective: the LLM’s many raw parameters can be reorganized into just two parameters that govern the error rate. We perform extensive empirical tests, using Gemini 2.5 Flash, Gemini 2.5 Pro and DeepSeek R1, and find excellent agreement between the predicted and observed accuracy for a variety of tasks, although we also identify deviations in some cases. Our model provides an alternative to suggestions that errors made by LLMs on long repetitive tasks indicate the “collapse of reasoning” ( Shojaee et al. 2025 ) , or an inability to express “compositional” functions ( Dziri et al. 2023 ) . Finally, we show how to construct prompts to reduce the error rate. 1 Introduction Large Language Models (LLMs) are versatile systems ( Brown et al. 2020 ; Raffel et al. 2020 ) that have shown remarkable success on a variety of benchmarks ( Laskar et al. 2023 ; Chang et al. 2024 ) . However, state of the art models still make errors even on relatively simple problems ( Huang et al. 2025 ) . To understand and prevent these errors is an important problem. With this broad motivation, we examine errors made by LLMs on a simple class of problems. We focus on a class of deterministic tasks in which the input, the output, or both comprise a sequence of tokens, each drawn from a small set, and study the variation of the error rate with the length of the task. This class includes decimal and binary arithmetic ( Yuan et al. 2023 ; Shen et al. 2023 ; Maltoni & Ferrara 2024 ; Zhang et al. 2024 ; Shrestha et al. 2025 ; Sun et al. 2025 ; Bertolazzi et al. 2025 ; Feng et al. 2025 ) , some classic dynamic programming problems ( Dziri et al. 2023 ) , the tower of Hanoi ( Shojaee et al. 2025 ) , list reversal, and nested application of linear transformations. These problems are not of direct practical interest since LLMs can easily write code to solve them ( Chen et al. 2021 ; Wang & Chen 2023 ; Jiang et al. 2024 ; Yang et al. 2024 ) . Nevertheless they provide a clean arena where LLM errors can be identified, modeled and ameliorated. Our second objective is to demonstrate that LLMs can be treated like other natural systems, and techniques from the natural sciences can be utilized to study them quantitatively ( Kaplan et al. 2020 ; Allen-Zhu & Li 2024 ) . We describe a quantitative model that predicts the accuracy of LLMs on this class of tasks, and then verify the model empirically. Although LLMs have hundreds of billions of parameters, our final result has only two parameters that vary with the prompt and the specific model. These parameters have a simple interpretation — a small number, r that can be related to an elementary “noise rate” per token, and an order-1 number, q , that describes the number of potential “error directions”. We propose that the accuracy of the model, a , varies with the complexity of the task, c , as a={1\over\Gamma({q\over 2})}\gamma({q\over 2},{q\over 2rc^{2\alpha}}) (1) where \gamma(x,y) denotes the incomplete gamma function \gamma(x,y)=\int_{0}^{y}t^{x-1}e^{-t}dt, (2) \Gamma(x)\equiv\gamma(x,\infty) is the gamma function, and we suggest fixing \alpha=1 . We derive this formula in section 2 , starting with the hypothesis that the operation of an LLM can be modeled via an effective model that implements self-attention ( Luong et al. 2015 ; Bahdanau et al. 2015 ; Vaswani et al. 2017 ) . Errors arise because the parameters of the effective model differ slightly from the parameters required to make a correct prediction. These errors accumulate across the context and lead the output of each attention layer to differ from the correct output. If the projection of the final output vector onto an incorrect token becomes significant—which we assume happens when this error crosses a threshold—the model makes an incorrect prediction. A simple scaling argument, and additional assumptions about the probability distribution of the errors lead to formula ( 1 ). Our formula provides a remarkably accurate characterization of errors made by LLMs in extensive empirical tests comprising 8 different tasks, 3 state-of-the-art LLMs, and 0.2 million distinct prompts. However, we find systematic deviations in some cases, and our formula fails completely in one example. We use this failure to deduce the presence of additional effects that are important in this case, and construct a modified problem where these effects are insignificant, so that the formula can be applied successfully. The fact that a large number of parameters reorganize themselves into a small number of effective parameters—for the purpose of predicting errors—is reminiscent of the paradigm of “effective field theory” that is used in physics ( Georgi 1993 ; Burgess 2020 ) . For example, a fluid is fundamentally described by a large number of microscopic parameters. But, in simple experiments, its behaviour is captured by a small set of effective parameters such as its density and viscosity. This is analogous to what we see in our experiments. We hasten to add that, in physics, the reorganization of fundamental parameters into effective parameters is understood via a mature mathematical framework ( Polchinski 1992 ) that we currently lack in the context of LLMs. Our investigation is only suggestive that a similar framework might be applied fruitfully to the study of large models. 1.1 Previous work The performance of LLMs on arithmetic has been studied extensively. For instance, it has been proposed that errors arise because they use “pattern matching” rather than algorithms ( Nikankin et al. 2024 ) or due to incorrect tokenization ( Singh & Strouse 2024 ) . Experiments with dynamic programming and multiplication led to the suggestion ( Dziri et al. 2023 ) that LLMs lack the expressive power to compute compositional functions. The tower of Hanoi was studied in ( Shojaee et al. 2025 ) , where it was suggested that LLM reasoning collapses beyond a threshold. We do find some evidence that LLMs adopt inconsistent algorithms for tasks like arithmetic. However, our broad perspective differs from previous investigations. We hypothesize that models make errors due to their failure to implement attention precisely in tasks that involve a large number of similar tokens. The agreement of the empirically observed error rate with our quantitative formula in several cases — including examples where algorithms are explicitly provided — provides evidence for this hypothesis. This paper is organized as follows. In section 2 , we describe our