The emergence of clusters in self-attention dynamics - Laboratoire de Mathématiques d'Orsay Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2023

The emergence of clusters in self-attention dynamics

Résumé

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. The 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. [23] that leaders appear in a sequence of tokens when processed by Transformers.
Fichier principal
Vignette du fichier
arxiv.pdf (1.47 Mo) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04092937 , version 1 (09-05-2023)
hal-04092937 , version 2 (20-02-2024)

Licence

Licence Ouverte - etalab

Identifiants

  • HAL Id : hal-04092937 , version 1

Citer

Borjan Geshkovski, Cyril Letrouit, Yury Polyanskiy, Philippe Rigollet. The emergence of clusters in self-attention dynamics. 2023. ⟨hal-04092937v1⟩
42 Consultations
21 Téléchargements

Partager

Gmail Facebook X LinkedIn More