mlsanityData to 14 Oct 2026

Attention with Trained Embeddings Provably Selects Important Tokens

arXiv 2505.17282 ↗First posted 22 May 2025cs.LG cs.CL stat.MLcited by 1

Not on the map. Why?

Abstract (arXiv)

Token embeddings play a crucial role in language modeling but, despite this practical relevance, their theoretical understanding remains limited. Our paper addresses the gap by characterizing the structure of embeddings obtained via gradient descent. Specifically, we consider a one-layer softmax attention model with a linear head for binary classification, i.e., textttSoftmax( p^top EX^top ) EX v = frac sumi=1T exp(p^top Exi) Exi^top vsumj=1T exp(p^top E_xj) , where EX = [ Ex1 , dots, ExT ]^top contains the embeddings of the input sequence, p is the embedding of the langle cls rangle token and v the output vector. First, we show that, already after a single step of gradient training with the logistic loss, the embeddings EX capture the importance of tokens in the dataset by aligning with the output vector v proportionally to the frequency with which the corresponding tokens appear in the dataset. Then, after training p via gradient flow until convergence, the softmax selects the important tokens in the sentence (i.e., those that are predictive of the label), and the resulting langle cls rangle embedding maximizes the margin for such a selection. Experiments on real-world datasets (IMDB, Yelp) exhibit a phenomenology close to that unveiled by our theory.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 39 of its 48 references that are in the map. First posted on arXiv 22 May 2025.

Builds on

39 of 48 references.

References · 39

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  3. 2023GPT-4 Technical Reportcited by 18,396
  4. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  5. 2021Zero-Shot Text-to-Image Generationcited by 4,288
  6. 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
  7. 2022In-context Learning and Induction Headscited by 964
  8. 2017The Implicit Bias of Gradient Descent on Separable Datacited by 655
  9. 2023One Fits All:Power General Time Series Analysis by Pretrained LMcited by 632
  10. 2019Implicit Regularization in Deep Matrix Factorizationcited by 405
  11. 2014In Search of the Real Inductive Bias: On the Role of Implicit Regularization in Deep Learningcited by 342
  12. 2020Implicit Bias of Gradient Descent for Wide Two-layer Neural Networks Trained with the Logistic Losscited by 268
27 more
  1. 2023A mathematical perspective on Transformerscited by 164
  2. 2023The emergence of clusters in self-attention dynamicscited by 140
  3. 2023Representational Strengths and Limitations of Transformerscited by 133
  4. 2024How Transformers Learn Causal Structure with Gradient Descentcited by 118
  5. 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 102
  6. 2023Transformers as Support Vector Machinescited by 74
  7. 2023Max-Margin Token Selection in Attention Mechanismcited by 58
  8. 2023On the Role of Attention in Prompt-tuningcited by 50
  9. 2020A Mathematical Theory of Attentioncited by 46
  10. 2024Dynamic metastability in the self-attention modelcited by 46
  11. 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 36
  12. 2023Scaling Laws for Associative Memoriescited by 35
  13. 2024From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformerscited by 34
  14. 2024Mechanics of Next Token Prediction with Self-Attentioncited by 34
  15. 2024Implicit Bias and Fast Convergence Rates for Self-attentioncited by 31
  16. 2024Transformers Provably Learn Sparse Token Selection While Fully-Connected Nets Cannotcited by 22
  17. 2024Implicit Regularization of Gradient Flow on One-Layer Softmax Attentioncited by 19
  18. 2024Attention layers provably solve single-location regressioncited by 17
  19. 2025Test-Time Training Provably Improves Transformers as In-context Learnerscited by 16
  20. 2024Benign Overfitting in Single-Head Attentioncited by 12
  21. 2023Three Towers: Flexible Contrastive Learning with Pretrained Image Modelscited by 11
  22. 2024Local to Global: Learning Dynamics and Effect of Initialization for Transformerscited by 11
  23. 2024Dissecting the Interplay of Attention Paths in a Statistical Mechanics Theory of Transformerscited by 9
  24. 2024Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysiscited by 9
  25. 2024Optimizing Attention with Mirror Descent: Generalized Max-Margin Token Selectioncited by 9
  26. 2024Towards Understanding the Word Sensitivity of Attention Layers: A Study via Random Featurescited by 5
  27. 2024Repurposing Language Models into Embedding Models: Finding the Compute-Optimal Recipecited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.