Papers
arxiv:2601.02989

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

Published on Jan 6
ยท Submitted by
Ali Nafisi
on Jan 7
Authors:
,
,
,
,
,
,

Abstract

A test-time strategy inspired by System-2 cognitive processes decomposes large counting tasks into smaller sub-problems, enabling large language models to overcome architectural limitations and achieve high accuracy on complex counting tasks through mechanistic components like latent count computation, dedicated attention heads, and final aggregation stages.

AI-generated summary

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.

Community

Paper author Paper submitter

๐Ÿ”ข Overcoming Transformer Depth Limits in Counting Tasks

LLMs often fail at counting not because they aren't smart, but because of architectural depth constraints ๐Ÿšง. We propose a simple, effective System-2 strategy ๐Ÿงฉ that decomposes counting tasks to bypass these limits.

๐Ÿ”ฌ We also provide a full mechanistic interpretation, identifying the specific attention heads and representations responsible for transferring "latent counts" across the network.

๐Ÿ“ˆ This approach allows LLMs to achieve high accuracy on large-scale counting benchmarks where they typically fail.

counting

This is an automated message from the Librarian Bot. I found the following papers similar to this paper.

The following papers were recommended by the Semantic Scholar API

Please give a thumbs up to this comment if you found it helpful!

If you want recommendations for any Paper on Hugging Face checkout this Space

You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend

Sign up or log in to comment

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2601.02989 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2601.02989 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2601.02989 in a Space README.md to link it from this page.

Collections including this paper 1