MLPs Learn In-Context on Regression and Classification Tasks
Not on the map. Why?
Abstract (arXiv)
In-context learning (ICL), the remarkable ability to solve a task from only input exemplars, is often assumed to be a unique hallmark of Transformer models. By examining commonly employed synthetic ICL tasks, we demonstrate that multi-layer perceptrons (MLPs) can also learn in-context. Moreover, MLPs, and the closely related MLP-Mixer models, learn in-context comparably with Transformers under the same compute budget in this setting. We further show that MLPs outperform Transformers on a series of classical tasks from psychology designed to test relational reasoning, which are closely related to in-context classification. These results underscore a need for studying in-context learning beyond attention-based architectures, while also challenging prior arguments against MLPs' ability to solve relational tasks. Altogether, our results highlight the unexpected competence of MLPs in a synthetic setting, and support the growing interest in all-MLP alternatives to Transformer architectures. It remains unclear how MLPs perform against Transformers at scale on real-world tasks, and where a performance gap may originate. We encourage further exploration of these architectures in more complex settings to better understand the potential comparative advantage of attention-based schemes.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 32 of its 52 references that are in the map. First posted on arXiv 24 May 2024.
Builds on
32 of 52 references.
References · 32
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2021MLP-Mixer: An all-MLP Architecture for Visioncited by 1,441
- 2018Relational inductive biases, deep learning, and graph networkscited by 1,341
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
20 more
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2021Pay Attention to MLPscited by 367
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 303
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
- 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 138
- 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 115
- 2023Are Emergent Abilities in Large Language Models just In-Context Learning?cited by 109
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Taskscited by 104
- 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 93
- 2023In-Context Learning through the Bayesian Prismcited by 78
- 2024Asymptotic theory of in-context learning by linear attentioncited by 54
- 2023Scaling MLPs: A Tale of Inductive Biascited by 37
- 2023The Relational Bottleneck as an Inductive Bias for Efficient Abstractioncited by 26
- 2023When can transformers reason with abstract symbols?cited by 23
- 2022pNLP-Mixer: an Efficient all-MLP Architecture for Languagecited by 19
- 2023Is attention required for ICL? Exploring the Relationship Between Model Architecture and In-Context Learning Abilitycited by 16
- 2020Relational reasoning and generalization using non-symbolic neural networkscited by 15
- 2023Relational Constraints On Neural Networks Reproduce Human Biases towards Abstract Geometric Regularitycited by 4
Built on by
Citing papers per year: 2024: 1; 2025: 6; 2026: 5.
12 papers.
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 44
- 2025Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Timecited by 15
- 2025Pretrain-Test Task Alignment Governs Generalization in In-Context Learningcited by 6
- 2025Learning richness modulates equality reasoning in neural networkscited by 2
- 2024DeepOSets: Non-Autoregressive In-Context Learning with Permutation-Invariance Inductive Biascited by 1
- 2025Linear Transformers Implicitly Discover Unified Numerical Algorithmscited by 1
- 2025Trained Mamba Emulates Online Gradient Descent in In-Context Linear Regressioncited by 1
- 2026Systematic Characterization of Minimal Deep Learning Architectures: A Unified Analysis of Convergence, Pruning, and Quantizationcited by 0
- 2026Dendritic In-Context Learning in a Single-Layer Spiking Neural Networkcited by 0
- 2026Sequential Correlations Change In-Context Learning: Effective Context Length and Architectural Mismatchcited by 0
- 2026Versatile On-device Adaptation at the Edge by Unifying Few-shot, Zero-shot, Continual, and In-context Learningcited by 0
- 2026From field-scale to large-scale spectral libraries: Tabular foundation models in soil spectroscopycited by 0
- 2026From field-scale to large-scale spectral libraries: Tabular foundation models in soil spectroscopy1 Aug 2026
- 2026Versatile On-device Adaptation at the Edge by Unifying Few-shot, Zero-shot, Continual, and In-context Learning31 Jul 2026
- 2026Sequential Correlations Change In-Context Learning: Effective Context Length and Architectural Mismatch4 Jul 2026
- 2026Dendritic In-Context Learning in a Single-Layer Spiking Neural Network2 Jul 2026
- 2026Systematic Characterization of Minimal Deep Learning Architectures: A Unified Analysis of Convergence, Pruning, and Quantization25 Jan 2026
- 2025Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time1 Oct 2025
- 2025Pretrain-Test Task Alignment Governs Generalization in In-Context Learning30 Sep 2025
- 2025Trained Mamba Emulates Online Gradient Descent in In-Context Linear Regression28 Sep 2025
- 2025Linear Transformers Implicitly Discover Unified Numerical Algorithms24 Sep 2025
- 2025Learning richness modulates equality reasoning in neural networks12 Mar 2025
- 2025Training Dynamics of In-Context Learning in Linear Attention27 Jan 2025
- 2024DeepOSets: Non-Autoregressive In-Context Learning with Permutation-Invariance Inductive Bias11 Oct 2024