Linking In-context Learning in Transformers to Human Episodic Memory
Ji-An Li, Corey Yishan Zhou, Marcus K. Benna, Marcelo G. Mattar
Abstract
Understanding connections between artificial and biological intelligent systems can reveal fundamental principles of general intelligence. While many artificial intelligence models have a neuroscience counterpart, such connections are largely missing in Transformer models and the self-attention mechanism. Here, we examine the relationship between interacting attention heads and human episodic memory. We focus on induction heads, which contribute to in-context learning in Transformer-based large language models (LLMs). We demonstrate that induction heads are behaviorally, functionally, and mechanistically similar to the contextual maintenance and retrieval (CMR) model of human episodic memory. Our analyses of LLMs pre-trained on extensive text data show that CMR-like heads often emerge in the intermediate and late layers, qualitatively mirroring human memory biases. The ablation of CMR-like heads suggests their causal role in in-context learning. Our findings uncover a parallel between the computational mechanisms of LLMs and human memory, offering valuable insights into both research fields.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- The mechanistic basis of data dependence and abrupt learning in an in-context classification task cites Language Models are Few-Shot Learners
- Human-inspired Episodic Memory for Infinite Context LLMs cites Hopfield Networks is All You Need
- Large Language Models as Model Organisms for Human Associative Learning cites Human-inspired Episodic Memory for Infinite Context LLMs
- Large Language Models as Model Organisms for Human Associative Learning cites Language Models are Few-Shot Learners
- Scaling laws for language encoding models in fMRI cites Language Models are Few-Shot Learners
- Relating transformers to models and neural representations of the hippocampal formation cites Language Models are Few-Shot Learners
Cited by top-tier papers3
- Human-inspired Episodic Memory for Infinite Context LLMsZafeirios Fountas, Martin Benfeghoul, Adnan Oomerjee, Fenia Christopoulou et al.ICLR 2025 · 1 citation
- Large Language Models as Model Organisms for Human Associative LearningCamila Kolling, Vy A. Vo, Mariya TonevaNeurIPS 2025 · 1 citation
- Medical Interpretability and Knowledge Maps of Large Language ModelsRazvan Marinescu, Victoria-Elisabeth Gruber, Diego Fajardo VargasICLR 2026 · 1 citation
Builds on9
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Hopfield Networks is All You NeedHubert Ramsauer, Bernhard Schäfl, Johannes Lehner, Philipp Seidl et al.ICLR 2021 · 620 citations
- Scaling laws for language encoding models in fMRIRichard J. Antonello, Aditya R. Vaidya, Alexander HuthNeurIPS 2023 · 137 citations
- The mechanistic basis of data dependence and abrupt learning in an in-context classification taskGautam ReddyICLR 2024 · 112 citations
- Relating transformers to models and neural representations of the hippocampal formationJames C. R. Whittington, Joseph Warren, Tim E. J. BehrensICLR 2022 · 110 citations
Related papers
- Identifying Semantic Induction Heads to Understand In-Context LearningJie Ren, Qipeng Guo, Hang Yan, Dongrui Liu et al.ACL Findings 2024 · 4 citations
- What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formationAaditya K. Singh, Ted Moskovitz, Felix Hill, Stephanie C. Y. Chan et al.ICML 2024 · 77 citations
- Induction Heads Interpolate N-GramsFrancesco D'Angelo, Oğuz Yüksel, Swathi Narashiman, Nicolas FlammarionICML 2026
- KV Shifting Attention Enhances Language ModelingMingyu Xu, Bingning Wang, Weipeng ChenICML 2025
- Rethinking the Role of Scale for In-Context Learning: An Interpretability-based Case Study at 66 Billion ScaleHritik Bansal, Karthik Gopalakrishnan, Saket Dingliwal, Sravan Bodapati et al.ACL 2023 · 11 citations
