Sign inGet started
Paper · arXiv

Counting with Attention and LayerNorm: Norm Scaling and Representation Geometry

Counting is a simple task on which transformers can nevertheless fail at long sequence lengths. We study the cost of counting in a single attention layer, up to a maximum length $L$, focusing on how softmax attention and layer normalization shape the representation from which the count is recovered. We mainly focus on regression read-out but also consider classification read-out. For regression, we show unnormalized linear attention counts exactly at parameter norms independent of $L$. For softmax attention, regression cannot count exactly with finite parameters; it recovers the count after rounding, but only when the vector parameter norms grow with $L$. We measure this cost by $B_{\min}...

AuthorsAyyub Shaffy, Manoj Dhakal, Safal Shrestha et al.
Primary categorycs.LG
Published12 October 2026
Last updated at source12 October 2026
cs.LG
Embed this entry
<iframe src="https://silytics.si/embed/item/8d4a10e7-7c6b-47f1-b08d-3e13e9094d41" width="420" height="190" style="border:0" loading="lazy" title="Silytics entry"></iframe>

Free, no tracking. More about feeds and embeds.

Silytics shows public metadata from arXiv and links to the original. Information may be incomplete or out of date. Last refreshed 15 October 2026. Licenses and terms of the original apply to the work itself. Not financial, legal or professional advice.