[论文解读] A model of errors in transformers
该论文提出一个用于确定性基于令牌的任务的 LLMs 的双参数误差模型,通过一种有效场论启发的框架将准确率与任务复杂性联系起来,并在多种模型和任务中进行验证。
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'', or an inability to express ``compositional'' functions. Finally, we show how to construct prompts to reduce the error rate.
研究动机与目标
- 理解并防止 LLMs 在确定性、基于令牌的任务中发生错误的动机。
- 提出一个有效的两参数模型,将 LLM 行为的复杂性简化为 r(每个令牌的噪声率)和 q(错误方向的数量)。
- 推导准确率与任务复杂性之间的定量关系,并通过有效场论视角进行解释。
- 在多项任务与模型上进行实证验证模型,并分析其成功与失败的情形。
- 提出实用的提示设计以降低错误率,并讨论架构改进的可能方向。
提出的方法
- Develop an physics-inspired error model where an effective model ${\\text{M}}_{\\text{eff}}$ shares architecture with an idealized model but with perturbed parameters.
- Define complexity c as the minimal token processing required to solve a task and assume accuracy a follows a two-parameter formula involving r and q (and an incomplete gamma function).
- Assume error decomposition with q plausible directions and Gaussian-distributed coefficients with variance scaling as v ~ c^{2α}, setting α=1 based on empirical fits.
- Derive a final expression a = (1/Γ(q/2)) γ(q/2, q/(2 r c^{2α})) and justify it with scaling arguments and attention-layer dynamics.
- Test the formula across 8 tasks, 3 models, and 0.2 million prompts, analyzing when and why deviations occur.
- Explore a prompt design that tags tokens to reduce attention noise and improve accuracy.

实验结果
研究问题
- RQ1一个两参数模型(r 和 q)是否能够捕捉确定性、基于令牌的任务中 LLMs 的错误率?
- RQ2任务复杂性 c 如何影响准确率,基于不完全伽马函数的公式是否能在不同模型和提示下预测?
- RQ3基于有效场论的 LLM 抽象是否与多样的算术与算法任务的经验观察相符?
- RQ4有哪些提示设计策略可以在实际中减少注意力相关的错误?
- RQ5在何种条件下模型会失败,这样的失败对假设(如 A1)揭示了什么?
主要发现
- 提出的公式 a = (1/Γ(q/2)) γ(q/2, q/(2 r c^{2α})) 能在 8 项任务、3 种模型、以及 0.2 百万提示的数据上拟合准确率,且 q 的数量级为 1。
- 经验测试显示在多数情况下与公式良好一致,但在某些情形的偏差指出了模型之外的额外效应。
- 在一个已记录的案例(Vanilla 加法与 Gemini Pro)中,公式不成立,促使对输入长度的一致性算法进行调查。
- 强制模型遵循特定算法可恢复与公式的一致性,支持错误源于注意力中的噪声累积,而非根本的推理崩溃。
- 一种实用的提示设计——用多项式表示对令牌进行标记——可以提高准确性,展示了降低错误率的途径。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。