On the Diverse Dynamical Behaviors Arising in Deep Linear Transformers

Sixu Li, Thomas Jacob Maranzatto, Jan Peszek, Trevor Teolis, Semih Akkoc +3 more
7/20/2026
cs.LGmath.DS
transformer-attention

No confident code implementation found for this paper.

Abstract

We study the inference-time behavior of deep linear encoder-only transformers through the lens of interacting particle systems. In this perspective, tokens are modeled as particles that interact dynamically through successive linear self-attention layers.

Show full abstract

We show that in embedding dimension two, for any key, query, and value matrices, the dynamics can be reformulated as a generalized Kuramoto-type model with pure second-harmonic coupling. This formulation is amenable to Watanabe--Strogatz theory which reveals the dynamics are intrinsically low-dimensional regardless of the parameter matrices. For a class of token initializations associated with the Ott--Antonsen (OA) manifold, we show that the parameter matrices induce a diverse variety of long-time behaviors in linear transformers, including clustering, oscillations, and bifurcations. The oscillations and bifurcations are characterized by uncovering a hidden Hamiltonian structure in the dynamics. By establishing a structural stability result, we further show that dynamics initialized near the OA manifold exhibit the same long-time behavior as those initialized exactly on the manifold. Motivated by our theory in dimension two, we conduct numerical experiments for analogous parameter regimes in higher-dimensional transformers. Our numerical experiments suggest that the long-time behaviors characterized in our theoretical results persist in higher dimensions.

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{li2026diverse,
  title  = {On the Diverse Dynamical Behaviors Arising in Deep Linear Transformers},
  author = {Sixu Li and Thomas Jacob Maranzatto and Jan Peszek and Trevor Teolis and Semih Akkoc and Konstantin Riedl and Sennur Ulukus and Nicolás García Trillos},
  year   = {2026},
  eprint = {2607.18584},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.18584v1}
}

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

Discussion