Reproduce “Birth of a Transformer: A Memory Viewpoint” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Alberto Bietti, Vivien Cabannes, Diane Bouchacourt, Herve Jegou, Leon Bottou

This paper analyzes how in-context learning, specifically the "induction head" circuit, emerges in simplified transformers during training by interpreting weight matrices as associative memories. It details a sequential "top-down" learning process for this mechanism and its interaction with global knowledge acquisition.

Key insights

  • The induction head, a fundamental circuit for in-context learning, develops through a specific "top-down" sequence: the output matrix (`W^2_O`) learns initial associations, providing a signal for attention key-query matrices (`W^2_K`, `W^1_K`) to then refine attention patterns.
  • Gradient descent naturally forms associative memories within weight matrices by accumulating input-output pair information, even from noisy inputs, enabling robust recall.
  • Transformers learn global knowledge (e.g., bigram statistics via `W_F`) at a significantly faster rate than the mechanisms responsible for in-context learning (induction head).

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.