Context-Scaling versus Task-Scaling in In-Context Learning
Not on the map. Why?
Abstract (arXiv)
Transformers exhibit In-Context Learning (ICL), where these models solve new tasks by using examples in the prompt without additional training. In our work, we identify and analyze two key components of ICL: (1) context-scaling, where model performance improves as the number of in-context examples increases and (2) task-scaling, where model performance improves as the number of pre-training tasks increases. While transformers are capable of both context-scaling and task-scaling, we empirically show that standard Multi-Layer Perceptrons (MLPs) with vectorized input are only capable of task-scaling. To understand how transformers are capable of context-scaling, we first propose a significantly simplified transformer architecture without key, query, value weights. We show that it performs ICL comparably to the original GPT-2 model in various statistical learning tasks including linear regression, teacher-student settings. Furthermore, a single block of our simplified transformer can be viewed as data dependent feature map followed by an MLP. This feature map on its own is a powerful predictor that is capable of context-scaling but is not capable of task-scaling. We show empirically that concatenating the output of this feature map with vectorized data as an input to MLPs enables both context-scaling and task-scaling. This finding provides a simple setting to study context and task-scaling for ICL.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 23 of its 33 references that are in the map. First posted on arXiv 16 Oct 2024.
Builds on
23 of 33 references.
References · 23
- 2017Attention Is All You Needcited by 60,361
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
- 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
- 2023Trained Transformers Learn Linear Models In-Contextcited by 337
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 279
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 222
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 213
11 more
- 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 170
- 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 146
- 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 96
- 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretrainingcited by 83
- 2023White-Box Transformers via Sparse Rate Reductioncited by 80
- 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 75
- 2024Training Dynamics of Multi-Head Softmax Attention for In-Context Learning: Emergence, Convergence, and Optimalitycited by 74
- 2024Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?cited by 65
- 2023Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Contextcited by 63
- 2024Asymptotic theory of in-context learning by linear attentioncited by 55
- 2024In-Context Learning with Transformers: Softmax Attention Adapts to Function Lipschitznesscited by 22
Built on by
Citing papers per year: 2025: 4; 2026: 2.
6 papers.
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 46
- 2025A Survey of Scaling in Large Language Model Reasoningcited by 10
- 2025Beyond Benign Overfitting in Nadaraya-Watson Interpolatorscited by 2
- 2025How Data Mixing Shapes In-Context Learning: Asymptotic Equivalence for Transformers with MLPscited by 1
- 2026Data Distribution as a Lever for Guiding Optimizers Toward Superior Generalization in LLMscited by 0
- 2026A Unified Framework for In-Context Learning with Causal and Masked Language Modelscited by 0
- 2026A Unified Framework for In-Context Learning with Causal and Masked Language Models5 Jul 2026
- 2026Data Distribution as a Lever for Guiding Optimizers Toward Superior Generalization in LLMs31 Jan 2026
- 2025How Data Mixing Shapes In-Context Learning: Asymptotic Equivalence for Transformers with MLPs29 Oct 2025
- 2025A Survey of Scaling in Large Language Model Reasoning2 Apr 2025
- 2025Beyond Benign Overfitting in Nadaraya-Watson Interpolators11 Feb 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025
Similar, not cited
Close in wording, no citation either way
- 2025Illusion or Algorithm? Investigating Memorization, Emergence, and Symbolic Processing in In-Context Learning
- 2025Probing In-Context Learning: Impact of Task Complexity and Model Architecture on Generalization and Efficiency
- 2025How Transformers Learn In-Context Recall Tasks? Optimality, Training Dynamics and Generalization
- 2023The Transient Nature of Emergent In-Context Learning in Transformers
- 2023Is attention required for ICL? Exploring the Relationship Between Model Architecture and In-Context Learning Ability
- 2026Dissecting Multimodal In-Context Learning: Modality Asymmetries and Circuit Dynamics in modern Transformers
- 2024Investigating the Pre-Training Dynamics of In-Context Learning: Task Recognition vs. Task Learning
- 2025Understanding In-Context Learning Beyond Transformers: An Investigation of State Space and Hybrid Architectures