Why counting breaks LLMs: the minimal attention program needs two indices

ctjlewis · x · 2026-09-10

The author argues counting is the simplest task requiring intermediate steps — the only way to count many things is one by one, just like guessing jelly beans in a jar. In the follow-up, they show a simple 1, 2, 3 pattern isn't sufficient for arbitrary-length sequences: counting the r's in "strawberry" requires a second index to enumerate the r's (letters counted to 9, r's counted to 3, tracked separately). This is the minimal attention program for the task, with complexity 2: it needs two simultaneous indices.

Related event: Why LLMs Fail at Counting Letters in 'Strawberry'(2 posts)→

Original post →

More from Research

Research channel →