用注意力误差累积解释大模型算术错误,可预测准确率与任务复杂度关系。
A model of errors in transformers
- 基于注意力机制误差累积,建立准确率与任务复杂度的双参数模型。
- 实测显示模型预测准确率与观察结果高度吻合,尤其在重复计算任务中。
- 适用于分析算术、重复处理等需确定输出的任务,适合关注推理可靠性的研究者。
我们研究了大语言模型在需要确定性输出的算术任务中出现的错误率,这些任务涉及从少量候选词中重复处理令牌。我们认为,当注意力机制中的微小误差积累并越过阈值时,就会导致错误预测,并据此推导出准确率与任务复杂度之间的定量双参数关系。这两个参数随提示和模型变化,可解释为基本噪声率及可能被错误预测的合理令牌数量。该分析受有效场论视角启发:大模型的大量原始参数可重新组织为仅两个决定误差率的参数。我们使用 Gemini 2.5 Flash、Gemini 2.5 Pro 和 DeepSeek R1 进行了广泛实证测试,发现预测准确率与实际观测结果高度一致,尽管在某些情况下存在偏差。该模型为长重复任务中的错误提供了不同于“推理坍塌”或“组合函数表达失败”的解释。最后,我们展示了如何通过构造提示来降低错误率。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。