Repeated-Token Counting Reveals a Dissociation Between Representations and Outputs
Not on the map. Why?
Abstract (arXiv)
Large language models fail at counting how many times a word repeats in a list, even though they perform well on far harder reasoning tasks. These failures are commonly attributed to limitations in internal count tracking. We show this attribution is wrong. Linear probes on the residual stream decode the correct count with near-perfect accuracy at every post-embedding layer and they do so even at the exact layers where the wrong answer crystallizes in the output. Attention patterns show no evidence of collapse over repeated tokens and tokenization artifacts account for none of the failure. Instead, a multi-layer perceptron (MLP) block at roughly 85--93% network depth overwrites the correctly-encoded count with a fixed wrong answer. Ablating this block changes the wrong output and establishes it as causally responsible for the failure. The block fires on the space-separated repeated-word format and is absent for repeated digit-tokens. The pattern holds across Llama-3.2 (1B and 3B) and Qwen2.5 (1.5B, 3B and 7B) at consistent relative depth. The count is represented correctly and a specific computation prevents it from reaching the output, so representation failures and routing failures require different interventions.
Key facts. Cited by 3 papers in the map (data through 13 Oct 2026). Builds on 20 of its 26 references that are in the map. First posted on arXiv 10 May 2026.
Builds on
20 of 26 references.
References · 20
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,376
- 2024Qwen2.5 Technical Reportcited by 4,840
- 2022Locating and Editing Factual Associations in GPTcited by 2,650
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,137
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,323
- 2022Measuring and Narrowing the Compositionality Gap in Language Modelscited by 1,063
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 850
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 829
- 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 750
- 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 693
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 529
- 2022Exploring Length Generalization in Large Language Modelscited by 205
8 more
- 2023Localizing Model Behavior with Path Patchingcited by 188
- 2020Causal Mediation Analysis for Interpreting Neural NLP: The Case of Gender Biascited by 187
- 2023Linear Representations of Sentiment in Large Language Modelscited by 161
- 2024Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Modelscited by 151
- 2023A Mechanistic Interpretation of Arithmetic Reasoning in Language Models using Causal Mediation Analysiscited by 89
- 2024Counting Ability of Large Language Models and Impact of Tokenizationcited by 31
- 2026From Early Encoding to Late Suppression: Interpreting LLMs on Character Counting Taskscited by 3
- 2026Mechanistic Interpretability of Large-Scale Counting in LLMs through a System-2 Strategycited by 2
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2026The Right Answer, the Wrong Direction: Why Transformers Fail at Counting and How to Fix It
- 2026Uncovering Uncontrolled Repetition through Residual Stream Dynamics
- 2026Counting to Four is still a Chore for VLMs
- 2025Understanding Counting Mechanisms in Large Language and Vision-Language Models
- 2026Language models fail at extended rule following
- 2026The Count Is There, but Misaligned: Understanding and Correcting Counting Failures in VLMs
- 2026Context Tokens are Anchors: Understanding the Repetition Curse in dMLLMs from an Information Flow Perspective
- 2026What Attention Recalls and Recurrence Controls in Hybrid Language Models