Source-linked AI summary

The emergence of clusters in self-attention dynamics

Borjan Geshkovski, Cyril Letrouit, Yury Polyanskiy, Philippe Rigollet

arXiv:2305.05465v6cs.LGmath.APstat.ML

TL;DR

The paper addresses the limited understanding of geometric structure in Transformer representations by analyzing self-attention as an interacting particle system with time-independent weights. It shows that tokens cluster toward limiting objects determined by initial tokens, with limiting behavior governed by the value-matrix spectrum and low-rank Boolean attention in one dimension.

  • Problem

    Little is known about the geometric structure of Transformer representations, motivating a first step toward describing their geometry.

    Source: §1 · p. 2
  • Method

    The paper studies asymptotic self-attention dynamics using structured stochastic matrices and dynamical-systems and partial-differential-equation techniques.

    Source: §2 · p. 6
  • Results

    In one dimension, the self-attention matrix converges to a low-rank Boolean matrix, while tokens cluster toward convex-polytope boundaries or vertices for V = Id.

    Source: §1.1 · p. 3, §3 · p. 8
  • Takeaways & Limitations

    The results mathematically support the emergence of a small number of leaders driving Transformer dynamics and establish context-dependent clustering of token representations.

    Source: §1.1 · p. 3

    Clustering and self-attention convergence for multi-head dynamics with constant per-head weight matrices remain open problems.

    Source: §12 · p. 50

Abstract

from arXiv · show

Viewing Transformers as interacting particle systems, we describe the geometry of learned representations when the weights are not time dependent. We show that particles, representing tokens, tend to cluster toward particular limiting objects as time tends to infinity. Cluster locations are determined by the initial tokens, confirming context-awareness of representations learned by Transformers. Using techniques from dynamical systems and partial differential equations, we show that the type of limiting object that emerges depends on the spectrum of the value matrix. Additionally, in the one-dimensional case we prove that the self-attention matrix converges to a low-rank Boolean matrix. The combination of these results mathematically confirms the empirical observation made by Vaswani et al. [VSP'17] that leaders appear in a sequence of tokens when processed by Transformers.

Part 1. Introduction and main results · 1. Introduction

The paper models self-attention as an interacting particle system with time-independent weights and shows that tokens asymptotically form clusters whose geometry depends on the value matrix spectrum. Its analysis establishes low-rank Boolean attention in one dimension and diverse limiting configurations, while situating these results within prior work on attention, complexity, neural collapse, and particle clustering.

1.1. Organization of the paper and summary of contributions.

  • The paper uses continuous-time dynamics for transparent analysis, while stating that its methods straightforwardly extend to discrete-time forward-Euler iterations.It also proves global existence and uniqueness for all considered dynamics, including the mean-field limit.Source: §1 · p. 2, §1.1 · p. 4

1. Introduction

  • The framework views Transformer tokens as interacting particles whose attention weights encode pairwise semantic relations through learned Q, K, and V matrices [VSP`17, Figures 3-5].Unlike neural ODEs and ResNets, each token evolves through interactions with the full sequence rather than as an isolated input.Source: §1 · p. 2

1.1. Organization of the paper and summary of contributions.

  • Tokens with fixed Q, K, and V undergo collective dynamics that, after suitable rescaling, converge toward clustered configurations, theoretically supporting the emergence of leaders observed in Transformers [VSP`17].The analysis treats layers as time and focuses on pure self-attention, excluding multiple heads, feed-forward layers, and normalization; without normalization, some directions may diverge.Source: §1 · p. 2, §1.1 · p. 3
  • The limiting geometry varies with V: one-dimensional positive V yields a low-rank 0–1 attention matrix, V = I_d yields polytope clustering, and spectral multiplicity produces polytope-plus-subspace limits.With a simple positive leading eigenvalue, tokens cluster toward at most three hyperplanes determined by its eigenvector; with V = −I_d, all tokens collapse to 0.Source: §1.1 · pp. 3–4

1.2. Notation.

  • The notation orders eigenvalues by decreasing modulus and defines operator norms, distances to sets, and convex hulls for the geometric and spectral analysis.These definitions support the paper’s characterization of asymptotic token configurations and value-matrix regimes.Source: §1.2 · p. 4

1.3.1. Analysis of attention-based models.

  • Prior attention-based analyses include interacting-particle, continuity-equation, and Sinkhorn perspectives, while related architectures study approximation and discretization of attention dynamics.These works motivate the particle-system formulation and connect it to alternative Transformer architectures such as Sinkformer.Source: §1.3.1 · pp. 4–5

1.3.2. Quadratic complexity of Transformers.

  • The work addresses Transformer quadratic complexity by showing that skip connections permit rich emergent cluster structure, contrasting with prior results where removing them causes all tokens to lump together.Existing low-rank, sparse, block, and query-clustering methods impose or exploit compression, whereas this work derives structure from the dynamics.Source: §1.3.2 · p. 5

1.3.3. Neural collapse.

  • The results resemble neural collapse through geometric clustering, but emphasize that Transformer dynamics generate parameter-dependent patterns related to, yet mathematically distinct from, opinion and flocking models [PHD20].The analysis identifies diverse clustering patterns under different parameters and presents a first rigorous study of these synthetic dynamics.Source: §1.3.3 · p. 5, §1.3.4 · p. 6

2. Asymptotic low-rankness of the self-attention matrix

In one dimension, the self-attention matrix converges exponentially to a typically Boolean, low-rank limit under positive V and QK. For almost all distinct initial sequences, this limit has rank 1 or 2, meaning a few leading tokens capture nearly all attention.

Higher-dimensional evidence

  • Numerical experiments suggest that the same low-rank behavior extends beyond one dimension for almost all initial sequences, despite obstacles to a rigorous higher-dimensional proof.The broader phenomenon is also associated with cluster formation in the self-attention dynamics.Source: §2 · p. 6, Figure 4 · p. 7

Limit structure

  • The structured set P consists of permuted matrices whose designated row contains arbitrary non-negative entries summing to 1.The row containing the asterisks may be any row between the first and last.Source: §2 · p. 6, Figure 2 · p. 7

Theorem 2.1

  • For d = 1, V > 0, and QK > 0, P(t) converges as t → ∞ to a matrix P* in the structured set P, which is typically Boolean and low-rank.The theorem applies to any initial sequence of pairwise distinct tokens; Fig. 3 illustrates the asymptotic behavior.Source: §2 · p. 6, Figure 3 · p. 7
  • For almost all distinct initial sequences, P* has rank 1 or 2, while entries outside one exceptional row converge doubly exponentially in t.The exceptional row is either e_1 = (1, 0, ..., 0) or e_n = (0, ..., 0, 1).Source: §2 · p. 7

Interpretation

  • In the one-dimensional interpretation, at most three tokens capture the attention of all tokens except at most one, typically corresponding to the leftmost and rightmost tokens.These leading tokens typically carry the largest amount of information.Source: §2 · p. 7

3. Clustering toward vertices of convex polytopes

For V = Id, rescaled tokens converge to the boundary of an initial-data-determined convex polytope, typically clustering at its vertices and forming leaders. The analysis uses rescaling to control divergence, and extends to discrete time and broader conditions than Q^TQ > 0.

Rescaled dynamics

  • Rescaling removes the typical exponential divergence of the original tokens while preserving self-attention coefficients, making the dynamics analytically tractable and informative about x_i(t).The rescaled dynamics is motivated by the linear solution y(t) = e^{tV}y(0), with x_i(t) = e^{tV}z_i(t).Source: §3 · p. 8

Main result

  • For V = Id and Q^TQ > 0, every rescaled token converges to 0 or a point on the boundary of an initial-data-determined convex polytope K.The theorem does not guarantee vertex convergence for every initial sequence.Source: §3 · p. 8

Leader formation

  • For almost all initial token sequences, tokens converge to vertices of K, whose number is often smaller than n, producing leaders that attract the original tokens.The original tokens satisfy x_i(t) = e^t z_i(t) when V = Id; trained Transformers have experimentally exhibited analogous local leaders [VSP`17].Source: §3 · pp. 8–9, Figure 5 · p. 9

Proof mechanism

  • The proof combines shrinking convex hulls with time-rescaling that prevents collapse, forcing particles not yet near the limiting boundary to continue growing toward it.Particles near any external half-space move away from that half-space, while time-rescaling drives unclustered particles to the boundary.Source: §3 · pp. 9–10

Scope and extensions

  • Numerics suggest the conclusions hold beyond Q^TQ > 0 and that clustering occurs rapidly, while analogous convergence results extend to discrete-time Transformers.The observed speed depends on the typical modulus of the initial tokens, and discrete-time proofs use a rescaled dynamics when R = I + VΔt is invertible.Source: §3 · p. 10

4. Clustering toward hyperplanes

For good triples, token dynamics converge toward at most three parallel hyperplanes, with attraction governed by the leading eigendirection of V. A conjecture extends this pattern to at most three parallel subspaces whose codimension equals the number of eigenvalues of V with positive real part.

4. Clustering toward hyperplanes

  • Under the good-triple assumptions, every token converges in distance to one of at most three parallel hyperplanes.The leading eigenvalue of V is real, positive, and simple, while the quadratic form xQ·,K·y is positive definite on its eigenspace.Source: §4 · pp. 10–11
  • The clustering is driven by token components along the leading eigendirection, with tokens of largest absolute component acting as attractors.These attracting tokens are empirically observed to carry the most information in sentences [VSP`17].Source: §4 · p. 11
  • The resulting representation is interpretable as K-flats clustering into at most three (d − 1)-dimensional flats and is linearly separable.The K-flats interpretation is tied to intrinsic similarity among points in the input sequence [BM00, Vid11].Source: §4 · p. 12

Beyond a single direction?

  • For V with k eigenvalues having positive real parts, the codimension conjecture predicts convergence to at most three parallel subspaces of codimension k.This conjecture generalizes the single-leading-direction hyperplane result.Source: Beyond a single direction? · p. 12
  • Numerical experiments show shrinking variance and convergence toward two limiting scalars along positive-eigenvalue coordinates, while negative-eigenvalue coordinates diverge.In three dimensions, positive eigenvalues generate attraction and convergence in corresponding eigenspaces, whereas a negative eigenvalue produces repulsion.Source: Beyond a single direction? · p. 12, Figure 7 · p. 12

5. A mix of hyperplanes and polytopes

This section generalizes clustering to cases where the leading eigenvalue of V has multiplicity, showing that token trajectories approach a mixed limiting object combining a convex polytope and hyperplanes.

Generalization

  • The generalized theorem requires V to be paranormal, meaning it acts as the identity on the leading-eigenvalue eigenspace after scaling, a condition automatically satisfied when V is normal.This combines features of the earlier clustering results without requiring the leading eigenvalue to be simple.Source: §5 · p. 13

Assumptions

  • The theorem assumes a good triple: Q^T K is positive definite, while V acts as λI on F and has spectral radius below λ on the invariant complement G.Here λ > 0 and F ⊕ G = R^d.Source: §5 · p. 13

Main result

  • With a repeated leading eigenvalue, every token trajectory approaches H = (∂K\{0}) × G, where K is a bounded convex polytope in the leading eigenspace F.The result holds for any initial sequence and guarantees dist(z_i(t), H) → 0 as t → +∞.Source: §5 · p. 13

Part 2. Proofs · 6. Well-posedness

This part establishes global-in-time well-posedness and uniqueness for the particle and continuity-equation dynamics. It develops these results through continuity-equation stability, trajectory bounds, and transfer to empirical measures, while also recording relevant notation and an illustrative clustering setting.

6.1. Notation.

  • The notation section defines equi-compactly supported curves of compactly supported probability measures, while the example shows a convex polytope emerging and divergence along the eigenvalue -1/2 direction.In the example, two token coordinates cluster toward the polytope while the remaining coordinate diverges.Source: §6.1 · pp. 13–14

6.2. Well-posedness of the ODEs.

  • For every initial token configuration, the particle ODE system has a unique globally defined Lipschitz-continuous solution.The transformed system (3.1) is likewise well-posed, with its result following from the change of variables x_i(t) = e^tV z_i(t).Source: §6.2 · pp. 14–15

6.3. The continuity equation.

  • The continuity equation admits a unique compactly supported solution for every compactly supported initial condition, together with a W2 stability estimate on finite time intervals.The result is formulated in the W2 setting to support extensions from classical ResNets to self-attention dynamics.Source: §6.3 · p. 17
  • The continuity-equation proof constructs approximate solutions with uniformly bounded support, extracts a convergent subsequence, and proves uniqueness through Wasserstein estimates.The resulting measure solution remains representable as the empirical measure of Lipschitz particle trajectories.Source: §6.3 · pp. 17–19
  • For two Lipschitz solutions with the same initial conditions, the attention coefficients P_ij(t) ∈ [0,1] yield a differential estimate for their maximum separation.Source: §6.3 · p. 20
  • Grönwall’s inequality gives exponential-in-time upper bounds c_1e^{c_2t} for every trajectory in both solutions.Source: §6.3 · p. 20
  • The resulting empirical measures solve the continuity equation, and Proposition 6.6 implies that the two empirical measures coincide.Source: §6.3 · p. 20

7. Proof of Theorem 2.1

This section proves Theorem 2.1 by separating one-dimensional particle behaviors into unbounded and bounded cases and characterizing the resulting limiting attention coefficients. It also describes the structure of the limiting self-attention matrix and notes the higher-dimensional relationship between its rank and the number of clusters.

7. Proof of Theorem 2.1

  • Pairwise distances are non-decreasing, so initially distinct particles remain separated and never collide.For ordered initial particles, every later pairwise distance is at least the minimum initial gap.Source: §7 · pp. 20–21

7.1. Results about unbounded particles.

  • If an extreme particle crosses the threshold A defined by A^2 = n^2 exp(-A^2), it diverges exponentially to the corresponding infinity.Specifically, xn(t) grows at least as c1e^t after exceeding A, with a symmetric result for x1(t) below -A.Source: §7.1 · pp. 21–22
  • Every unbounded particle tends to either -∞ or +∞, with x_i(t) = γ_i e^t + o(e^t), where γ_i ≠ 0.The proof also shows exponential divergence for such particles and that γ_i belongs to the two extreme growth coefficients.Source: §7.1 · pp. 22–24
  • For an unbounded particle, its attention row converges doubly exponentially to the selector of the rightmost or leftmost index: P_ij(t) → δ_nj for +∞ and P_ij(t) → δ_1j for -∞.Thus all attention coefficients in the corresponding row converge to 0 except the endpoint coefficient, which converges to 1.Source: §7.1 · pp. 22–23

7.2. Results about bounded particles.

  • At most one particle can remain uniformly bounded; if an endpoint particle is bounded, it converges to 0 while its self-attention coefficient tends to 1 and the other coefficients tend to 0.When the right endpoint is bounded, xn(t) → 0 and P_nn(t) → 1; the left-endpoint case is symmetric.Source: §7.2 · pp. 24–25
  • If an interior particle remains uniformly bounded, each associated attention entry P_i0j(t) converges to some α_j in [0,1].The bounded particle satisfies x_i0(t) → 0, and its rescaled dynamics force convergence of the corresponding attention probabilities.Source: §7.2 · p. 27

7.3. Concluding the proof of Theorem 2.1.

  • Theorem 2.1 follows because P(t) converges to a matrix whose rows are endpoint vectors e_1 or e_n, except possibly one row that may converge to a nonnegative vector summing to 1.For non-exceptional rows, convergence occurs with doubly exponential rate.Source: §7.3 · p. 28
  • In dimensions d ≥ 2, a single limiting cluster can coexist with an identity self-attention limit, so limiting rank need not equal cluster count for all initial conditions.The example uses d = 2, n = 2, initial states (1, ε) and (1, −ε), with both particles converging to (1, 0).Source: §7.3 · p. 28

8. Proofs of Theorems 3.1 and 8.5

This section proves the stated convergence results for the cases V = Id and V = -Id, characterizing the limiting particle configurations and self-attention behavior. The arguments use convex-hull, geometric, boundedness, uniqueness, trapping, and dissipation estimates.

8.1. Clustering towards vertices of convex polytopes: Theorem 3.1.

  • For V = Id and QJK > 0, the convex hull converges to a polytope K, while each particle converges to a point in a finite set S contained in the boundary of K or at 0.The vertex set of K is contained in S, and S is contained in BK ∪ {0}.Source: §8.1 · pp. 28–29, §8.1.2 · p. 30

8.1.1. The convex hull is shrinking.

  • The convex hull is non-increasing under set inclusion, so every trajectory remains in its initial convex hull and is uniformly bounded in time.This monotonicity yields convergence of the convex hull toward a limiting convex polytope.Source: §8.1.1 · pp. 29–30, §8.1.2 · p. 30

8.1.3. Proving Claims 1 and 2.

  • The candidate set S is finite because each candidate is an orthogonal projection associated with a subset of the polytope’s vertices, while every vertex belongs to S by contradiction with convex-hull invariance.For a vertex excluded from S, nearby particles would be attracted toward the convex hull of the remaining vertices, eventually contradicting inclusion of K in every later particle convex hull.Source: §8.1.2 · p. 30, §8.1.3 · p. 34

8.1.2. Proof of Theorem 8.1.

  • Because Sδ has finitely many separated connected components and trajectories have bounded speed, particles cannot circulate indefinitely between components and eventually remain in one component, yielding convergence as δ becomes arbitrarily small.The proof uses a transitive ordering of accessible components and rules out repeated travel through growth of the relevant norm.Source: §8.1.2 · pp. 30, 32, 33
  • Particles that remain outside a small neighborhood Sδ of the candidate set eventually exhibit positive growth in a suitable quantity, forcing them toward Sδ.The growth estimate supplies a constant γ1 depending only on the geometry of K, with some aj(t) ≥ γ1δ for sufficiently large t.Source: §8.1.2 · pp. 30–31

8.1.3. Proving Claims 1 and 2.

  • Lemma 8.4 states that for any w ∈ S there exists β > 0 under its stated condition; conv{z_j(t)} converges to K, and the proof concludes Claim 2 in this second case.Source: §8.1.3 · p. 35

8.2. A cluster at the origin.

  • For V = -Id and QJK = Id, every token converges to the origin for any initial configuration.Theorem 8.5 states that ||x_i(t)|| → 0 for every i as t → ∞.Source: §8.2 · p. 37
  • In this setting, the self-attention matrix converges to the n × n matrix whose entries are all 1/n.This is the limiting form of P(t) as t → ∞.Source: §8.2 · p. 37

8.2.1. Proof of Theorem 8.5.

  • The convergence proof first establishes uniformly bounded trajectories and identifies the origin as the only stationary configuration.Lemma 8.7 gives a time-uniform bound, while Lemma 8.8 proves that the only stationary configuration is x̄_1 = ⋯ = x̄_n = 0.Source: §8.2.1 · pp. 37–38

9. Proof of Theorem 4.2

The proof establishes Theorem 4.2 by controlling eigenvector components and showing that every particle converges to one of at most three limiting hyperplanes. It also explains boundedness, possible divergence along hyperplanes, and how the argument extends beyond diagonalizable value matrices.

9. Proof of Theorem 4.2

  • Under the diagonalizable assumption, the proof orders V’s eigenvalues by modulus and uses an eigenvector basis with dual coordinates.The argument notes that diagonalizability is only a proof convenience and that non-diagonalizable V is treated separately.Source: §9 · p. 39

9.3. Remarks

  • For non-diagonalizable V, Jordan-block projections replace eigenvector coordinates in the estimates, and the proof of Theorem 4.2 still goes through.The modified estimate depends on the spectral gap δ = λ1 − |λ2| and sufficiently small ε.Source: §9 · p. 39, §9.3 · pp. 43–44

9.1. Some monotonicity properties and bounds

  • For nonnegative eigenvalues, extremal dual coordinates are monotone and bounded, yielding uniform boundedness of every particle trajectory.Lemma 9.3 supplies the coordinate-growth estimate used alongside these monotonicity properties.Source: §9.1 · p. 40

9.2. Proof of Theorem 4.2

  • Each principal-eigenvector coordinate converges to one of at most three initial-data-dependent values, so every particle converges to H0, Ha, or Hb.The proof separates the cases in which the coordinate approaches zero, a positive endpoint, or a negative endpoint.Source: §9.2 · pp. 41, 43

9.3. Remarks

  • The theorem guarantees convergence of particle coordinates but not bounded norms: negative eigenvalues can cause divergence along the limiting hyperplane, unlike the nonnegative-eigenvalue case.Numerical observation of this divergence is referenced through Fig. 6.Source: §9.1 · p. 40, §9.3 · p. 43

10. Proof of Theorem 5.2

The proof of Theorem 5.2 combines the arguments for Theorems 4.2 and 8.1, projecting the dynamics onto F and G. It establishes convergence toward a finite set of limiting points in S × G.

Proof strategy

  • The proof combines the proofs of Theorems 4.2 and 8.1, with projections π_F inserted at key steps.The argument follows Theorem 8.1 while adapting its estimates to the decomposition into F and G.Source: §10 · p. 44

Projected dynamics

  • The projected convex hull π_F(conv({z_i(t)})) is non-increasing and converges to a convex polytope K as t → ∞.This monotonicity argument is identical to the one used in Proposition 8.2.Source: §10 · p. 44
  • The proof defines a finite boundary set S ⊂ ∂K and uses neighborhoods S_δ to control trajectories that remain away from the limiting set.The finiteness and boundary inclusion follow by adapting Claim 1 from Theorem 8.1 with π_F applied throughout.Source: §10 · p. 44

Step 2′

  • Step 2′ provides a geometry-dependent lower bound ensuring that trajectories outside S_δ × G have some coefficient a_j(t) ≥ γ_1δ at sufficiently large times.Claim 3 supplies the required coefficient bound, which yields Step 2′ after estimating the coefficients r_j(t).Source: §10 · pp. 45–46

Conclusion

  • The adapted Steps 3 and 4 show that each z_i(t) eventually remains within δ of some s ∈ S in the projected F component, for every δ > 0.Uniform boundedness of π_F(Az_i(t)) replaces uniform boundedness of Az_i(t), leading to the desired conclusion.Source: §10 · p. 46

11. Numerical experiments

The numerical experiments support the paper’s conjectures about clustering, leader-related rank behavior, and the spectral dependence of particle limits. They also show that selected ALBERT heads satisfy the assumptions of Theorem 4.2 and illustrate convergence, rotation, and divergence across eigenspaces.

11.1. Setup.

  • The experiments discretize the dynamics with fourth-order Runge–Kutta at step size 0.1, using uniformly sampled initial points and random matrix entries.Initial points are drawn from the uniform distribution on [-5, 5]^d, while random matrix entries are drawn from the uniform distribution on [-1, 1].Source: §11.1 · p. 46

11.2. Eigenvalues of ALBERT’s value matrices.

  • In ALBERT-xlarge-v2, heads 5 and 14 satisfy all assumptions of Theorem 4.2, with corresponding eigenvector inner products 1.3060 and 0.6719.The model has 16 heads, sequence length n = 256, and token dimension d = 128; only selected heads are shown because not all satisfy the assumptions.Source: Figure 10 · p. 47, §11.2 · p. 47

11.3. Experiments related to Theorem 2.1.

  • Experiments suggest that Theorem 2.1 may extend to dimensions d > 1 when V > 0, while increasing sequence length n does not appear to change rank.For n = 40 and d = 10, 40, 80, the higher-dimensional conclusion appears to transfer; a separate n = 100 example suggests rank is unaffected by sequence length.Source: §11.3 · p. 47, Figure 12 · p. 48, Figure 11 · p. 48

11.5. Complementing Figure 7.

  • In the ALBERT-scale random-matrix experiment, 65 coordinates associated with positive eigenvalues converge to at most three, generically two, real scalars, while negative-eigenvalue coordinates diverge.The setup uses n = 256 and d = 128; the divergent coordinates grow rapidly toward ±∞ over time.Source: §11.5 · p. 48, Figure 15 · p. 50

11.4. Illustrating Theorem 4.2 in R3.

  • In R3 toy models, positive-real-part complex eigenvalues yield convergence toward two points, whereas negative-real-part eigenvalues produce rotation within two-dimensional hyperplanes.The examples use Q = K = I and random positive-entry matrices V, illustrating the contrasting spectral behaviors described by Theorem 4.2 and Conjecture 4.3.Source: §11.4 · p. 47, Figure 13 · p. 49, Figure 14 · p. 49

Part 3. Discussion and open questions · 12. Outlook

The outlook identifies open problems in extending the theory to multi-headed Transformers, general value-matrix spectra, and feed-forward components. Numerical evidence suggests clustering can persist beyond the paper’s assumptions, but its form depends on the architecture and weights.

12. Outlook

  • Multi-headed self-attention remains open: clustering and self-attention-matrix convergence are unproved, despite preliminary numerical evidence of clustering phenomena.Characterizing optimal weights through optimal-control methods is another proposed direction.Source: §12 · p. 50

12.1. Beyond QJK ą 0 in Theorems 3.1 and 5.2.

  • The theory appears robust to generic QJK choices, but negative or complex dominant eigenvalues of V can respectively cause divergence or prevent clustering of rescaled tokens.These possibilities motivate extending Theorems 3.1 and 5.2 beyond the positive-semidefinite QJK assumption.Source: §12.1 · pp. 50–51
  • With V = Id and random, non-PSD QJK, the clustering pattern predicted by Theorem 3.1 persists.Figure 16 illustrates this numerical generalization using entries sampled uniformly from [-1, 1].Source: Figure 16 · p. 51

12.2. Beyond pure self-attention: adding a feed-forward layer.

  • Appending a feed-forward network after self-attention treats it as an independently analyzable map applied to clustered features after O(T) layers.This is the simpler of two ways to combine feed-forward and self-attention mechanisms.Source: §12.2 · p. 51
  • Parallel self-attention and feed-forward updates make exact clustering difficult to predict because feed-forward weights act as a value matrix and alter the identity-like structure.Consequently, the conclusions of Theorems 3.1 and 5.2 may not directly apply.Source: §12.2 · p. 52
  • In a two-layer extension with ReLU or tanh and a weight matrix W, clustering appears to persist, with patterns determined by W and the activation function.A bias vector can also be included to allow translations, but the general result remains open.Source: §12.2 · pp. 52–53
  • The numerical two-layer examples show ReLU dynamics entering the positive orthant before particles follow spectrum-dependent hyperplanes, whereas tanh or random-W ReLU cases collapse toward 0.These observations are presented as a possible generalization of Theorem 4.2.Source: Figure 18 · p. 53
Loading 2305.05465v6…