Fine-grained Analysis of In-context Linear Estimation: Data, Architecture, and Beyond
Not on the map. Why?
Abstract (arXiv)
Recent research has shown that Transformers with linear attention are capable of in-context learning (ICL) by implementing a linear estimator through gradient descent steps. However, the existing results on the optimization landscape apply under stylized settings where task and feature vectors are assumed to be IID and the attention weights are fully parameterized. In this work, we develop a stronger characterization of the optimization and generalization landscape of ICL through contributions on architectures, low-rank parameterization, and correlated designs: (1) We study the landscape of 1-layer linear attention and 1-layer H3, a state-space model. Under a suitable correlated design assumption, we prove that both implement 1-step preconditioned gradient descent. We show that thanks to its native convolution filters, H3 also has the advantage of implementing sample weighting and outperforming linear attention in suitable settings. (2) By studying correlated designs, we provide new risk bounds for retrieval augmented generation (RAG) and task-feature alignment which reveal how ICL sample complexity benefits from distributional alignment. (3) We derive the optimal risk for low-rank parameterized attention weights in terms of covariance spectrum. Through this, we also shed light on how LoRA can adapt to a new distribution by capturing the shift between task covariances. Experimental results corroborate our theoretical findings. Overall, this work explores the optimization and risk landscape of ICL in practically meaningful settings and contributes to a more thorough understanding of its mechanics.
Key facts. Cited by 24 papers in the map (data through 13 Oct 2026). Builds on 47 of its 61 references that are in the map. First posted on arXiv 13 Jul 2024.
Builds on
47 of 61 references.
References · 47
- 2020Language Models are Few-Shot Learnerscited by 32,320
- 2023GPT-4 Technical Reportcited by 18,278
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,231
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,072
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,376
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,221
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,658
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,440
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,229
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,994
- 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,736
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,201
35 more
- 2022Atlas: Few-shot Learning with Retrieval Augmented Language Modelscited by 947
- 2022In-context Learning and Induction Headscited by 940
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 925
- 2022Transformers learn in-context by gradient descentcited by 720
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 706
- 2016Language Modeling with Gated Convolutional Networkscited by 694
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 676
- 2022TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Secondcited by 652
- 2021Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layerscited by 607
- 2019Fine-Grained Analysis of Optimization and Generalization for Overparameterized Two-Layer Neural Networkscited by 565
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 495
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 483
- 2021Transformers Can Do Bayesian Inferencecited by 346
- 2023Trained Transformers Learn Linear Models In-Contextcited by 333
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 293
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 276
- 2022Transformers Learn Shortcuts to Automatacited by 261
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 221
- 2024Many-Shot In-Context Learningcited by 205
- 2019Towards Understanding the Spectral Bias of Deep Learningcited by 174
- 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 169
- 2020Spectral Bias and Task-Model Alignment Explain Generalization in Kernel Regression and Infinitely Wide Neural Networkscited by 166
- 2019Gradient Descent with Early Stopping is Provably Robust to Label Noise for Overparameterized Neural Networkscited by 159
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Taskscited by 104
- 2023Uncovering mesa-optimization algorithms in Transformerscited by 97
- 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 93
- 2023PFNs4BO: In-Context Learning for Bayesian Optimizationcited by 70
- 2022Training Data is More Valuable than You Think: A Simple and Effective Method by Retrieving from Training Datacited by 61
- 2024Asymptotic theory of in-context learning by linear attentioncited by 54
- 2024Is Mamba Capable of In-Context Learning?cited by 45
- 2024Dual Operating Modes of In-Context Learningcited by 43
- 2024In-Context Learning with Transformers: Softmax Attention Adapts to Function Lipschitznesscited by 22
- 2023Is attention required for ICL? Exploring the Relationship Between Model Architecture and In-Context Learning Abilitycited by 16
- 2023Can Transformers Learn Optimal Filtering for Unknown Systems?cited by 15
- 2023Gated recurrent neural networks discover attentioncited by 7
Built on by
Citing papers per year: 2024: 1; 2025: 15; 2026: 8.
24 papers.
Sort:
By area:
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 45
- 2025Test-Time Training Provably Improves Transformers as In-context Learnerscited by 16
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learningcited by 12
- 2024On the Role of Depth and Looping for In-Context Learning with Task Diversitycited by 11
- 2025Out-of-Distribution Generalization of In-Context Learning: A Low-Dimensional Subspace Perspectivecited by 6
- 2025Pretrain-Test Task Alignment Governs Generalization in In-Context Learningcited by 6
- 2025When and How Unlabeled Data Provably Improve In-Context Learningcited by 5
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classificationcited by 4
- 2025Provable Benefits of Task-Specific Prompts for In-context Learningcited by 4
- 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Flycited by 4
- 2025Asymptotic Study of In-context Learning with Random Transformers through Equivalent Modelscited by 3
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?cited by 2
12 more
- 2026Learning to Adapt: In-Context Learning Beyond Stationaritycited by 2
- 2025Mamba Can Learn Low-Dimensional Targets In-Context via Test-Time Feature Learningcited by 1
- 2025How Data Mixing Shapes In-Context Learning: Asymptotic Equivalence for Transformers with MLPscited by 1
- 2025Optimal Attention Temperature Improves the Robustness of In-Context Learning under Distribution Shift in High Dimensionscited by 1
- 2026Fine-Tuning Without Forgetting In-Context Learning: A Theoretical Analysis of Linear Attention Modelscited by 1
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functionscited by 0
- 2026Data Distribution as a Lever for Guiding Optimizers Toward Superior Generalization in LLMscited by 0
- 2026Covariance-Aware Transformers for Quadratic Programming and Decision Makingcited by 0
- 2026The Effect of Training Task Diversity on In-Context Learning through the Lens of Low-Dimensional Subspacescited by 0
- 2026Sequential Correlations Change In-Context Learning: Effective Context Length and Architectural Mismatchcited by 0
- 2026Generalization of Transformer-Based Neural Quantum States via In-Context Learningcited by 0
- 2026Retrieval-Based In-Context Learning: A Domain Adaptation Frameworkcited by 0
- 2026Retrieval-Based In-Context Learning: A Domain Adaptation Framework5 Oct 2026
- 2026Generalization of Transformer-Based Neural Quantum States via In-Context Learning2 Oct 2026
- 2026Sequential Correlations Change In-Context Learning: Effective Context Length and Architectural Mismatch4 Jul 2026
- 2026The Effect of Training Task Diversity on In-Context Learning through the Lens of Low-Dimensional Subspaces5 Jun 2026
- 2026Learning to Adapt: In-Context Learning Beyond Stationarity13 Apr 2026
- 2026Fine-Tuning Without Forgetting In-Context Learning: A Theoretical Analysis of Linear Attention Models26 Feb 2026
- 2026Covariance-Aware Transformers for Quadratic Programming and Decision Making16 Feb 2026
- 2026Data Distribution as a Lever for Guiding Optimizers Toward Superior Generalization in LLMs31 Jan 2026
- 2025Optimal Attention Temperature Improves the Robustness of In-Context Learning under Distribution Shift in High Dimensions3 Nov 2025
- 2025How Data Mixing Shapes In-Context Learning: Asymptotic Equivalence for Transformers with MLPs29 Oct 2025
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions21 Oct 2025
- 2025Mamba Can Learn Low-Dimensional Targets In-Context via Test-Time Feature Learning14 Oct 2025
12 more
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?1 Oct 2025
- 2025Pretrain-Test Task Alignment Governs Generalization in In-Context Learning30 Sep 2025
- 2025Asymptotic Study of In-context Learning with Random Transformers through Equivalent Models18 Sep 2025
- 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Fly24 Jun 2025
- 2025When and How Unlabeled Data Provably Improve In-Context Learning18 Jun 2025
- 2025Out-of-Distribution Generalization of In-Context Learning: A Low-Dimensional Subspace Perspective20 May 2025
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learning6 Apr 2025
- 2025Test-Time Training Provably Improves Transformers as In-context Learners14 Mar 2025
- 2025Provable Benefits of Task-Specific Prompts for In-context Learning3 Mar 2025
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classification21 Feb 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025
- 2024On the Role of Depth and Looping for In-Context Learning with Task Diversity29 Oct 2024
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 45
- 2025Test-Time Training Provably Improves Transformers as In-context Learnerscited by 16
- 2025Gating is Weighting: Understanding Gated Linear Attention through In-context Learningcited by 12
- 2024On the Role of Depth and Looping for In-Context Learning with Task Diversitycited by 11
- 2025Out-of-Distribution Generalization of In-Context Learning: A Low-Dimensional Subspace Perspectivecited by 6
- 2025Pretrain-Test Task Alignment Governs Generalization in In-Context Learningcited by 6
- 2025When and How Unlabeled Data Provably Improve In-Context Learningcited by 5
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classificationcited by 4
- 2025Provable Benefits of Task-Specific Prompts for In-context Learningcited by 4
- 2025In-Context Occam's Razor: How Transformers Prefer Simpler Hypotheses on the Flycited by 4
- 2025Asymptotic Study of In-context Learning with Random Transformers through Equivalent Modelscited by 3
- 2026Learning to Adapt: In-Context Learning Beyond Stationaritycited by 2
12 most cited of 22 All 22 (JSON)
- 2026Retrieval-Based In-Context Learning: A Domain Adaptation Framework5 Oct 2026
- 2026Generalization of Transformer-Based Neural Quantum States via In-Context Learning2 Oct 2026
- 2026Sequential Correlations Change In-Context Learning: Effective Context Length and Architectural Mismatch4 Jul 2026
- 2026The Effect of Training Task Diversity on In-Context Learning through the Lens of Low-Dimensional Subspaces5 Jun 2026
- 2026Learning to Adapt: In-Context Learning Beyond Stationarity13 Apr 2026
- 2026Fine-Tuning Without Forgetting In-Context Learning: A Theoretical Analysis of Linear Attention Models26 Feb 2026
- 2026Covariance-Aware Transformers for Quadratic Programming and Decision Making16 Feb 2026
- 2026Data Distribution as a Lever for Guiding Optimizers Toward Superior Generalization in LLMs31 Jan 2026
- 2025Optimal Attention Temperature Improves the Robustness of In-Context Learning under Distribution Shift in High Dimensions3 Nov 2025
- 2025How Data Mixing Shapes In-Context Learning: Asymptotic Equivalence for Transformers with MLPs29 Oct 2025
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions21 Oct 2025
- 2025Pretrain-Test Task Alignment Governs Generalization in In-Context Learning30 Sep 2025
12 newest of 22 All 22 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025Probing In-Context Learning: Impact of Task Complexity and Model Architecture on Generalization and Efficiency
- 2025In-Context Linear Regression Demystified: Training Dynamics and Mechanistic Interpretability of Multi-Head Softmax Attention
- 2025How Transformers Learn In-Context Recall Tasks? Optimality, Training Dynamics and Generalization
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning
- 2025From Compression to Expression: A Layerwise Analysis of In-Context Learning
- 2026Induction Heads Interpolate N-Grams
- 2023Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression
- 2026A Comparative Analysis of Attention versus State-Space Models for In-Context Learning