SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.14992 · NeurIPS · 2024

Linking In-context Learning in Transformers to Human Episodic Memory

Ji-An Li, Corey Zhou, Marcus Benna, Marcelo Mattar

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 4 functions out of this paper's own repositories and ran 4 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
corxyz/icl-cmr canonical 4 of 4
FunctionStatusWhere it lives
encode Ran corxyz/icl-cmr/src/est_cmr_crp.py
code served (permissive licence) · get_code("f69ec72349fdfe0b")
estimateCRP Ran corxyz/icl-cmr/src/est_cmr_crp.py
code served (permissive licence) · get_code("19be42621424ca7a")
recall Ran corxyz/icl-cmr/src/est_cmr_crp.py
code served (permissive licence) · get_code("f1a1d41252470dbe")
scale_crp_to_attn Ran corxyz/icl-cmr/src/fit_attn_score.py
code served (permissive licence) · get_code("c065827af37a0a66")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2405.14992")
get_code_for_paper("2405.14992")
have("2405.14992")

Connect an agent — have() is free.