Skip to yearly menu bar Skip to main content


The emergence of clusters in self-attention dynamics

Borjan Geshkovski · Cyril Letrouit · Yury Polyanskiy · Philippe Rigollet

Great Hall & Hall B1+B2 (level 1) #524
[ ] [ Project Page ]
Wed 13 Dec 3 p.m. PST — 5 p.m. PST


Viewing Transformers as interacting particle systems, we describe the geometry of learned representations when the weights are not time-dependent. We show that particles, representing tokens, tend to cluster toward particular limiting objects as time tends to infinity. Using techniques from dynamical systems and partial differential equations, we show that type of limiting object that emerges depends on the spectrum of the value matrix. Additionally, in the one-dimensional case we prove that the self-attention matrix converges to a low-rank Boolean matrix. The combination of these results mathematically confirms the empirical observation made by Vaswani et al. [ VSP`17 ] that leaders appear in a sequence of tokens when processed by Transformers.

Chat is not available.