Multistability of Self-Attention Dynamics in Transformers

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: Altafini, Claudio
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866914158731067392
author Altafini, Claudio
author_facet Altafini, Claudio
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2511_11553
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Multistability of Self-Attention Dynamics in Transformers
Altafini, Claudio
Machine Learning
Systems and Control
Dynamical Systems
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.
title Multistability of Self-Attention Dynamics in Transformers
topic Machine Learning
Systems and Control
Dynamical Systems
url https://arxiv.org/abs/2511.11553