This episode examines "Transformer Feed-Forward Layers Are Key-Value Memories," which argues that the feed-forward blocks holding about two-thirds of a transformer's parameters work as neural memories. The discussion derives that share from the architecture: roughly 8d² parameters in the feed-forward layer against 4d² in attention. It then shows how the layer's form, a ReLU applied to the input times Kᵀ and then times V, mirrors the memory networks of 2015, with a ReLU in place of the softmax. The paper's central conjectures are that keys detect input text patterns, that values encode next-token distributions, and that layers combine their contributions through the residual connection. The episode also covers how the authors test this on one 16-layer, 247-million-parameter model trained on WikiText-103. They sample 160 keys, find the prefixes that trigger each one, and sort the patterns into shallow (surface forms) and semantic (topic-level) types. Listeners get a clear, hedged account of an early interpretability result and of how far evidence from a single small model can be pushed.
Sources:
1. Transformer Feed-Forward Layers Are Key-Value Memories — Mor Geva, Roei Schuster, Jonathan Berant, Omer Levy, 2020
http://arxiv.org/abs/2012.14913
2. End-To-End Memory Networks — Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, Rob Fergus, 2015
https://scholar.google.com/scholar?q=End-To-End+Memory+Networks
3. Augmenting Self-attention with Persistent Memory — Sainbayar Sukhbaatar, Edouard Grave, Guillaume Lample, Hervé Jégou, Armand Joulin, 2019
https://scholar.google.com/scholar?q=Augmenting+Self-attention+with+Persistent+Memory
4. Locating and Editing Factual Associations in GPT (ROME) — Kevin Meng, David Bau, Alex Andonian, Yonatan Belinkov, 2022
https://scholar.google.com/scholar?q=Locating+and+Editing+Factual+Associations+in+GPT+%28ROME%29
5. Memory Layers at Scale — Vincent-Pierre Berges, Barlas Oğuz, Daniel Haziza, Wen-tau Yih, Luke Zettlemoyer, Gargi Ghosh, 2024
https://scholar.google.com/scholar?q=Memory+Layers+at+Scale
6. Knowledge Neurons in Pretrained Transformers — Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, Furu Wei, 2022
https://scholar.google.com/scholar?q=Knowledge+Neurons+in+Pretrained+Transformers
7. Large Memory Layers with Product Keys — Guillaume Lample, Alexandre Sablayrolles, Marc'Aurelio Ranzato, Ludovic Denoyer, Hervé Jégou, 2019
https://scholar.google.com/scholar?q=Large+Memory+Layers+with+Product+Keys
8. Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space — Mor Geva, Avi Caciularu, Kevin Ro Wang, Yoav Goldberg, 2022
https://scholar.google.com/scholar?q=Transformer+Feed-Forward+Layers+Build+Predictions+by+Promoting+Concepts+in+the+Vocabulary+Space
9. A Mathematical Framework for Transformer Circuits — Nelson Elhage, Neel Nanda, Catherine Olsson, et al. (Anthropic), 2021
https://scholar.google.com/scholar?q=A+Mathematical+Framework+for+Transformer+Circuits
10. Toy Models of Superposition — Nelson Elhage, Tristan Hume, Catherine Olsson, et al., 2022
https://scholar.google.com/scholar?q=Toy+Models+of+Superposition
11. Towards Monosemanticity: Decomposing Language Models With Dictionary Learning — Trenton Bricken, Adly Templeton, et al. (Anthropic), 2023
https://scholar.google.com/scholar?q=Towards+Monosemanticity%3A+Decomposing+Language+Models+With+Dictionary+Learning
12. Interpreting GPT: the logit lens — nostalgebraist, 2020
https://scholar.google.com/scholar?q=Interpreting+GPT%3A+the+logit+lens
13. Eliciting Latent Predictions from Transformers with the Tuned Lens — Nora Belrose, Zach Furman, Logan Smith, et al., 2023
https://scholar.google.com/scholar?q=Eliciting+Latent+Predictions+from+Transformers+with+the+Tuned+Lens
14. Transformer Language Models without Positional Encodings Still Learn Positional Information / GLU Variants Improve Transformer — Noam Shazeer (GLU Variants Improve Transformer), 2020
https://scholar.google.com/scholar?q=Transformer+Language+Models+without+Positional+Encodings+Still+Learn+Positional+Information+%2F+GLU+Variants+Improve+Transformer
15. Switch Transformers / Outrageously Large Neural Networks (sparsely-gated MoE) — William Fedus, Barret Zoph, Noam Shazeer; Noam Shazeer et al., 2021 / 2017
https://scholar.google.com/scholar?q=Switch+Transformers+%2F+Outrageously+Large+Neural+Networks+%28sparsely-gated+MoE%29
Interactive Visualization: Transformer Feed-Forward Layers Are Key-Value Memories