Sparse attention shapes token groups by forming distinct clusters

Opinion Leader Dynamics: How Sparse Attention Shapes Token Clustering

Machine LearningArtificial Intelligence

Summary

Processing language with large models is expensive because every word looks at every other word. The authors study a model called sparse attention that limits these connections to save computation. They explain mathematically how tokens form groups that settle on their own 'opinions' but remain separated from other groups. This helps understand how language models keep related words aligned while distinguishing different ideas. Their findings are supported by experiments on advanced language models showing clearer groupings than traditional methods.

What this means in practice

Authors

Jingkun Liu, Yue Song

Abstract

Sparse attention reduces the quadratic cost of global self-attention while retaining strong empirical performance, but how its restricted interactions shape the evolution of token representations remains theoretically underexplored. Modeling tokens as particles on the unit sphere, we introduce opinion leader dynamics, a framework that identifies two mechanisms through which token groups converge internally while maintaining distinct limiting directions. In the explicit model, fixed representatives induce a potential that attracts tokens toward distinct local maxima. In the implicit model, disconnected interaction groups evolve toward separate consensus directions. We formulate both models as reverse Wasserstein gradient flows and establish exponential convergence under suitable conditions. We further connect these theoretical predictions to token evolution in frontier sparse-attention LLMs that motivate our framework. Across four benchmarks, Kimi-K3, MiniMax-M3, and DeepSeek-V4-Flash consistently exhibit clearer cluster separation and higher clustering scores than the dense-attention model GLM-4.7-Flash in projected token representations. These observations support the relevance of the predicted multiple-group structure to trained frontier LLMs, while finite-particle simulations illustrate the theoretical convergence behavior. Together, our results connect restricted token interactions to distinct group-level attractors, providing a dynamical account of how sparse attention can support alignment within groups while preserving separation between them.