Associative memory inspires improvements for in-context learning using a novel attention residual stream architecture
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) demonstrate an impressive ability to utilise information within the context of their input sequences to appropriately respond to data unseen by the LLM during its training procedure. This ability is known as in-context learning (ICL). Humans and non-human animals demonstrate similar abilities, however their neural architectures differ substantially from LLMs. Despite this, a critical component within LLMs, the attention mechanism, resembles modern associative memory models, widely used in and influenced by the computational neuroscience community to model biological memory systems. Using this connection, we introduce an associative memory model capable of performing ICL. We use this as inspiration for a novel residual stream architecture which allows information to directly flow between attention heads. We test this architecture during training within a two-layer Transformer and show its ICL abilities manifest more quickly than without this modification. We then apply our architecture in small language models with 8 million and 1 billion parameters, focusing on attention head values, with results also indicating improved performance at these larger and more naturalistic scales.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 48 of its 165 references that are in the map. First posted on arXiv 19 Dec 2024.
Builds on
48 of 165 references.
References · 48
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2020GLU Variants Improve Transformercited by 1,724
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
- 2022In-context Learning and Induction Headscited by 930
36 more
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
- 2020Hopfield Networks is All You Needcited by 461
- 2023TinyStories: How Small Can Language Models Be and Still Speak Coherent English?cited by 425
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2016Dense Associative Memory for Pattern Recognitioncited by 230
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 220
- 2020Language Conditioned Imitation Learning over Unstructured Datacited by 208
- 2023Large Language Models as General Pattern Machinescited by 196
- 2023Linearity of Relation Decoding in Transformer Language Modelscited by 190
- 2021ResViT: Residual vision transformers for multi-modal medical image synthesiscited by 177
- 2023Birth of a Transformer: A Memory Viewpointcited by 154
- 2024Nemotron-CC: Transforming Common Crawl into a Refined Long-Horizon Pretraining Datasetcited by 153
- 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 115
- 2024Transformers represent belief state geometry in their residual streamcited by 73
- 2021Attractor and integrator networks in the braincited by 60
- 2024Asymptotic theory of in-context learning by linear attentioncited by 54
- 2020Modern Hopfield Networks and Attention for Immune Repertoire Classificationcited by 52
- 2022Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Modelscited by 52
- 2023The Local Learning Coefficient: A Singularity-Aware Complexity Measurecited by 50
- 2024Understanding Factual Recall in Transformers via Associative Memoriescited by 45
- 2020Generative Temporal Difference Learning for Infinite-Horizon Predictioncited by 43
- 2021Attention Approximates Sparse Distributed Memorycited by 29
- 2023ScaleLong: Towards More Stable Training of Diffusion Model via Scaling Network Long Skip Connectioncited by 25
- 2021Biological learning in key-value memory networkscited by 18
- 2023Simplicial Hopfield networkscited by 16
- 2021Drawing Inspiration from Biological Dendrites to Empower Artificial Neural Networkscited by 15
- 2024Linking In-context Learning in Transformers to Human Episodic Memorycited by 15
- 2023Exploring the Relationship between In-Context Learning and Instruction Tuningcited by 14
- 2024Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformerscited by 14
- 2023In-Context Exemplars as Clues to Retrieving from Large Associative Memorycited by 13
- 2024Using Degeneracy in the Loss Landscape for Mechanistic Interpretabilitycited by 12
- 2022Content Addressable Memory Without Catastrophic Forgetting by Heteroassociation with a Fixed Scaffoldcited by 11
- 2014Neural coordination can be enhanced by occasional interruption of normal firing patterns: A self-optimizing spiking neural network modelcited by 3
- 2023Nonparametric Classification on Low Dimensional Manifolds using Overparameterized Convolutional Residual Networkscited by 2
- 2024Semantically-correlated memories in a dense associative modelcited by 2
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.