mlsanityData to 7 Oct 2026

Provable optimal transport with transformers: The essence of depth and prompt engineering

arXiv 2410.19931 ↗First posted 25 Oct 2024cs.LG math.OC stat.MLcited by 1

Not on the map. Why?

Abstract (arXiv)

Despite their empirical success, the internal mechanism by which transformer models align tokens during language processing remains poorly understood. This paper provides a mechanistic and theoretical explanation of token alignment in LLMs. We first present empirical evidences showing that, in machine translation, attention weights progressively align translated word pairs across layers, closely approximating Optimal Transport (OT) between word embeddings. Building on this observation, we prove that softmax self-attention layers can simulate gradient descent on the dual of the entropy-regularized OT problem, providing a theoretical foundation for the alignment. Our analysis yields a constructive convergence bound showing that transformer depth controls OT approximation accuracy. A direct implication is that standard transformers can sort lists of varying lengths without any parameter adjustment, up to an error term vanishing with transformers depth.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 31 of its 50 references that are in the map. First posted on arXiv 25 Oct 2024.

Builds on

31 of 50 references.

References · 31

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  6. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  7. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  8. 2013Sinkhorn Distances: Lightspeed Computation of Optimal Transportation Distancescited by 2,277
  9. 2016Understanding intermediate layers using linear classifier probescited by 1,279
  10. 2022Transformers learn in-context by gradient descentcited by 714
  11. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  12. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
19 more
  1. 2014Neural Turing Machinescited by 630
  2. 2017Word Translation Without Parallel Datacited by 480
  3. 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
  4. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
  5. 2017Unsupervised Machine Translation Using Monolingual Corpora Onlycited by 272
  6. 2020Sparse Sinkhorn Attentioncited by 250
  7. 2018Marian: Fast Neural Machine Translation in C++cited by 202
  8. 2021Sinkformers: Transformers with Doubly Stochastic Attentioncited by 136
  9. 2023The emergence of clusters in self-attention dynamicscited by 133
  10. 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretrainingcited by 82
  11. 2019Jointly Learning to Align and Translate with Transformer Modelscited by 75
  12. 2017Residual Connections Encourage Iterative Inferencecited by 74
  13. 2023Transformers as Support Vector Machinescited by 67
  14. 2024Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?cited by 60
  15. 2024On the Role of Attention Masks and LayerNorm in Transformerscited by 45
  16. 2024Transformers are Minimax Optimal Nonparametric In-Context Learnerscited by 36
  17. 2021Batch Normalization Orthogonalizes Representations in Deep Random Networkscited by 28
  18. 2023On the impact of activation and normalization in obtaining isometric embeddings at initializationcited by 13
  19. 2023Towards Training Without Depth Limits: Batch Normalization Without Gradient Explosioncited by 8

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.