Linking In-context Learning in Transformers to Human Episodic Memory

Li Ji-An, Corey Y. Zhou, Marcus K. Benna, Marcelo G. Mattar
5/23/2024
cs.CLcs.LG

No official code found. Best implementation: corxyz/icl-cmr (2 stars, MIT, last commit 2024-10-31).

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.

View on arXivView PDF

Code Implementations(1)

corxyz/icl-cmrCommunity100%
MIT

Official implementation of the paper "Linking In-context Learning in Transformers to Human Episodic Memory" by Li Ji-An, Corey Zhou, Marcus Benna, and Marcelo Mattar

20Python, Jupyter NotebookMay 21, 20241 years agoMIT
episodic-memoryinduction-headmechanistic-interpretability

Similar Papers

Cite this paper

@article{jian2024linking,
  title  = {Linking In-context Learning in Transformers to Human Episodic Memory},
  author = {Li Ji-An and Corey Y. Zhou and Marcus K. Benna and Marcelo G. Mattar},
  year   = {2024},
  eprint = {2405.14992},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.14992},
  url    = {http://arxiv.org/abs/2405.14992v2},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.14992.svg)](https://codeofpaper.com/paper/2405.14992)

Discussion