Multistability of Self-Attention Dynamics in Transformers

Claudio Altafini
11/14/2025
cs.LGeess.SYmath.DS

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

In machine learning, a self-attention dynamics is a continuous-time multiagent-like model of the attention mechanisms of transformers. In this paper we show that such dynamics is related to a multiagent version of the Oja flow, a dynamical system that computes the principal eigenvector of a matrix corresponding for transformers to the value matrix. We classify the equilibria of the ``single-head'' self-attention system into four classes: consensus, bipartite consensus, clustering and polygonal equilibria. Multiple asymptotically stable equilibria from the first three classes often coexist in the self-attention dynamics. Interestingly, equilibria from the first two classes are always aligned with the eigenvectors of the value matrix, often but not exclusively with the principal eigenvector.

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. 4 weaker matches are hidden by default — 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{altafini2025multistability,
  title  = {Multistability of Self-Attention Dynamics in Transformers},
  author = {Claudio Altafini},
  year   = {2025},
  eprint = {2511.11553},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.11553v1}
}

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

Discussion