The Closeness of In-Context Learning and Weight Shifting for Softmax Regression
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) are known for their exceptional performance in natural language processing, making them highly effective in many human life-related or even job-related tasks. The attention mechanism in the Transformer architecture is a critical component of LLMs, as it allows the model to selectively focus on specific input parts. The softmax unit, which is a key part of the attention mechanism, normalizes the attention scores. Hence, the performance of LLMs in various NLP tasks depends significantly on the crucial role played by the attention mechanism with the softmax unit. In-context learning, as one of the celebrated abilities of recent LLMs, is an important concept in querying LLMs such as ChatGPT. Without further parameter updates, Transformers can learn to predict based on few in-context examples. However, the reason why Transformers becomes in-context learners is not well understood. Recently, several works [ASA+22,GTLV22,ONR+22] have studied the in-context learning from a mathematical perspective based on a linear regression formulation minx| Ax - b |2, which show Transformers' capability of learning linear functions in context. In this work, we study the in-context learning based on a softmax regression formulation minx | langle exp(Ax), bf 1n rangle-1 exp(Ax) - b |2 of Transformer's attention mechanism. We show the upper bounds of the data transformations induced by a single self-attention layer and by gradient-descent on a ℓ2 regression loss for softmax prediction function, which imply that when training self-attention-only Transformers for fundamental regression tasks, the models learned by gradient-descent and Transformers show great similarity.
Key facts. Cited by 41 papers in the map (data through 14 Oct 2026). Builds on 43 of its 93 references that are in the map. First posted on arXiv 26 Apr 2023.
Builds on
43 of 93 references.
References · 43
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2020Reformer: The Efficient Transformercited by 1,668
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 876
31 more
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
- 2018Universal Transformerscited by 647
- 2019Designing and Interpreting Probes with Control Taskscited by 640
- 2022BioGPT: Generative Pre-trained Transformer for Biomedical Text Generation and Miningcited by 538
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
- 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 243
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 130
- 2019On the Turing Completeness of Modern Neural Network Architecturescited by 129
- 2022Unveiling Transformers with LEGO: a synthetic reasoning taskcited by 106
- 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
- 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 102
- 2023Fast Attention Requires Bounded Entriescited by 102
- 2020On the Computational Power of Transformers and its Implications in Sequence Modelingcited by 85
- 2021Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Modelscited by 76
- 2023KDEformer: Accelerating Transformers via Kernel Density Estimationcited by 58
- 2020How Can Self-Attention Networks Recognize Dyck-n Languages?cited by 51
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 2023Do Transformers Parse while Predicting the Masked Word?cited by 48
- 2020A Mathematical Theory of Attentioncited by 46
- 2023An Over-parameterized Exponential Regressioncited by 45
- 2023Solving Regularized Exp, Cosh and Sinh Regression Problemscited by 44
- 2020SMYRF: Efficient Attention using Asymmetric Clusteringcited by 43
- 2021Approximating How Single Head Attention Learnscited by 38
- 2023Algorithm and Hardness for Dynamic Attention Maintenance in Large Language Modelscited by 37
- 2023Randomized and Deterministic Attention Sparsification Algorithms for Over-parameterized Feature Dimensioncited by 37
- 2019Fully Quantized Transformer for Machine Translationcited by 36
- 2023Solving Tensor Low Cycle Rank Approximationcited by 8
- 2020Multi-Pass Transformer for Machine Translationcited by 5
Built on by
Citing papers per year: 2023: 23; 2024: 8; 2025: 9; 2026: 1.
41 papers.
Sort:
By area:
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
- 2023Trained Transformers Learn Linear Models In-Contextcited by 337
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 252
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 102
- 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 96
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
- 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regressioncited by 35
- 2023The Mystery of In-Context Learning: A Comprehensive Survey on Interpretation and Analysiscited by 34
- 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trickcited by 32
- 2024Conv-Basis: A New Paradigm for Efficient Attention Inference and Gradient Computation in Transformerscited by 32
- 2023InfoPrompt: Information-Theoretic Soft Prompt Tuning for Natural Language Understandingcited by 30
- 2023Towards Trustworthy and Aligned Machine Learning: A Data-centric Survey with Causality Perspectivescited by 30
29 more
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
- 2024Towards a Theoretical Understanding of the 'Reversal Curse' via Training Dynamicscited by 27
- 2023How to Protect Copyright Data in Optimization of Large Language Models?cited by 26
- 2023Beyond Classical Attention: Quantum Attention for Scalable Computationcited by 18
- 2023Do pretrained Transformers Learn In-Context by Gradient Descent?cited by 18
- 2024How do Large Language Models Learn In-Context? Query and Key Matrices of In-Context Heads are Two Towers for Metric Learningcited by 18
- 2023Zero-th Order Algorithm for Softmax Attention Optimizationcited by 16
- 2024Exploring the Frontiers of Softmax: Provable Optimization, Applications in Diffusion Model, and Beyondcited by 15
- 2024A Survey to Recent Progress Towards Understanding In-Context Learningcited by 14
- 2023A Unified Scheme of ResNet and Softmaxcited by 12
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 12
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigmscited by 12
- 2023Efficient SGD Neural Network Training via Sublinear Activated Neuron Identificationcited by 11
- 2023Federated Empirical Risk Minimization via Second-Order Methodcited by 9
- 2023An Automatic Learning Rate Schedule Algorithm for Achieving Faster Convergence and Steeper Descentcited by 9
- 2025ICLShield: Exploring and Mitigating In-Context Learning Backdoor Attackscited by 9
- 2023The Expressibility of Polynomial based Attention Schemecited by 7
- 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformercited by 6
- 2025The Role of Diversity in In-Context Learning for Large Language Modelscited by 6
- 2025DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge Transfercited by 5
- 2025ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Cipherscited by 4
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and Whencited by 3
- 2025ConText: Driving In-context Learning for Text Removal and Segmentationcited by 3
- 2025On Theoretical Interpretations of Concept-Based In-Context Learningcited by 3
- 2024Where does In-context Translation Happen in Large Language Modelscited by 1
- 2024A Theoretical Survey on Foundation Modelscited by 1
- 2025Brewing Knowledge in Context: Distillation Perspectives on In-Context Learningcited by 1
- 2025Genomic Next-Token Predictors are In-Context Learnerscited by 1
- 2026Graph-based Target Back-Propagation for Context Adaptation in Multi-LLM Agentic Systemscited by 0
- 2026Graph-based Target Back-Propagation for Context Adaptation in Multi-LLM Agentic Systems12 Jun 2026
- 2025Genomic Next-Token Predictors are In-Context Learners16 Nov 2025
- 2025On Theoretical Interpretations of Concept-Based In-Context Learning25 Sep 2025
- 2025DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge Transfer31 Jul 2025
- 2025ICLShield: Exploring and Mitigating In-Context Learning Backdoor Attacks2 Jul 2025
- 2025Brewing Knowledge in Context: Distillation Perspectives on In-Context Learning13 Jun 2025
- 2025Sample Complexity and Representation Ability of Test-time Scaling Paradigms5 Jun 2025
- 2025ConText: Driving In-context Learning for Text Removal and Segmentation4 Jun 2025
- 2025The Role of Diversity in In-Context Learning for Large Language Models26 May 2025
- 2025ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Ciphers28 Apr 2025
- 2024A Theoretical Survey on Foundation Models15 Oct 2024
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When31 May 2024
29 more
- 2024Conv-Basis: A New Paradigm for Efficient Attention Inference and Gradient Computation in Transformers8 May 2024
- 2024Towards a Theoretical Understanding of the 'Reversal Curse' via Training Dynamics7 May 2024
- 2024Exploring the Frontiers of Softmax: Provable Optimization, Applications in Diffusion Model, and Beyond6 May 2024
- 2024Where does In-context Translation Happen in Large Language Models7 Mar 2024
- 2024How do Large Language Models Learn In-Context? Query and Key Matrices of In-Context Heads are Two Towers for Metric Learning5 Feb 2024
- 2024A Survey to Recent Progress Towards Understanding In-Context Learning3 Feb 2024
- 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformer22 Nov 2023
- 2023The Mystery of In-Context Learning: A Comprehensive Survey on Interpretation and Analysis1 Nov 2023
- 2023The Expressibility of Polynomial based Attention Scheme30 Oct 2023
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Time26 Oct 2023
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weights19 Oct 2023
- 2023An Automatic Learning Rate Schedule Algorithm for Achieving Faster Convergence and Steeper Descent17 Oct 2023
- 2023Do pretrained Transformers Learn In-Context by Gradient Descent?12 Oct 2023
- 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?12 Oct 2023
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attention1 Oct 2023
- 2023A Unified Scheme of ResNet and Softmax23 Sep 2023
- 2023How to Protect Copyright Data in Optimization of Large Language Models?23 Aug 2023
- 2023Towards Trustworthy and Aligned Machine Learning: A Data-centric Survey with Causality Perspectives31 Jul 2023
- 2023Zero-th Order Algorithm for Softmax Attention Optimization17 Jul 2023
- 2023Beyond Classical Attention: Quantum Attention for Scalable Computation16 Jul 2023
- 2023Efficient SGD Neural Network Training via Sublinear Activated Neuron Identification13 Jul 2023
- 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trick5 Jul 2023
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun 2023
- 2023Trained Transformers Learn Linear Models In-Context16 Jun 2023
- 2023InfoPrompt: Information-Theoretic Soft Prompt Tuning for Natural Language Understanding8 Jun 2023
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Models4 Jun 2023
- 2023Federated Empirical Risk Minimization via Second-Order Method27 May 2023
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformer25 May 2023
- 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regression1 May 2023
- 2023Trained Transformers Learn Linear Models In-Contextcited by 337
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 252
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 102
- 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 96
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
- 2023An Iterative Algorithm for Rescaled Hyperbolic Functions Regressioncited by 35
- 2023The Mystery of In-Context Learning: A Comprehensive Survey on Interpretation and Analysiscited by 34
- 2023In-Context Learning for Attention Scheme: from Single Softmax Regression to Multiple Softmax Regression via a Tensor Trickcited by 32
- 2024Conv-Basis: A New Paradigm for Efficient Attention Inference and Gradient Computation in Transformerscited by 32
- 2023InfoPrompt: Information-Theoretic Soft Prompt Tuning for Natural Language Understandingcited by 30
- 2023A Mathematical Abstraction for Balancing the Trade-off Between Creativity and Reality in Large Language Modelscited by 29
- 2023How to Protect Copyright Data in Optimization of Large Language Models?cited by 26
12 most cited of 33 All 33 (JSON)
- 2025Genomic Next-Token Predictors are In-Context Learners16 Nov 2025
- 2025On Theoretical Interpretations of Concept-Based In-Context Learning25 Sep 2025
- 2025Brewing Knowledge in Context: Distillation Perspectives on In-Context Learning13 Jun 2025
- 2025ConText: Driving In-context Learning for Text Removal and Segmentation4 Jun 2025
- 2025The Role of Diversity in In-Context Learning for Large Language Models26 May 2025
- 2025ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Ciphers28 Apr 2025
- 2024A Theoretical Survey on Foundation Models15 Oct 2024
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When31 May 2024
- 2024Conv-Basis: A New Paradigm for Efficient Attention Inference and Gradient Computation in Transformers8 May 2024
- 2024Where does In-context Translation Happen in Large Language Models7 Mar 2024
- 2024How do Large Language Models Learn In-Context? Query and Key Matrices of In-Context Heads are Two Towers for Metric Learning5 Feb 2024
- 2024A Survey to Recent Progress Towards Understanding In-Context Learning3 Feb 2024
12 newest of 33 All 33 (JSON)