mlsanityData to 7 Oct 2026

Trained Transformer Classifiers Generalize and Exhibit Benign Overfitting In-Context

arXiv 2410.01774 ↗First posted 2 Oct 2024cs.LG stat.MLcited by 14

Not on the map. Why?

Abstract (arXiv)

Transformers have the capacity to act as supervised learning algorithms: by properly encoding a set of labeled training ("in-context") examples and an unlabeled test example into an input sequence of vectors of the same dimension, the forward pass of the transformer can produce predictions for that unlabeled test example. A line of recent work has shown that when linear transformers are pre-trained on random instances for linear regression tasks, these trained transformers make predictions using an algorithm similar to that of ordinary least squares. In this work, we investigate the behavior of linear transformers trained on random linear classification tasks. Via an analysis of the implicit regularization of gradient descent, we characterize how many pre-training tasks and in-context examples are needed for the trained transformer to generalize well at test-time. We further show that in some settings, these trained transformers can exhibit "benign overfitting in-context": when in-context examples are corrupted by label flipping noise, the transformer memorizes all of its in-context examples (including those with noisy labels) yet still generalizes near-optimally for clean test examples.

Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 30 of its 34 references that are in the map. First posted on arXiv 2 Oct 2024.

Builds on

30 of 34 references.

References · 30

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2016Understanding deep learning requires rethinking generalizationcited by 1,657
  4. 2022Transformers learn in-context by gradient descentcited by 714
  5. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  6. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  7. 2017The Implicit Bias of Gradient Descent on Separable Datacited by 649
  8. 2019Benign Overfitting in Linear Regressioncited by 544
  9. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  10. 2019Gradient Descent Maximizes the Margin of Homogeneous Neural Networkscited by 308
  11. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  12. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
18 more
  1. 2021Deep learning: a statistical viewpointcited by 239
  2. 2020Directional convergence and alignment in deep learningcited by 172
  3. 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
  4. 2021Fit without fear: remarkable mathematical phenomena of deep learning through the prism of interpolationcited by 130
  5. 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
  6. 2018Does data interpolation contradict statistical optimality?cited by 95
  7. 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 93
  8. 2022On the Implicit Bias in Deep-Learning Algorithmscited by 84
  9. 2020Finite-sample Analysis of Interpolating Linear Classifiers in the Overparameterized Regimecited by 81
  10. 2022Benign Overfitting without Linearity: Neural Network Classifiers Trained by Gradient Descent for Noisy Linear Datacited by 74
  11. 2023Max-Margin Token Selection in Attention Mechanismcited by 57
  12. 2022Implicit Bias in Leaky ReLU Networks Trained on High-Dimensional Datacited by 46
  13. 2024Transformers are Minimax Optimal Nonparametric In-Context Learnerscited by 36
  14. 2024Implicit Bias and Fast Convergence Rates for Self-attentioncited by 31
  15. 2023Benign Overfitting in Linear Classifiers and Leaky ReLU Networks from KKT Conditions for Margin Maximizationcited by 29
  16. 2023The Double-Edged Sword of Implicit Bias: Generalization vs. Robustness in ReLU Networkscited by 23
  17. 2022On the Effective Number of Linear Regions in Shallow Univariate ReLU Networks: Convergence Guarantees and Implicit Biascited by 21
  18. 2024Implicit Optimization Bias of Next-Token Prediction in Linear Modelscited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 8; 2026: 4.

14 papers.

Sort:

By area: