2026-01-07 · 专家 · 自然语言处理 · 机器学习

Mechanistic Interpretability of Large-Scale Counting in LLMs through a System-2 Strategy

该论文提出了一种基于系统-2认知过程的简单测试时间策略,通过将大型计数任务分解为更小的子任务来提高大型语言模型在计数任务中的准确性。

更新于 2026-01-13。作者:Hosein Hasani、Mohammadali Banayeeanzade、Ali Nafisi、Sadegh Mohammadian、Fatemeh Askari、Mobin Bagherian、Amirmohammad Izadi、Mahdieh Soleymani Baghshah。

中文摘要

大型语言模型(LLMs)虽然在复杂数学问题上的表现强劲,但在计数任务中却表现出系统性限制。这个问题源于变换器架构的限制,计数是在层之间进行的,由于深度限制,对于较大的计数问题,精度会下降。为了解决这个限制,我们提出了一种简单的测试时策略,该策略受制于System-2认知过程的启发,将大型计数任务分解成更小的、独立的子问题,这些子问题模型可以可靠地解决。我们使用观察法和因果中介分析来评估这种方法,以了解这种类似System-2策略的潜在机制。我们的机制分析确定了关键组成部分:潜在计数被计算并存储在每个部分的最终项目表示中,通过专门的注意力头来传递到中间步骤,并在最终阶段汇总以产生总数。实验结果表明,这种策略使LLMs能够超越架构限制,在大规模计数任务上实现高精度。这项工作为LLMs中的System-2计数提供了机制见解,并提出了一种可推广的方法,用于改进和理解它们的推理行为。

英文摘要

Large language models (LLMs), despite strong performance on complex mathematical problems, exhibit systematic limitations in counting tasks. This issue arises from architectural limits of transformers, where counting is performed across layers, leading to degraded precision for larger counting problems due to depth constraints. To address this limitation, we propose a simple test-time strategy inspired by System-2 cognitive processes that decomposes large counting tasks into smaller, independent sub-problems that the model can reliably solve. We evaluate this approach using observational and causal mediation analyses to understand the underlying mechanism of this System-2-like strategy. Our mechanistic analysis identifies key components: latent counts are computed and stored in the final item representations of each part, transferred to intermediate steps via dedicated attention heads, and aggregated in the final stage to produce the total count. Experimental results demonstrate that this strategy enables LLMs to surpass architectural limitations and achieve high accuracy on large-scale counting tasks. This work provides mechanistic insight into System-2 counting in LLMs and presents a generalizable approach for improving and understanding their reasoning behavior.

解读

一句话总结

该论文提出了一种基于系统-2认知过程的简单测试时间策略,通过将大型计数任务分解为更小的子任务来提高大型语言模型在计数任务中的准确性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt