Asymptotic Analysis of Discrete-Time Self-Attention Dynamics in Transformers

Claudio Altafini
10/9/2026
math.DScs.LGeess.SY
transformer-attention

No confident code implementation found for this paper.

Abstract

In machine learning, a self-attention dynamics describes the attention mechanism of transformers, and is obtained treating the layer index of a transformer as time index. Even though naturally discrete-time, this dynamical system is most often studied in continuous-time.

Show full abstract

Scope of this paper is to provide a thorough investigation of the discrete-time version of the self-attention dynamics: a complete classification of its equilibria is given, and their stability properties are studied, in both the single-head and the multihead case. We show that in both cases the main attractor of the dynamics is a consensus equilibrium aligned with the principal eigenvector of the value matrix (in the single-head case, a corresponding matrix of weights in the multihead case), even though other locally asymptotically stable bipartite equilibria can be show to exist at least in the single-head situation. The behavior is confirmed by looking at the learned weight matrices of a real transformer.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{altafini2026asymptotic,
  title  = {Asymptotic Analysis of Discrete-Time Self-Attention Dynamics in Transformers},
  author = {Claudio Altafini},
  year   = {2026},
  eprint = {2610.13518},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.13518v1}
}

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/2610.13518.svg)](https://codeofpaper.com/paper/2610.13518)

Discussion