mlsanityData to 7 Oct 2026

Transformers can optimally learn regression mixture models

arXiv 2311.08362 ↗First posted 14 Nov 2023cs.LG stat.MLcited by 15

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2016Layer Normalizationcited by 5,579
  4. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  5. 2022Transformers learn in-context by gradient descentcited by 714
  6. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  7. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  8. 2020A Survey on Visual Transformercited by 653
  9. 2021Transformers Can Do Bayesian Inferencecited by 338
  10. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  11. 2021A Field Guide to Federated Optimizationcited by 312
  12. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
7 more
  1. 2023In-Context Learning through the Bayesian Prismcited by 78
  2. 2020Meta-learning for mixed linear regressioncited by 44
  3. 2018Learning Mixtures of Linear Regressions with Nearly Optimal Complexitycited by 37
  4. 2016Solving a Mixture of Many Random Linear Equations by Tensor Decomposition and Alternating Minimizationcited by 26
  5. 2019Learning Mixtures of Linear Regressions in Subexponential Time via Fourier Momentscited by 26
  6. 2016Avoiding Imposters and Delinquents: Adversarial Crowdsourcing and Peer Predictioncited by 15
  7. 2023Linear Regression using Heterogeneous Data Batchescited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 7; 2025: 7; 2026: 1.

15 papers.

Sort:

By area: