Dynamic metastability in the self-attention model

Borjan Geshkovski, Hugo Koubbi, Yury Polyanskiy, Philippe Rigollet
10/9/2024
cs.LGmath.APmath.DS

No official code found. Best implementation: HugoKoubbi/2024-transformers-dotm (1 star, last commit 2024-07-09).

Abstract

We consider the self-attention model - an interacting particle system on the unit sphere, which serves as a toy model for Transformers, the deep neural network architecture behind the recent successes of large language models. We prove the appearance of dynamic metastability conjectured in [GLPR23] - although particles collapse to a single cluster in infinite time, they remain trapped near a configuration of several clusters for an exponentially long period of time. By leveraging a gradient flow interpretation of the system, we also connect our result to an overarching framework of slow motion of gradient flows proposed by Otto and Reznikoff [OR07] in the context of coarsening and the Allen-Cahn equation. We finally probe the dynamics beyond the exponentially long period of metastability, and illustrate that, under an appropriate time-rescaling, the energy reaches its global maximum in finite time and has a staircase profile, with trajectories manifesting saddle-to-saddle-like behavior, reminiscent of recent works in the analysis of training dynamics via gradient descent for two-layer neural networks.

View on arXivView PDF

Code Implementations(1)

10PythonJul 2, 20242 years ago

Similar Papers

Cite this paper

@article{geshkovski2024dynamic,
  title  = {Dynamic metastability in the self-attention model},
  author = {Borjan Geshkovski and Hugo Koubbi and Yury Polyanskiy and Philippe Rigollet},
  year   = {2024},
  eprint = {2410.06833},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.06833v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.06833.svg)](https://codeofpaper.com/paper/2410.06833)

Discussion