Lune

NeurIPS2021Top-tier venue

Attention Approximates Sparse Distributed Memory

Trenton Bricken, Cengiz Pehlevan

Abstract

While Attention has come to be an important mechanism in deep learning, there remains limited intuition for why it works so well. Here, we show that Transformer Attention can be closely related under certain data conditions to Kanerva's Sparse Distributed Memory (SDM), a biologically plausible associative memory model. We confirm that these conditions are satisfied in pre-trained GPT2 Transformer models. We discuss the implications of the Attention-SDM map and provide new computational and biological interpretations of Attention. 1 This cerebellar relationship is additionally compelling by the fact that cerebellum-like neuroanatomy exists in many other organisms including numerous insects (eg. the Drosophila Mushroom Body) and potentially cephalopods [17, 18, 19, 20, 21] .

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.

14 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Decoupled Context Processing for Context Augmented Language Modeling cites Extracting Training Data from Large Language Models
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Generative Pretraining From Pixels
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
  • Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Models cites Language Models are Few-Shot Learners
  • Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers cites Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory Models
  • Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers cites Language Models are Few-Shot Learners
  • Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformers cites Birth of a Transformer: A Memory Viewpoint
  • Birth of a Transformer: A Memory Viewpoint cites Language Models are Few-Shot Learners
  • Neuroformer: Multimodal and Multitask Generative Pretraining for Brain Data cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Neuroformer: Multimodal and Multitask Generative Pretraining for Brain Data cites Language Models are Few-Shot Learners
  • Extracting Training Data from Large Language Models cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers14

  1. Birth of a Transformer: A Memory ViewpointAlberto Bietti, Vivien Cabannes, Diane Bouchacourt, Hervé Jégou et al.NeurIPS 2023 · 182 citations
  2. Universal Hopfield Networks: A General Framework for Single-Shot Associative Memory ModelsBeren Millidge, Tommaso Salvatori, Yuhang Song, Thomas Lukasiewicz et al.ICML 2022 · 72 citations
  3. Decoupled Context Processing for Context Augmented Language ModelingZonglin Li, Ruiqi Guo, Sanjiv KumarNeurIPS 2022 · 31 citations
  4. Neuroformer: Multimodal and Multitask Generative Pretraining for Brain DataAntonis Antoniades, Yiyi Yu, Joseph Canzano, William Yang Wang et al.ICLR 2024 · 21 citations
  5. Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformersYibo Jiang, Goutham Rajendran, Pradeep Ravikumar, Bryon AragamNeurIPS 2024 · 19 citations

Builds on11

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  3. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations
  4. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
  5. Generative Pretraining From PixelsMark Chen, Alec Radford, Rewon Child, Jeffrey Wu et al.ICML 2020 · 1,773 citations

Related papers

  1. Sparse Distributed Memory is a Continual LearnerTrenton Bricken, Xander Davies, Deepak Singh, Dmitry Krotov et al.ICLR 2023 · 5 citations
  2. Associative TransformerYuwei Sun, Hideya Ochiai, Zhirong Wu, Stephen Lin et al.CVPR 2025
  3. Attention as Implicit Structural InferenceRyan Singh, Christopher L. BuckleyNeurIPS 2023 · 12 citations
  4. On the Role of Hidden States of Modern Hopfield Network in TransformerTsubasa Masumura, Masato TakiNeurIPS 2025 · 2 citations
  5. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations
Dusk over the sea between two cliffs drawn in fine vertical lines