mlsanityData to 14 Oct 2026

Attention-based clustering

arXiv 2505.13112 ↗First posted 19 May 2025stat.ML cs.LGcited by 3

Not on the map. Why?

Abstract (arXiv)

Transformers have emerged as a powerful neural network architecture capable of tackling a wide range of learning tasks. In this work, we provide a theoretical analysis of their ability to automatically extract structure from data in an unsupervised setting. In particular, we demonstrate their suitability for clustering when the input data is generated from a Gaussian mixture model. To this end, we study a simplified two-head attention layer and define a population risk whose minimization with unlabeled data drives the head parameters to align with the true mixture centroids. This phenomenon highlights the ability of attention-based layers to capture underlying distributional structure. We further examine an attention layer with key, query, and value matrices fixed to the identity, and show that, even without any trainable parameters, it can perform in-context quantization, revealing the surprising capacity of transformer-based methods to adapt dynamically to input-specific distributions.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 21 of its 28 references that are in the map. First posted on arXiv 19 May 2025.

Builds on

21 of 28 references.

References · 21

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  4. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  5. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  6. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,592
  7. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  8. 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,026
  9. 2022Transformers learn in-context by gradient descentcited by 732
  10. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
  11. 2019Stand-Alone Self-Attention in Vision Modelscited by 542
  12. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 279
9 more
  1. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 222
  2. 2023FLatten Transformer: Vision Transformer using Focused Linear Attentioncited by 171
  3. 2022Formal Algorithms for Transformerscited by 72
  4. 2023The Shaped Transformer: Attention Models in the Infinite Depth-and-Width Limitcited by 47
  5. 2024Transformers are Universal In-context Learnerscited by 43
  6. 2023Simplifying Transformer Blockscited by 37
  7. 2024Attention layers provably solve single-location regressioncited by 17
  8. 2024One-Layer Transformer Provably Learns One-Nearest Neighbor In Contextcited by 16
  9. 2025Transformers versus the EM Algorithm in Multi-class Clusteringcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Clustering in pure-attention hardmax transformers and its role in sentiment analysis
  2. 2026Gaussian Mixture Attention: Linear-Time Sequence Mixing via Probabilistic Latent Routing
  3. 2025Attention Beyond Neighborhoods: Reviving Transformer for Graph Clustering
  4. 2025Transformer Circuits Can Realize Clustering Algorithms
  5. 2026Mixture-of-Top-k Attention: Efficient Attention via Scalable Fast Weights
  6. 2025Sigmoid Self-Attention has Lower Sample Complexity than Softmax Self-Attention: A Mixture-of-Experts Perspective
  7. 2021On the Distribution, Sparsity, and Inference-time Quantization of Attention Values in Transformers
  8. 2026Mixture of Layers with Hybrid Attention