A model of errors in transformers
This paper proposes a quantitative two-parameter model, inspired by effective field theory, which explains LLM errors in deterministic tasks as the accumulation of small attention mechanism noise crossing a threshold, demonstrating strong empirical agreement across multiple models and offering a framework to reduce error rates through prompt engineering.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the author. For technical accuracy, refer to the original paper. Read full disclaimer
In the quiet hum of modern computing, a new kind of intelligence has emerged, one that can write poetry, solve riddles, and draft code with startling fluency. These large language models are trained on vast libraries of human text, learning to predict the next word in a sentence with such sophistication that they often seem to understand the world. Yet, despite their ability to mimic human conversation, they stumble on tasks that require strict, step-by-step logic. When asked to add two long numbers together or reverse a list of items, these systems sometimes produce nonsense, even though the rules of the game are simple and unchanging. This inconsistency has led researchers to wonder: is the problem a lack of true reasoning, or is it something more mechanical, a flaw in how the machine processes information over long stretches of text?
A team of researchers set out to investigate this mystery by treating the machine not as a black box of mysterious intelligence, but as a physical system subject to the same kinds of errors that affect other complex processes. They focused on tasks that require the model to generate a sequence of answers, one token after another, where each step depends on the last. They hypothesized that the machine does not fail because it cannot understand the logic, but because tiny, almost invisible mistakes in its internal calculations build up over time. Imagine a person trying to walk a straight line while wearing glasses that distort their vision by a fraction of a degree; at first, they stay on course, but after a hundred steps, they have drifted far off. The researchers proposed that these models suffer from a similar drift, where small errors in how they weigh different parts of a sentence accumulate until the final answer is wrong.
To test this idea, the team ran extensive experiments using three of the most advanced models available, feeding them hundreds of thousands of different prompts. They asked the models to perform a variety of repetitive tasks, such as reversing lists, solving dynamic programming puzzles, and moving imaginary disks in the classic Tower of Hanoi game. In each case, they measured how often the model got the answer right as the length of the task increased. The results were striking. The models did not fail randomly; instead, their accuracy followed a predictable curve. For short tasks, they were nearly perfect. But as the number of steps grew, the chance of making a mistake increased in a specific, mathematical way that the researchers could describe with just two simple numbers. One number represented the frequency of tiny, random slips in the machine's attention, while the other described how many different ways those slips could lead to a wrong answer.
This finding challenges a popular belief that these models fail because they lack the ability to combine simple ideas into complex thoughts, or because their reasoning "collapses" under pressure. The researchers found that when they forced the models to follow a strict, step-by-step algorithm provided in the prompt, the errors still followed the same predictable pattern. This suggests that the problem is not a failure of logic or a lack of intelligence, but rather a mechanical issue of noise accumulation. The models are essentially trying to hold a straight line, but the internal "noise" in their attention mechanism causes them to wobble, and the longer the task, the more that wobble adds up. The researchers noted that this behavior is similar to how physicists describe fluids: while a fluid is made of countless individual molecules, its overall behavior can be described by just a few simple properties like density and viscosity. Similarly, the billions of parameters inside these massive models seem to organize themselves into just two effective factors that determine how often they make mistakes.
The study also offered a practical solution to this problem. The researchers discovered that they could reduce the error rate by changing how they asked the questions. By adding specific tags to the prompt that helped the model focus its attention more sharply on the relevant parts of the task, they were able to keep the model on track for longer. In one experiment involving multiplication, a modified prompt allowed a smaller model to outperform a much larger, more advanced model using a standard prompt. This suggests that the errors are not inevitable flaws of the technology, but rather a consequence of how the model is guided. The researchers concluded that while these models are incredibly powerful, their reliability on long, repetitive tasks is limited by the accumulation of small, random errors in their attention mechanisms. By understanding this limit, we can design better prompts to keep these digital minds focused, turning a system that drifts into one that stays the course.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.