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.


翻译:尽管大型语言模型(LLMs)在复杂数学问题上表现出色,但在计数任务中仍存在系统性局限。这一问题源于Transformer架构的限制:计数操作需跨层执行,而模型深度约束导致大规模计数任务的精度下降。为克服此限制,我们提出一种受系统-2认知过程启发的简单测试时策略,将大规模计数任务分解为模型可可靠求解的独立子问题。我们通过观测性分析与因果中介分析评估该方法,以理解此类系统-2策略的内在机制。机制分析揭示了三个关键环节:潜在计数被计算并存储在各部分的最终项表示中,通过专用注意力头传递至中间步骤,最终在聚合阶段生成总数。实验结果表明,该策略能使LLMs突破架构限制,在大规模计数任务中实现高精度。本研究为LLMs中的系统-2计数机制提供了原理性解释,并提出了一种可推广的改进与理解其推理行为的方法。

0
下载
关闭预览

相关内容

Segment Anything模型的高效变体:综述
专知会员服务
27+阅读 · 2024年10月11日
【CVPR2023】DynamicDet:目标检测的统一动态架构
专知会员服务
26+阅读 · 2023年4月15日
MonoGRNet:单目3D目标检测的通用框架(TPAMI2021)
专知会员服务
18+阅读 · 2021年5月3日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
1+阅读 · 2016年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
Segment Anything模型的高效变体:综述
专知会员服务
27+阅读 · 2024年10月11日
【CVPR2023】DynamicDet:目标检测的统一动态架构
专知会员服务
26+阅读 · 2023年4月15日
MonoGRNet:单目3D目标检测的通用框架(TPAMI2021)
专知会员服务
18+阅读 · 2021年5月3日
相关基金
国家自然科学基金
1+阅读 · 2016年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员