ChatPaper.aiChatPaper

Mechanistische Interpretatie van Grootschalig Tellen in LLM's via een Systeem-2-Strategie

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

January 6, 2026
Auteurs: Hosein Hasani, Mohammadali Banayeeanzade, Ali Nafisi, Sadegh Mohammadian, Fatemeh Askari, Mobin Bagherian, Amirmohammad Izadi, Mahdieh Soleymani Baghshah
cs.AI

Samenvatting

Grote taalmodellen (LLM's) vertonen, ondanks sterke prestaties op complexe wiskundige problemen, systematische beperkingen bij teltaken. Dit probleem ontstaat door architecturale beperkingen van transformers, waarbij tellen over lagen heen wordt uitgevoerd, wat leidt tot verminderde precisie bij grotere telproblemen door dieptebeperkingen. Om deze beperking aan te pakken, stellen we een eenvoudige testtijdstrategie voor, geïnspireerd op System-2 cognitieve processen, die grote teltaken opsplitst in kleinere, onafhankelijke deelproblemen die het model betrouwbaar kan oplossen. We evalueren deze aanpak met observationele en causale mediatieanalyses om het onderliggende mechanisme van deze System-2-achtige strategie te begrijpen. Onze mechanistische analyse identificeert cruciale componenten: latente tellingen worden berekend en opgeslagen in de laatste itemrepresentaties van elk deel, overgedragen naar tussenstappen via specifieke aandachtskoppen, en geaggregeerd in de eindfase om de totale telling te produceren. Experimentele resultaten tonen aan dat deze strategie LLM's in staat stelt architecturale beperkingen te overstijgen en hoge nauwkeurigheid te bereiken op grootschalige teltaken. Dit werk verschaft mechanistisch inzicht in System-2 tellen binnen LLM's en presenteert een generaliseerbare aanpak om hun redeneergedrag te verbeteren en te begrijpen.
English
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.
PDF41January 8, 2026