In-Context Language Learning: Architectures and Algorithms
Not on the map. Why?
Abstract (arXiv)
Large-scale neural language models exhibit a remarkable capacity for in-context learning (ICL): they can infer novel functions from datasets provided as input. Most of our current understanding of when and how ICL arises comes from LMs trained on extremely simple learning problems like linear regression and associative recall. There remains a significant gap between these model problems and the "real" ICL exhibited by LMs trained on large text corpora, which involves not just retrieval and function approximation but free-form generation of language and other structured outputs. In this paper, we study ICL through the lens of a new family of model problems we term in context language learning (ICLL). In ICLL, LMs are presented with a set of strings from a formal language, and must generate additional strings from the same language. We focus on in-context learning of regular languages generated by random finite automata. We evaluate a diverse set of neural sequence models (including several RNNs, Transformers, and state-space model variants) on regular ICLL tasks, aiming to answer three questions: (1) Which model classes are empirically capable of ICLL? (2) What algorithmic solutions do successful models implement to perform ICLL? (3) What architectural changes can improve ICLL in less performant models? We first show that Transformers significantly outperform neural sequence models with recurrent or convolutional representations on ICLL tasks. Next, we provide evidence that their ability to do so relies on specialized "n-gram heads" (higher-order variants of induction heads) that compute input-conditional next-token distributions. Finally, we show that hard-wiring these heads into neural models improves performance not just on ICLL, but natural language modeling -- improving the perplexity of 340M-parameter models by up to 1.14 points (6.7%) on the SlimPajama dataset.
Key facts. Cited by 86 papers in the map (data through 7 Oct 2026). Builds on 43 of its 62 references that are in the map. First posted on arXiv 23 Jan 2024.
Builds on
43 of 62 references.
References · 43
- 2017Attention Is All You Needcited by 59,932
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2020GLU Variants Improve Transformercited by 1,724
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2022In-context Learning and Induction Headscited by 930
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
31 more
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
- 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
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 594
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 495
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
- 2022On the Parameterization and Initialization of Diagonal State Space Modelscited by 418
- 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 388
- 2023Larger language models do in-context learning differentlycited by 386
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 303
- 2022Long Range Language Modeling via Gated State Spacescited by 265
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 191
- 2022Transformer Quality in Linear Timecited by 189
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 188
- 2021An Attention Free Transformercited by 111
- 2022The Devil in Linear Transformercited by 98
- 2022Compositional Semantic Parsing with Large Language Modelscited by 95
- 2021An Interpretability Illusion for BERTcited by 94
- 2023Uncovering mesa-optimization algorithms in Transformerscited by 94
- 2023A Theory of Emergent In-Context Learning as Implicit Structure Inductioncited by 86
- 2023Understanding In-Context Learning in Transformers and LLMs by Learning to Learn Discrete Functionscited by 62
- 2020RNNs can generate bounded hierarchical languages with optimal memorycited by 59
- 2019Sequential Neural Networks as Automatacited by 54
- 2021Few-Shot Semantic Parsing with Language Models Trained On Codecited by 50
- 2019Memory-Augmented Recurrent Neural Networks Can Learn Generalized Dyck Languagescited by 31
- 2023Transformers are uninterpretable with myopic methods: a case study with bounded Dyck grammarscited by 30
- 2020On the Linguistic Capacity of Real-Time Counter Automatacited by 16
- 2023Is attention required for ICL? Exploring the Relationship Between Model Architecture and In-Context Learning Abilitycited by 16
- 2022What Makes Instruction Learning Hard? An Investigation and a New Challenge in a Synthetic Environmentcited by 9
- 2023MLRegTest: A Benchmark for the Machine Learning of Regular Languagescited by 7
Built on by
Citing papers per year: 2024: 35; 2025: 34; 2026: 17.
86 papers.
Sort:
By area:
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 167
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Taskscited by 104
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2024Attention Heads of Large Language Models: A Surveycited by 65
- 2024Mechanistic Design and Scaling of Hybrid Architecturescited by 57
- 2024Linearizing Large Language Modelscited by 51
- 2024Is Mamba Capable of In-Context Learning?cited by 45
- 2024The Expressive Capacity of State Space Models: A Formal Language Perspectivecited by 45
- 2025Emergent Symbolic Mechanisms Support Abstract Reasoning in Large Language Modelscited by 31
38 more
- 2024Linear Transformers are Versatile In-Context Learnerscited by 28
- 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformerscited by 28
- 2025Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation Steeringcited by 24
- 2026Gated DeltaNet-2: Decoupling Erase and Write in Linear Attentioncited by 24
- 2024A Hitchhiker's Guide to Scaling Law Estimationcited by 23
- 2024Training Neural Networks as Recognizers of Formal Languagescited by 23
- 2025The Dual-Route Model of Inductioncited by 22
- 2024Algorithmic Capabilities of Random Transformerscited by 17
- 2024Memory Mosaicscited by 16
- 2024Sparse Autoencoders Reveal Temporal Difference Learning in Large Language Modelscited by 15
- 2024Progressive distillation induces an implicit curriculumcited by 15
- 2024Evidence from counterfactual tasks supports emergent analogical reasoning in large language modelscited by 14
- 2024What Do Language Models Learn in Context? The Structured Task Hypothesiscited by 13
- 2024XLand-100B: A Large-Scale Multi-Task Dataset for In-Context Reinforcement Learningcited by 13
- 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scalecited by 13
- 2024Distributional Associations vs In-Context Reasoning: A Study of Feed-forward and Attention Layerscited by 12
- 2025Systems and Algorithms for Convolutional Multi-Hybrid Language Models at Scalecited by 12
- 2025Scaling Linear Attention with Sparse State Expansioncited by 12
- 2025EvaLearn: Quantifying the Learning Capability and Efficiency of LLMs via Sequential Problem Solvingcited by 10
- 2024Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder Perspectivecited by 9
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 9
- 2025Do different prompting methods yield a common task representation in language models?cited by 9
- 2025Yes, Q-learning Helps Offline In-Context RLcited by 8
- 2025Mechanistic evaluation of Transformers and state space modelscited by 8
- 2024ALTA: Compiler-Based Analysis of Transformerscited by 7
- 2024N-Gram Induction Heads for In-Context RL: Improving Stability and Reducing Data Needscited by 6
- 2025From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformerscited by 6
- 2024How Effective are State Space Models for Machine Translation?cited by 5
- 2024Task Diversity Shortens the ICL Plateaucited by 5
- 2024A Survey of RWKVcited by 5
- 2025Resona: Improving Context Copying in Linear Recurrence Models with Retrievalcited by 5
- 2025Bigram Subnetworks: Mapping to Next Tokens in Transformer Language Modelscited by 5
- 2024Amortized Inference of Causal Models via Conditional Fixed-Point Iterationscited by 4
- 2025Unlocking In-Context Learning for Natural Datasets Beyond Language Modellingcited by 4
- 2025Towards Large-Scale In-Context Reinforcement Learning by Meta-Training in Randomized Worldscited by 4
- 2025Counterfactual reasoning: an analysis of in-context emergencecited by 4
- 2025In-Context Algebracited by 4
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and Whencited by 3
50 most cited of 86 All 86 (JSON)
- 2026In-Context Learning Amplifies a Latent Symbolic Circuit28 Sep 2026
- 2026The Token Before the Value Is the Key: How Hybrid Architectures Organize Induction Circuits14 Sep 2026
- 2026Versatile On-device Adaptation at the Edge by Unifying Few-shot, Zero-shot, Continual, and In-context Learning31 Jul 2026
- 2026Invariant Learning Dynamics of Transformers in Inductive Reasoning Tasks13 Jul 2026
- 2026Can LLM Agents Infer World Models? Evidence from Agentic Automata Learning15 Jun 2026
- 2026Language Models Need Sleep: Learning to Self-Modify and Consolidate Memories2 Jun 2026
- 2026Blurry Window Attention31 May 2026
- 2026Gated DeltaNet-2: Decoupling Erase and Write in Linear Attention21 May 2026
- 2026Transformers Can Implement Preconditioned Richardson Iteration for In-Context Gaussian Kernel Regression8 May 2026
- 2026Fine-tuning vs. In-context Learning in Large Language Models: A Formal Language Learning Perspective25 Apr 2026
- 2026Contrast Matters: Understanding Robustness of In-Context Fine-Tuning to Target-Context Relatedness2 Apr 2026
- 2026N-gram-like Language Models Predict Naturalistic Reading Time Best10 Mar 2026
38 more
- 2026Retrievit: In-context Retrieval Capabilities of Transformers, State Space Models, and Hybrid Architectures3 Mar 2026
- 2026Incremental Learning of Sparse Attention Patterns in Transformers22 Feb 2026
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Induction7 Feb 2026
- 2026Online Vector Quantized Attention3 Feb 2026
- 2026Dissecting Linear Recurrent Models: How Different Gating Strategies Drive Selectivity and Generalization18 Jan 2026
- 2025SymSeqBench: a unified framework for the generation and analysis of rule-based symbolic sequences and datasets31 Dec 2025
- 2025Multiple Token Divergence: Measuring and Steering In-Context Computation Density28 Dec 2025
- 2025From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformers21 Dec 2025
- 2025In-Context Algebra18 Dec 2025
- 2025In-Context Learning Without Copying7 Nov 2025
- 2025Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation Steering1 Nov 2025
- 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scale28 Oct 2025
- 2025To Infinity and Beyond: Tool-Use Unlocks Length Generalization in State Space Models16 Oct 2025
- 2025Evaluating the Use of Large Language Models as Synthetic Social Agents in Social Science Research30 Sep 2025
- 2025In-Context Learning can Perform Continual Learning Like Humans26 Sep 2025
- 2025Context and Diversity Matter: The Emergence of In-Context Learning in World Models26 Sep 2025
- 2025Markov Chain Estimation with In-Context Learning5 Aug 2025
- 2025Scaling Linear Attention with Sparse State Expansion22 Jul 2025
- 2025Rethinking Memorization Measures and their Implications in Large Language Models20 Jul 2025
- 2025Decomposing Prediction Mechanisms for In-Context Recall2 Jul 2025
- 2025Assessing the Limits of In-Context Learning beyond Functions using Partially Ordered Relation16 Jun 2025
- 2025Counterfactual reasoning: an analysis of in-context emergence5 Jun 2025
- 2025EvaLearn: Quantifying the Learning Capability and Efficiency of LLMs via Sequential Problem Solving3 Jun 2025
- 2025HAD: Hybrid Architecture Distillation Outperforms Teacher in Genomic Sequence Modeling27 May 2025
- 2025Mechanistic evaluation of Transformers and state space models21 May 2025
- 2025Do different prompting methods yield a common task representation in language models?17 May 2025
- 2025Illusion or Algorithm? Investigating Memorization, Emergence, and Symbolic Processing in In-Context Learning16 May 2025
- 2025Bigram Subnetworks: Mapping to Next Tokens in Transformer Language Models21 Apr 2025
- 2025The Dual-Route Model of Induction3 Apr 2025
- 2025Resona: Improving Context Copying in Linear Recurrence Models with Retrieval28 Mar 2025
- 2025Measuring In-Context Computation Complexity via Hidden State Prediction17 Mar 2025
- 2025Emergent Symbolic Mechanisms Support Abstract Reasoning in Large Language Models27 Feb 2025
- 2025Systems and Algorithms for Convolutional Multi-Hybrid Language Models at Scale25 Feb 2025
- 2025Yes, Q-learning Helps Offline In-Context RL24 Feb 2025
- 2025CoT-ICL Lab: A Synthetic Framework for Studying Chain-of-Thought Learning from In-Context Demonstrations21 Feb 2025
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chains14 Feb 2025
- 2025Towards Large-Scale In-Context Reinforcement Learning by Meta-Training in Randomized Worlds5 Feb 2025
- 2025Unlocking In-Context Learning for Natural Datasets Beyond Language Modelling9 Jan 2025
50 newest of 86 All 86 (JSON)
- 2025Emergent Symbolic Mechanisms Support Abstract Reasoning in Large Language Modelscited by 31
- 2024Training Neural Networks as Recognizers of Formal Languagescited by 23
- 2024Evidence from counterfactual tasks supports emergent analogical reasoning in large language modelscited by 14
- 2024Distributional Associations vs In-Context Reasoning: A Study of Feed-forward and Attention Layerscited by 12
- 2025Counterfactual reasoning: an analysis of in-context emergencecited by 4
- 2025CoT-ICL Lab: A Synthetic Framework for Studying Chain-of-Thought Learning from In-Context Demonstrationscited by 2
- 2025Randomly Sampled Language Reasoning Problems Elucidate Limitations of In-Context Learningcited by 1
- 2025Rethinking Memorization Measures and their Implications in Large Language Modelscited by 1
- 2026Invariant Learning Dynamics of Transformers in Inductive Reasoning Taskscited by 1
- 2026Invariant Learning Dynamics of Transformers in Inductive Reasoning Tasks13 Jul 2026
- 2025Rethinking Memorization Measures and their Implications in Large Language Models20 Jul 2025
- 2025Counterfactual reasoning: an analysis of in-context emergence5 Jun 2025
- 2025Emergent Symbolic Mechanisms Support Abstract Reasoning in Large Language Models27 Feb 2025
- 2025CoT-ICL Lab: A Synthetic Framework for Studying Chain-of-Thought Learning from In-Context Demonstrations21 Feb 2025
- 2025Randomly Sampled Language Reasoning Problems Elucidate Limitations of In-Context Learning6 Jan 2025
- 2024Training Neural Networks as Recognizers of Formal Languages11 Nov 2024
- 2024Distributional Associations vs In-Context Reasoning: A Study of Feed-forward and Attention Layers5 Jun 2024
- 2024Evidence from counterfactual tasks supports emergent analogical reasoning in large language models14 Apr 2024
- 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modelingcited by 167
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Taskscited by 104
- 2024Is Mamba Capable of In-Context Learning?cited by 45
- 2026Gated DeltaNet-2: Decoupling Erase and Write in Linear Attentioncited by 24
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 9
- 2025Mechanistic evaluation of Transformers and state space modelscited by 8
- 2024How Effective are State Space Models for Machine Translation?cited by 5
- 2024Can Custom Models Learn In-Context? An Exploration of Hybrid Architecture Performance on In-Context Learning Taskscited by 0
- 2026Gated DeltaNet-2: Decoupling Erase and Write in Linear Attention21 May 2026
- 2025Mechanistic evaluation of Transformers and state space models21 May 2025
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chains14 Feb 2025
- 2024Can Custom Models Learn In-Context? An Exploration of Hybrid Architecture Performance on In-Context Learning Tasks6 Nov 2024
- 2024How Effective are State Space Models for Machine Translation?7 Jul 2024
- 2024Samba: Simple Hybrid State Space Models for Efficient Unlimited Context Language Modeling11 Jun 2024
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Tasks6 Feb 2024
- 2024Is Mamba Capable of In-Context Learning?5 Feb 2024
- 2026Blurry Window Attentioncited by 1
- 2026Blurry Window Attention31 May 2026
- 2025Yes, Q-learning Helps Offline In-Context RLcited by 8
- 2025Yes, Q-learning Helps Offline In-Context RL24 Feb 2025
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2024Attention Heads of Large Language Models: A Surveycited by 65
- 2024Mechanistic Design and Scaling of Hybrid Architecturescited by 57
- 2024Linearizing Large Language Modelscited by 51
- 2024The Expressive Capacity of State Space Models: A Formal Language Perspectivecited by 45
- 2024Linear Transformers are Versatile In-Context Learnerscited by 28
- 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformerscited by 28
- 2025Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation Steeringcited by 24
- 2024A Hitchhiker's Guide to Scaling Law Estimationcited by 23
12 most cited of 64 All 64 (JSON)
- 2026In-Context Learning Amplifies a Latent Symbolic Circuit28 Sep 2026
- 2026The Token Before the Value Is the Key: How Hybrid Architectures Organize Induction Circuits14 Sep 2026
- 2026Versatile On-device Adaptation at the Edge by Unifying Few-shot, Zero-shot, Continual, and In-context Learning31 Jul 2026
- 2026Language Models Need Sleep: Learning to Self-Modify and Consolidate Memories2 Jun 2026
- 2026Transformers Can Implement Preconditioned Richardson Iteration for In-Context Gaussian Kernel Regression8 May 2026
- 2026Fine-tuning vs. In-context Learning in Large Language Models: A Formal Language Learning Perspective25 Apr 2026
- 2026Contrast Matters: Understanding Robustness of In-Context Fine-Tuning to Target-Context Relatedness2 Apr 2026
- 2026N-gram-like Language Models Predict Naturalistic Reading Time Best10 Mar 2026
- 2026Retrievit: In-context Retrieval Capabilities of Transformers, State Space Models, and Hybrid Architectures3 Mar 2026
- 2026Incremental Learning of Sparse Attention Patterns in Transformers22 Feb 2026
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Induction7 Feb 2026
- 2026Online Vector Quantized Attention3 Feb 2026
12 newest of 64 All 64 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
- 2022Self-Generated In-Context Learning: Leveraging Auto-regressive Language Models as a Demonstration Generator
- 2023Concept-aware Training Improves In-context Learning Ability of Language Models
- 2025Beyond In-Context Learning: Aligning Long-form Generation of Large Language Models via Task-Inherent Attribute Guidelines
- 2025On the Relationship Between the Choice of Representation and In-Context Learning
- 2023Multilingual LLMs are Better Cross-lingual In-context Learners with Alignment
- 2023In-Context Explainers: Harnessing LLMs for Explaining Black Box Models
- 2025Leveraging In-Context Learning for Language Model Agents