Does learning the right latent variables necessarily improve in-context learning?
Not on the map. Why?
Abstract (arXiv)
Large autoregressive models like Transformers can solve tasks through in-context learning (ICL) without learning new weights, suggesting avenues for efficiently solving new tasks. For many tasks, e.g., linear regression, the data factorizes: examples are independent given a task latent that generates the data, e.g., linear coefficients. While an optimal predictor leverages this factorization by inferring task latents, it is unclear if Transformers implicitly do so or if they instead exploit heuristics and statistical shortcuts enabled by attention layers. Both scenarios have inspired active ongoing work. In this paper, we systematically investigate the effect of explicitly inferring task latents. We minimally modify the Transformer architecture with a bottleneck designed to prevent shortcuts in favor of more structured solutions, and then compare performance against standard Transformers across various ICL tasks. Contrary to intuition and some recent works, we find little discernible difference between the two; biasing towards task-relevant latent variables does not lead to better out-of-distribution performance, in general. Curiously, we find that while the bottleneck effectively learns to extract latent task variables from context, downstream processing struggles to utilize them for robust prediction. Our study highlights the intrinsic limitations of Transformers in achieving structured ICL solutions that generalize, and shows that while inferring the right latents aids interpretability, it is not sufficient to alleviate this problem.
Key facts. Cited by 13 papers in the map (data through 14 Oct 2026). Builds on 34 of its 59 references that are in the map. First posted on arXiv 29 May 2024.
Builds on
34 of 59 references.
References · 34
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,070
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
- 2020Shortcut Learning in Deep Neural Networkscited by 1,969
- 2017Deep Setscited by 1,421
- 2016Understanding intermediate layers using linear classifier probescited by 1,353
- 2022In-context Learning and Induction Headscited by 964
- 2020Meta-Learning in Neural Networks: A Surveycited by 950
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 876
22 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
- 2022TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Secondcited by 674
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 309
- 2019Attentive Neural Processescited by 283
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 213
- 2023Finding Alignments Between Interpretable Causal Variables and Distributed Neural Representationscited by 209
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
- 2020Causal Mediation Analysis for Interpreting Neural NLP: The Case of Gender Biascited by 191
- 2023Embers of Autoregression: Understanding Large Language Models Through the Problem They are Trained to Solvecited by 178
- 2020Probing the Probing Paradigm: Does Probing Accuracy Entail Task Relevance?cited by 151
- 2020BayesFlow: Learning complex stochastic models with invertible neural networkscited by 144
- 2019Convolutional Conditional Neural Processescited by 142
- 2023Are Emergent Abilities in Large Language Models just In-Context Learning?cited by 109
- 2024What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formationcited by 89
- 2023A Theory of Emergent In-Context Learning as Implicit Structure Inductioncited by 86
- 2023Large Language Models Can be Lazy Learners: Analyze Shortcuts in In-Context Learningcited by 69
- 2022Compositional Score Modeling for Simulation-based Inferencecited by 48
- 2021Alchemy: A benchmark and analysis toolkit for meta-reinforcement learning agentscited by 36
- 2023Understanding Emergent In-Context Learning from a Kernel Regression Perspectivecited by 24
- 2023Human-like Few-Shot Learning via Bayesian Reasoning over Natural Languagecited by 22
- 2024The Heuristic Core: Understanding Subnetwork Generalization in Pretrained Language Modelscited by 10
Built on by
Citing papers per year: 2024: 4; 2025: 4; 2026: 5.
13 papers.
Sort:
- 2024Amortized Probabilistic Conditioning for Optimization, Simulation and Inferencecited by 23
- 2024Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder Perspectivecited by 9
- 2024In-context learning and Occam's razorcited by 8
- 2024Amortized Inference of Causal Models via Conditional Fixed-Point Iterationscited by 4
- 2025Why is prompting hard? Understanding prompts on binary sequence predictorscited by 4
- 2025In-Context Parametric Inference: Point or Distribution Estimators?cited by 4
- 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structurecited by 1
- 2026Multi-Task Bayesian In-Context Learningcited by 1
- 2025Next-Token Prediction Should be Ambiguity-Sensitive: A Meta-Learning Perspectivecited by 0
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encodingcited by 0
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learningcited by 0
- 2026Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMscited by 0
1 more
- 2026Gated Target Propagation for Compositional Generalization in Continual Learning3 Oct 2026
- 2026Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMs21 Sep 2026
- 2026Multi-Task Bayesian In-Context Learning18 Jun 2026
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning20 May 2026
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encoding13 Mar 2026
- 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structure24 Nov 2025
- 2025Next-Token Prediction Should be Ambiguity-Sensitive: A Meta-Learning Perspective19 Jun 2025
- 2025In-Context Parametric Inference: Point or Distribution Estimators?17 Feb 2025
- 2025Why is prompting hard? Understanding prompts on binary sequence predictors15 Feb 2025
- 2024Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder Perspective16 Dec 2024
- 2024Amortized Probabilistic Conditioning for Optimization, Simulation and Inference20 Oct 2024
- 2024In-context learning and Occam's razor17 Oct 2024
1 more
- 2024Amortized Probabilistic Conditioning for Optimization, Simulation and Inferencecited by 23
- 2024Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder Perspectivecited by 9
- 2024In-context learning and Occam's razorcited by 8
- 2024Amortized Inference of Causal Models via Conditional Fixed-Point Iterationscited by 4
- 2025Why is prompting hard? Understanding prompts on binary sequence predictorscited by 4
- 2025In-Context Parametric Inference: Point or Distribution Estimators?cited by 4
- 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structurecited by 1
- 2026Multi-Task Bayesian In-Context Learningcited by 1
- 2025Next-Token Prediction Should be Ambiguity-Sensitive: A Meta-Learning Perspectivecited by 0
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encodingcited by 0
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learningcited by 0
- 2026Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMscited by 0
12 most cited of 13 All 13 (JSON)
- 2026Gated Target Propagation for Compositional Generalization in Continual Learning3 Oct 2026
- 2026Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMs21 Sep 2026
- 2026Multi-Task Bayesian In-Context Learning18 Jun 2026
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning20 May 2026
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encoding13 Mar 2026
- 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structure24 Nov 2025
- 2025Next-Token Prediction Should be Ambiguity-Sensitive: A Meta-Learning Perspective19 Jun 2025
- 2025In-Context Parametric Inference: Point or Distribution Estimators?17 Feb 2025
- 2025Why is prompting hard? Understanding prompts on binary sequence predictors15 Feb 2025
- 2024Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder Perspective16 Dec 2024
- 2024Amortized Probabilistic Conditioning for Optimization, Simulation and Inference20 Oct 2024
- 2024In-context learning and Occam's razor17 Oct 2024
12 newest of 13 All 13 (JSON)