A model of errors in transformers

Suvrat Raju, Praneeth Netrapalli

Large Language Models (LLMs) often struggle with seemingly simple, repetitive, and deterministic tasks, such as large-number arithmetic or executing long sequences of instructions. Historically, researchers have attributed these failures to a "collapse of reasoning" or an inherent flaw in the Transformer architecture's ability to handle compositional logic.

However, the paper A model of errors in transformers proposes a radically different, physics-inspired perspective: these failures are not a breakdown in logic, but rather the predictable accumulation of noise. By treating LLM errors as a quantitative threshold problem, the authors provide a predictive framework to understand model reliability as task complexity scales.

The Effective Field Theory of LLM Errors

Borrowing from "Effective Field Theory" in physics—where complex systems with countless moving parts are described by a few macro-variables—the authors distill the behavior of billions of neural network parameters into a simple two-parameter model.

The core hypothesis is that every time an LLM utilizes its attention mechanism, it introduces a tiny amount of noise. As the length or complexity of a task ($c$) grows, these tiny errors accumulate. An error manifests only when the accumulated noise vector crosses a specific threshold, overwhelming the signal and causing the model to project its output onto an incorrect token.

Using assumptions about Gaussian noise distributions, the authors derive a mathematical relationship for accuracy ($a$):

$$a = \frac{1}{\Gamma(q/2)} \gamma\left(\frac{q}{2}, \frac{q}{2rc^{2\alpha}}\right)$$

In this equation:

  • $r$ represents the elementary "noise rate" per token.
  • $q$ represents the number of "error directions," or how many plausible incorrect tokens are competing with the correct one.
  • $c$ is the complexity or length of the task.

Empirical Validation

To test this theory, the researchers conducted a massive empirical study utilizing 200,000 distinct prompts. They evaluated three state-of-the-art models—Gemini 2.5 Flash, Gemini 2.5 Pro, and DeepSeek R1—across eight deterministic tasks. These tasks included list reversal, nested linear transformations (iterative $Ax + B$ math), dynamic programming, Tower of Hanoi, and various forms of addition and multiplication.

The two-parameter formula demonstrated excellent agreement with observed error rates across almost all tasks and models, yielding several key insights:

  • The "Plateau and Plummet" Effect: The model predicts, and empirical data confirms, that accuracy remains near 100% for a certain context length before dropping off sharply. This indicates that models possess a "buffer" for noise that eventually gets overwhelmed as complexity scales.
  • Algorithmic Consistency: The mathematical model assumes the LLM uses the same "effective algorithm" regardless of task length. During testing, Gemini 2.5 Pro initially failed to fit the theoretical curve on "Vanilla Addition." The researchers discovered the model was switching between different internal heuristics depending on the length of the numbers. When they forced the model to follow a specific, step-by-step algorithm via prompting, its performance aligned perfectly with the theory.
  • Prompt Engineering as Noise Reduction: Because errors stem from the attention mechanism losing focus, prompt engineering can act as a noise-reduction tool. By "tagging" tokens—such as representing digits as coefficients in a polynomial—users can help the attention mechanism stay focused on relevant information. Remarkably, using these noise-reduction prompts allowed the smaller Gemini 2.5 Flash model to outperform the much larger Gemini 2.5 Pro on complex multiplication tasks.

Limitations and Future Directions

Currently, this framework is limited to deterministic tasks that require a specific correct answer drawn from a small set of possible tokens (like digits or bits). It has not yet been tested on open-ended reasoning or creative writing tasks. Furthermore, the formula requires adjustment if a model dynamically changes its problem-solving strategy as a task gets harder.

Despite these limitations, the study provides a powerful new lens for understanding Transformer limitations. Instead of trying to teach models how to "reason" better on repetitive tasks, the authors suggest that future Transformer architectures could be explicitly designed to automatically weed out irrelevant tokens. Doing so would effectively lower the noise rate ($r$), extending the plateau of perfect accuracy and making LLMs vastly more reliable on long, complex operations.

Summary updated

BibTeX
@inproceedings{raju2026model,
  author = {Suvrat Raju and Praneeth Netrapalli},
  title = {{A model of errors in transformers}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=fbabBXNeqw},
}
Figure