Mechanistic Interpretability of Large-Scale Counting in LLMs through a System-2 Strategy
On the map: Mechanistic interpretability → Steering and interpreting LLM reasoning
Abstract (arXiv)
Large language models (LLMs), despite strong performance on complex mathematical problems, exhibit systematic limitations in counting tasks. This issue arises from the 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 higher 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.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Steering and interpreting LLM reasoning, one of 13 directions in Mechanistic interpretability. First posted on arXiv 6 Jan 2026.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2024LLM The Genius Paradox: A Linguistic and Math Expert's Struggle with Simple Word-based Counting Problems
- 2024Counting Ability of Large Language Models and Impact of Tokenization
- 2023A Mechanistic Interpretation of Arithmetic Reasoning in Language Models using Causal Mediation Analysis
- 2026Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms
- 2024LLM2: Let Large Language Models Harness System 2 Reasoning
- 2026From Early Encoding to Late Suppression: Interpreting LLMs on Character Counting Tasks
- 2025From System 1 to System 2: A Survey of Reasoning Large Language Models
- 2025Understanding Counting Mechanisms in Large Language and Vision-Language Models