mlsanityData to 14 Oct 2026

Towards Understanding the Universality of Transformers for Next-Token Prediction

arXiv 2410.03011 ↗First posted 3 Oct 2024stat.ML cs.LGcited by 9

Not on the map. Why?

Abstract (arXiv)

Causal Transformers are trained to predict the next token for a given context. While it is widely accepted that self-attention is crucial for encoding the causal structure of sequences, the precise underlying mechanism behind this in-context autoregressive learning ability remains unclear. In this paper, we take a step towards understanding this phenomenon by studying the approximation ability of Transformers for next-token prediction. Specifically, we explore the capacity of causal Transformers to predict the next token xt+1 given an autoregressive sequence (x1, dots, xt) as a prompt, where xt+1 = f(xt) , and f is a context-dependent function that varies with each sequence. On the theoretical side, we focus on specific instances, namely when f is linear or when (xt)t ≥ 1 is periodic. We explicitly construct a Transformer (with linear, exponential, or softmax attention) that learns the mapping f in-context through a causal kernel descent method. The causal kernel descent method we propose provably estimates xt+1 based solely on past and current observations (x1, dots, xt) , with connections to the Kaczmarz algorithm in Hilbert spaces. We present experimental results that validate our theoretical findings and suggest their applicability to more general mappings f.

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

Builds on

28 of 37 references.

References · 28

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  4. 2020Language Models are Few-Shot Learnerscited by 32,419
  5. 2024The Llama 3 Herd of Modelscited by 14,715
  6. 2018Neural Ordinary Differential Equationscited by 3,779
  7. 2023Mistral 7Bcited by 3,164
  8. 2022Training Compute-Optimal Large Language Modelscited by 3,019
  9. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  10. 2019Are Sixteen Heads Really Better than One?cited by 816
  11. 2022Transformers learn in-context by gradient descentcited by 732
  12. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
16 more
  1. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
  2. 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
  3. 2023Trained Transformers Learn Linear Models In-Contextcited by 337
  4. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 279
  5. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 222
  6. 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 170
  7. 2023The emergence of clusters in self-attention dynamicscited by 140
  8. 2021Sinkformers: Transformers with Doubly Stochastic Attentioncited by 138
  9. 2023Uncovering mesa-optimization algorithms in Transformerscited by 100
  10. 2023Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Contextcited by 63
  11. 2024Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscapecited by 46
  12. 2024Transformers are Universal In-context Learnerscited by 43
  13. 2024Understanding the Expressive Power and Mechanisms of Transformer for Sequence Modelingcited by 25
  14. 2023Implicit regularization of deep residual networks towards neural ODEscited by 20
  15. 2024How do Transformers perform In-Context Autoregressive Learning?cited by 17
  16. 2024Transformers are Expressive, But Are They Expressive Enough for Regression?cited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 1; 2025: 4; 2026: 4.

9 papers.