Birth of a Transformer: A Memory Viewpoint
Not on the map. Why?
Abstract (arXiv)
Large language models based on transformers have achieved great empirical successes. However, as they are deployed more widely, there is a growing need to better understand their internal mechanisms in order to make them more reliable. These models appear to store vast amounts of knowledge from their training data, and to adapt quickly to new information provided in their context or prompt. We study how transformers balance these two types of knowledge by considering a synthetic setup where tokens are generated from either global or context-specific bigram distributions. By a careful empirical analysis of the training process on a simplified two-layer transformer, we illustrate the fast learning of global bigrams and the slower development of an "induction head" mechanism for the in-context bigrams. We highlight the role of weight matrices as associative memories, provide theoretical insights on how gradients enable their learning during training, and study the role of data-distributional properties.
Key facts. Cited by 154 papers in the map (data through 7 Oct 2026). Builds on 46 of its 61 references that are in the map. First posted on arXiv 1 Jun 2023.
Builds on
46 of 61 references.
References · 46
- 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
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,597
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
34 more
- 2022In-context Learning and Induction Headscited by 930
- 2022Toy Models of Superpositioncited by 928
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
- 2013Exact solutions to the nonlinear dynamics of learning in deep linear neural networkscited by 748
- 2018On Lazy Training in Differentiable Programmingcited by 671
- 2014Neural Turing Machinescited by 630
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 512
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
- 2014Memory Networkscited by 354
- 2017Implicit Regularization in Matrix Factorizationcited by 318
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 303
- 2020Towards Understanding Ensemble, Knowledge Distillation and Self-Distillation in Deep Learningcited by 292
- 2022Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfercited by 272
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2016Dense Associative Memory for Pattern Recognitioncited by 230
- 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
- 2022Neural Networks can Learn Representations with Gradient Descentcited by 161
- 2022High-dimensional Asymptotics of Feature Learning: How One Gradient Step Improves the Representationcited by 146
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2022Impact of Pretraining Term Frequencies on Few-Shot Reasoningcited by 142
- 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 137
- 2022Analyzing Transformers in Embedding Spacecited by 131
- 2020Infinite attention: NNGP and NTK for deep attention networkscited by 117
- 2022Unveiling Transformers with LEGO: a synthetic reasoning taskcited by 105
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101
- 2022Vision Transformers provably learn spatial structurecited by 92
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
- 2022On the Effect of Pretraining Corpora on In-context Learning by a Large-scale Language Modelcited by 78
- 2015Inferring Algorithmic Patterns with Stack-Augmented Recurrent Netscited by 76
- 2021Approximating How Single Head Attention Learnscited by 38
- 2021Attention Approximates Sparse Distributed Memorycited by 29
- 2022What is my math transformer doing? -- Three results on interpretability and generalizationcited by 19
- 2020Associative Memory in Iterated Overparameterized Sigmoid Autoencoderscited by 9
Built on by
Citing papers per year: 2023: 8; 2024: 58; 2025: 53; 2026: 35.
154 papers.
Sort:
By area:
- 2024Titans: Learning to Memorize at Test Timecited by 303
- 2025TTT3R: 3D Reconstruction as Test-Time Trainingcited by 122
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 113
- 2024Secret Collusion among AI Agents: Multi-Agent Deception via Steganographycited by 107
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
- 2024Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language Modelscited by 78
- 2024Transformers, parallel computation, and logarithmic depthcited by 75
- 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 72
- 2024Attention Heads of Large Language Models: A Surveycited by 65
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 63
38 more
- 2023Towards Vision-Language Mechanistic Interpretability: A Causal Tracing Tool for BLIPcited by 62
- 2025It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimizationcited by 60
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 57
- 2024Asymptotic theory of in-context learning by linear attentioncited by 54
- 2024Active-Dormant Attention Heads: Mechanistically Demystifying Extreme-Token Phenomena in LLMscited by 54
- 2023JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attentioncited by 52
- 2024Why Larger Language Models Do In-context Learning Differently?cited by 44
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 39
- 2024Outlier-Efficient Hopfield Layers for Large Transformer-Based Modelscited by 38
- 2025Muon Outperforms Adam in Tail-End Associative Memory Learningcited by 38
- 2023On the Optimization and Generalization of Multi-head Attentioncited by 37
- 2025Beyond Semantics: Rediscovering Spatial Awareness in Vision-Language Modelscited by 35
- 2025Emergent Abilities in Large Language Models: A Surveycited by 34
- 2024Large Language Models as Markov Chainscited by 33
- 2024Implicit Bias and Fast Convergence Rates for Self-attentioncited by 31
- 2023Scaling Laws for Associative Memoriescited by 30
- 2024A phase transition between positional and semantic learning in a solvable model of dot-product attentioncited by 30
- 2024One-layer transformers fail to solve the induction heads taskcited by 30
- 2024Towards a Theoretical Understanding of the 'Reversal Curse' via Training Dynamicscited by 27
- 2025Taming Knowledge Conflicts in Language Modelscited by 27
- 2024Transformers on Markov Data: Constant Depth Sufficescited by 26
- 2025The emergence of sparse attention: impact of data distribution and benefits of repetitioncited by 25
- 2024BiSHop: Bi-Directional Cellular Learning for Tabular Data with Generalized Sparse Modern Hopfield Modelcited by 21
- 2024Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descentcited by 21
- 2026There Will Be a Scientific Theory of Deep Learningcited by 21
- 2025How Do LLMs Perform Two-Hop Reasoning in Context?cited by 20
- 2024Self-attention Networks Localize When QK-eigenspectrum Concentratescited by 19
- 2024Provably Optimal Memory Capacity for Modern Hopfield Models: Transformer-Compatible Dense Associative Memories as Spherical Codescited by 19
- 2024Differential learning kinetics govern the transition from memorization to generalization during in-context learningcited by 19
- 2024Memory Mosaicscited by 16
- 2024Understanding the Language Model to Solve the Symbolic Multi-Step Reasoning Problem from the Perspective of Buffer Mechanismcited by 15
- 2024Attention layers provably solve single-location regressioncited by 15
- 2025Understanding the Skill Gap in Recurrent Language Models: The Role of the Gather-and-Aggregate Mechanismcited by 15
- 2025Learning In-context n-grams with Transformers: Sub-n-grams Are Near-stationary Pointscited by 15
- 2024Learning Associative Memories with Gradient Descentcited by 14
- 2024Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformerscited by 14
- 2023In-Context Learning Dynamics with Random Binary Sequencescited by 13
- 2025Where to show Demos in Your Prompt: A Positional Bias of In-Context Learningcited by 13
50 most cited of 154 All 154 (JSON)
- 2026In-Context Binding Capacity in Language Models24 Sep 2026
- 2026Temporal-Attention Head Specialization During Video Diffusion Training14 Sep 2026
- 2026Where Should Experience Live? Hierarchical Hebbian Memory for Continual Vision Transformers31 Aug 2026
- 2026Proteus: Incremental Memory Activation for Long-Context Sequence Modeling17 Aug 2026
- 2026Faster Query-Key Learning Sharpens Attention in Self-Attention Models7 Aug 2026
- 2026Invariant Learning Dynamics of Transformers in Inductive Reasoning Tasks13 Jul 2026
- 2026Fingerprint, Not Blueprint: How Positional Schemes Set the Default Spectral Algebra of Attention7 Jul 2026
- 2026Induction Heads Interpolate N-Grams2 Jul 2026
- 2026When Does Depth Matter For In-Context Learning? Adaptive Inference in Deep Transformers15 Jun 2026
- 2026The Deterministic Horizon: When Extended Reasoning Fails and Tool Delegation Becomes Necessary29 May 2026
- 2026Assign and Add: A Mechanistic Study of Compositional Arithmetic29 May 2026
- 2026Transformers Provably Learn to Internalize Chain-of-Thought27 May 2026
38 more
- 2026Enabling KV Caching of Shared Prefix for Diffusion Language Models26 May 2026
- 2026The Future of Facts: Tracing the Factual Generation-Verification Gap26 May 2026
- 2026Balancing Fidelity and Diversity in Diffusion Models via Symmetric Attention Decomposition: Hopfield Perspective26 May 2026
- 2026The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-training26 May 2026
- 2026Emergence of Frontier Superposition: M"obius attractor and Cascade Supervision12 May 2026
- 2026Geometric Factual Recall in Transformers12 May 2026
- 2026There Will Be a Scientific Theory of Deep Learning23 Apr 2026
- 2026Structural Instability of Feature Composition18 Apr 2026
- 2026Distinct mechanisms underlying in-context learning in transformers14 Apr 2026
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descent12 Apr 2026
- 2026Fast Spatial Memory with Elastic Test-Time Training8 Apr 2026
- 2026From Density Matrices to Phase Transitions in Deep Learning: Spectral Early Warnings and Interpretability31 Mar 2026
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledge21 Mar 2026
- 2026Sinkhorn Based Associative Memory Retrieval Using Spherical Hellinger Kantorovich Dynamics21 Mar 2026
- 2026N-gram-like Language Models Predict Naturalistic Reading Time Best10 Mar 2026
- 2026Gradient Flow Polarizes Softmax Outputs towards Low-Entropy Solutions6 Mar 2026
- 2026Memory Caching: RNNs with Growing Memory27 Feb 2026
- 2026Discrete Diffusion Models Exploit Asymmetry to Solve Lookahead Planning Tasks23 Feb 2026
- 2026Incremental Learning of Sparse Attention Patterns in Transformers22 Feb 2026
- 2026Gaussian Match-and-Copy: A Minimalist Benchmark for Studying Transformer Induction7 Feb 2026
- 2026Mixture-of-Top-k Attention: Efficient Attention via Scalable Fast Weights1 Feb 2026
- 2026How Do Transformers Learn to Associate Tokens: Gradient Leading Terms Bring Mechanistic Interpretability27 Jan 2026
- 2026Spectral Archaeology: The Causal Topology of Model Evolution6 Jan 2026
- 2025From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in Transformers21 Dec 2025
- 2025Towards Understanding Transformers in Learning Random Walks28 Nov 2025
- 2025Unexplored flaws in multiple-choice VQA make benchmarking unreliable27 Nov 2025
- 2025On the Role of Hidden States of Modern Hopfield Network in Transformer24 Nov 2025
- 2025Predicting the Emergence of Induction Heads in Language Model Pretraining21 Nov 2025
- 2025In-Context Learning Without Copying7 Nov 2025
- 2025On the Emergence of Induction Heads for In-Context Learning2 Nov 2025
- 2025Quantitative Bounds for Length Generalization in Transformers30 Oct 2025
- 2025Language Model Behavioral Phases are Consistent Across Architecture, Training Data, and Scale28 Oct 2025
- 2025Training-Free Spectral Fingerprints of Voice Processing in Transformers21 Oct 2025
- 2025Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions21 Oct 2025
- 2025Facts in Stats: Impacts of Pretraining Diversity on Language Model Generalization17 Oct 2025
- 2025Emergence of Linear Truth Encodings in Language Models17 Oct 2025
- 2025The Mechanistic Emergence of Symbol Grounding in Language Models15 Oct 2025
- 2025Medical Interpretability and Knowledge Maps of Large Language Models13 Oct 2025
50 newest of 154 All 154 (JSON)
- 2024Titans: Learning to Memorize at Test Timecited by 303
- 2025Beyond Semantics: Rediscovering Spatial Awareness in Vision-Language Modelscited by 35
- 2024Towards a Theoretical Understanding of the 'Reversal Curse' via Training Dynamicscited by 27
- 2025How Do LLMs Perform Two-Hop Reasoning in Context?cited by 20
- 2024Understanding the Language Model to Solve the Symbolic Multi-Step Reasoning Problem from the Perspective of Buffer Mechanismcited by 15
- 2025Is Random Attention Sufficient for Sequence Modeling? Disentangling Trainable Components in the Transformercited by 12
- 2025On the Query Complexity of Verifier-Assisted Language Generationcited by 10
- 2025Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformerscited by 10
- 2025Lost in Transmission: When and Why LLMs Fail to Reason Globallycited by 9
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledgecited by 2
- 2026Transformers Provably Learn to Internalize Chain-of-Thoughtcited by 1
- 2026The Deterministic Horizon: When Extended Reasoning Fails and Tool Delegation Becomes Necessarycited by 1
12 most cited of 14 All 14 (JSON)
- 2026Invariant Learning Dynamics of Transformers in Inductive Reasoning Tasks13 Jul 2026
- 2026The Deterministic Horizon: When Extended Reasoning Fails and Tool Delegation Becomes Necessary29 May 2026
- 2026Transformers Provably Learn to Internalize Chain-of-Thought27 May 2026
- 2026Emergence of Frontier Superposition: M"obius attractor and Cascade Supervision12 May 2026
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledge21 Mar 2026
- 2025Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformers12 Jun 2025
- 2025Is Random Attention Sufficient for Sequence Modeling? Disentangling Trainable Components in the Transformer1 Jun 2025
- 2025Lost in Transmission: When and Why LLMs Fail to Reason Globally13 May 2025
- 2025Beyond Semantics: Rediscovering Spatial Awareness in Vision-Language Models21 Mar 2025
- 2025How Do LLMs Perform Two-Hop Reasoning in Context?19 Feb 2025
- 2025On the Query Complexity of Verifier-Assisted Language Generation17 Feb 2025
- 2024Titans: Learning to Memorize at Test Time31 Dec 2024
12 newest of 14 All 14 (JSON)
- 2026Discrete Diffusion Models Exploit Asymmetry to Solve Lookahead Planning Taskscited by 4
- 2026Enabling KV Caching of Shared Prefix for Diffusion Language Modelscited by 1
- 2026Balancing Fidelity and Diversity in Diffusion Models via Symmetric Attention Decomposition: Hopfield Perspectivecited by 0
- 2026Temporal-Attention Head Specialization During Video Diffusion Trainingcited by 0
- 2026Temporal-Attention Head Specialization During Video Diffusion Training14 Sep 2026
- 2026Enabling KV Caching of Shared Prefix for Diffusion Language Models26 May 2026
- 2026Balancing Fidelity and Diversity in Diffusion Models via Symmetric Attention Decomposition: Hopfield Perspective26 May 2026
- 2026Discrete Diffusion Models Exploit Asymmetry to Solve Lookahead Planning Tasks23 Feb 2026
- 2025TTT3R: 3D Reconstruction as Test-Time Trainingcited by 122
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 114
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 113
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
- 2024Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language Modelscited by 78
- 2024Transformers, parallel computation, and logarithmic depthcited by 75
- 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 72
- 2024Attention Heads of Large Language Models: A Surveycited by 65
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 63
- 2023Towards Vision-Language Mechanistic Interpretability: A Causal Tracing Tool for BLIPcited by 62
- 2025It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimizationcited by 60
12 most cited of 131 All 131 (JSON)
- 2026In-Context Binding Capacity in Language Models24 Sep 2026
- 2026Where Should Experience Live? Hierarchical Hebbian Memory for Continual Vision Transformers31 Aug 2026
- 2026Proteus: Incremental Memory Activation for Long-Context Sequence Modeling17 Aug 2026
- 2026Faster Query-Key Learning Sharpens Attention in Self-Attention Models7 Aug 2026
- 2026Fingerprint, Not Blueprint: How Positional Schemes Set the Default Spectral Algebra of Attention7 Jul 2026
- 2026Induction Heads Interpolate N-Grams2 Jul 2026
- 2026When Does Depth Matter For In-Context Learning? Adaptive Inference in Deep Transformers15 Jun 2026
- 2026Assign and Add: A Mechanistic Study of Compositional Arithmetic29 May 2026
- 2026The Future of Facts: Tracing the Factual Generation-Verification Gap26 May 2026
- 2026The Stability of Singular Distribution: A Spectral Perspective on the Two-Phase Dynamics of Language Model Pre-training26 May 2026
- 2026Geometric Factual Recall in Transformers12 May 2026
- 2026There Will Be a Scientific Theory of Deep Learning23 Apr 2026
12 newest of 131 All 131 (JSON)