Twitxy Saved

Siddarth Mamidanna

Verified account This account is verified. Learn more

@siddarthpm1

phd student @Cambridge_Uni | mech interp + ai safety research
San Francisco siddarth-pm.github.io Joined September 2023
214 Following 56 Followers 41 Posts

Latest posts 5

Siddarth Mamidanna Verified account @siddarthpm1
Excited to be in Suzhou for #EMNLP2025! I’m presenting our main conference paper showing how LLMs push computation into the last token’s residual stream (arxiv.org/abs/2509.09650). If you work on interpretability/alignment and want to chat (I’m applying for PhD positions starting in 2026), feel free to DM me!
arxiv.org All for One: LLMs Solve Mental Math at the Last Token With... Large language models (LLMs) demonstrate proficiency across numerous computational tasks, yet their inner workings remain unclear. In theory, the combination of causal self-attention and...
Siddarth Mamidanna Verified account @siddarthpm1
This is me! Our own tweet is coming out in a couple of days, stay tuned🙂
Rohan Paul Verified account @rohanpaul_ai Sep 13, 2025
When a language model solves a math problem in its head, where in the network is the real calculation happening?

This paper finds that almost all the actual math gets done right at the very last token of the sequence, not spread out across all the tokens.

The earlier tokens spend a lot of layers just holding information and doing general setup.

Then, in just 2 middle layers, they pass their information to the last token. After that, the last token finishes the calculation on its own and produces the answer.

They built two techniques to test this, called Context-Aware Mean Ablation (CAMA) and Attention-Based Peeking (ABP).

These methods let them force the model to only work in certain ways, so they could see which parts were essential. With these tools, they discovered a sparse circuit, which they call All-for-One (AF1).

This circuit is surprisingly efficient: most of the network can wait, then only a couple of layers are needed to hand off information, and the final token does the job.

This works really well on plain arithmetic like "42 + 20 - 15". But the shortcut fails if the problem is written as a word problem or inside Python code, because then the model also needs to understand language or programming context.

In short, the big insight is that language models don’t spread math work across the whole sequence. Instead, they rely heavily on the last token, with just a brief moment of information passing from the earlier ones.

----

Paper – arxiv. org/abs/2509.09650

Paper Title: "All for One: LLMs Solve Mental Math at the Last Token With Information Transferred From Other Tokens"
View quoted post on X
Siddarth Mamidanna Verified account @siddarthpm1
I'll be here to present a poster this Friday.

Please feel free to reach out; I would love to connect or just chat about interpretability!
This Friday NEMI 2025 is at Northeastern in Boston, 8 talks, 24 roundtables, 90 posters; 200+ attendees. Thanks to @GoodfireAI for sponsoring! nemiconf.github.io/summer25/

If you can't make it in person, the livestream will be here:
youtube.com/live/4BJBisHk1…
View quoted post on X