AI and the World's Hard Problems · Theoretical computer science · arXiv · 2026-11-18
Clustering in pure-attention hardmax transformers and its role in sentiment analysis

The authors analyze transformers with hardmax self-attention as the number of layers goes to infinity, showing that inputs converge to a clustered equilibrium determined by special points called leaders. Building on this understanding, they construct a fully interpretable transformer for sentiment analysis that captures context by grouping meaningless words around leader words. The paper also notes remaining challenges in linking this mathematical analysis to real-world implementations.