Transformers can optimally learn regression mixture models
Not on the map. Why?
Abstract (arXiv)
Mixture models arise in many regression problems, but most methods have seen limited adoption partly due to these algorithms' highly-tailored and model-specific nature. On the other hand, transformers are flexible, neural sequence models that present the intriguing possibility of providing general-purpose prediction methods, even in this mixture setting. In this work, we investigate the hypothesis that transformers can learn an optimal predictor for mixtures of regressions. We construct a generative process for a mixture of linear regressions for which the decision-theoretic optimal procedure is given by data-driven exponential weights on a finite set of parameters. We observe that transformers achieve low mean-squared error on data generated via this process. By probing the transformer's output at inference time, we also show that transformers typically make predictions that are close to the optimal predictor. Our experiments also demonstrate that transformers can learn mixtures of regressions in a sample-efficient fashion and are somewhat robust to distribution shifts. We complement our experimental observations by proving constructively that the decision-theoretic optimal procedure is indeed implementable by a transformer.
Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 19 of its 28 references that are in the map. First posted on arXiv 14 Nov 2023.
Builds on
19 of 28 references.
References · 19
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2016Layer Normalizationcited by 5,579
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2020A Survey on Visual Transformercited by 653
- 2021Transformers Can Do Bayesian Inferencecited by 338
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2021A Field Guide to Federated Optimizationcited by 312
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
7 more
- 2023In-Context Learning through the Bayesian Prismcited by 78
- 2020Meta-learning for mixed linear regressioncited by 44
- 2018Learning Mixtures of Linear Regressions with Nearly Optimal Complexitycited by 37
- 2016Solving a Mixture of Many Random Linear Equations by Tensor Decomposition and Alternating Minimizationcited by 26
- 2019Learning Mixtures of Linear Regressions in Subexponential Time via Fourier Momentscited by 26
- 2016Avoiding Imposters and Delinquents: Adversarial Crowdsourcing and Peer Predictioncited by 15
- 2023Linear Regression using Heterogeneous Data Batchescited by 3
Built on by
Citing papers per year: 2024: 7; 2025: 7; 2026: 1.
15 papers.
Sort:
By area:
- 2024A Theoretical Understanding of Self-Correction through In-context Alignmentcited by 43
- 2024In-Context Learning of a Linear Transformer Block: Benefits of the MLP Component and One-Step GD Initializationcited by 30
- 2024Linear Transformers are Versatile In-Context Learnerscited by 28
- 2024On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixturescited by 15
- 2025Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Timecited by 15
- 2024A transfer learning framework for weak-to-strong generalizationcited by 14
- 2025Transformer learns the cross-task prior and regularization for in-context learningcited by 7
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classificationcited by 4
- 2025Transformers as Unsupervised Learning Algorithms: A study on Gaussian Mixturescited by 2
- 2024Integrating the Expected Future in Load Forecasts with Contextually Enhanced Transformer Modelscited by 1
- 2024In-context Learning for Mixture of Linear Regressions: Existence, Generalization and Training Dynamicscited by 1
- 2025On the Existence of Universal Simulators of Attentioncited by 1
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descent12 Apr 2026
- 2025Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time1 Oct 2025
- 2025Limitations of refinement methods for weak to strong generalization23 Aug 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025Transformer learns the cross-task prior and regularization for in-context learning17 May 2025
- 2025Transformers as Unsupervised Learning Algorithms: A study on Gaussian Mixtures17 May 2025
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classification21 Feb 2025
- 2025Technical Debt in In-Context Learning: Diminishing Efficiency in Long Context7 Feb 2025
- 2024In-context Learning for Mixture of Linear Regressions: Existence, Generalization and Training Dynamics18 Oct 2024
- 2024On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixtures15 Oct 2024
- 2024Integrating the Expected Future in Load Forecasts with Contextually Enhanced Transformer Models26 Aug 2024
- 2024A Theoretical Understanding of Self-Correction through In-context Alignment28 May 2024
- 2024In-Context Learning of a Linear Transformer Block: Benefits of the MLP Component and One-Step GD Initializationcited by 30
- 2024Linear Transformers are Versatile In-Context Learnerscited by 28
- 2024On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixturescited by 15
- 2025Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Timecited by 15
- 2024A transfer learning framework for weak-to-strong generalizationcited by 14
- 2025Transformer learns the cross-task prior and regularization for in-context learningcited by 7
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classificationcited by 4
- 2025Transformers as Unsupervised Learning Algorithms: A study on Gaussian Mixturescited by 2
- 2024Integrating the Expected Future in Load Forecasts with Contextually Enhanced Transformer Modelscited by 1
- 2024In-context Learning for Mixture of Linear Regressions: Existence, Generalization and Training Dynamicscited by 1
- 2025On the Existence of Universal Simulators of Attentioncited by 1
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descentcited by 1
12 most cited of 13 All 13 (JSON)
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descent12 Apr 2026
- 2025Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time1 Oct 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025Transformer learns the cross-task prior and regularization for in-context learning17 May 2025
- 2025Transformers as Unsupervised Learning Algorithms: A study on Gaussian Mixtures17 May 2025
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classification21 Feb 2025
- 2025Technical Debt in In-Context Learning: Diminishing Efficiency in Long Context7 Feb 2025
- 2024In-context Learning for Mixture of Linear Regressions: Existence, Generalization and Training Dynamics18 Oct 2024
- 2024On the Training Convergence of Transformers for In-Context Classification of Gaussian Mixtures15 Oct 2024
- 2024Integrating the Expected Future in Load Forecasts with Contextually Enhanced Transformer Models26 Aug 2024
- 2024A transfer learning framework for weak-to-strong generalization25 May 2024
- 2024In-Context Learning of a Linear Transformer Block: Benefits of the MLP Component and One-Step GD Initialization22 Feb 2024
12 newest of 13 All 13 (JSON)