Understanding Transformer from the Perspective of Associative Memory
Shu Zhong, Mingyu Xu, Tenglong Ao, Guang Shi

TL;DR
This paper offers a new perspective on Transformer architectures by analyzing them as associative memory systems, providing insights into their capacity, learning dynamics, and potential for future improvements.
Contribution
It introduces a framework connecting Transformers with associative memory concepts, including measures like retrieval SNR and insights into memory capacity and update mechanisms.
Findings
Softmax Attention's effectiveness explained via kernel perspective
FFNs can be viewed as associative memory units
Transformers' limitations and potential for infinite context explored
Abstract
In this paper, we share our reflections and insights on understanding Transformer architectures through the lens of associative memory--a classic psychological concept inspired by human cognition. We start with the basics of associative memory (think simple linear attention) and then dive into two dimensions: Memory Capacity: How much can a Transformer really remember, and how well? We introduce retrieval SNR to measure this and use a kernel perspective to mathematically reveal why Softmax Attention is so effective. We also show how FFNs can be seen as a type of associative memory, leading to insights on their design and potential improvements. Memory Update: How do these memories learn and evolve? We present a unified framework for understanding how different Transformer variants (like DeltaNet and Softmax Attention) update their "knowledge base". This leads us to tackle two…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsEducational and Psychological Assessments
MethodsAttention Is All You Need · Linear Layer · Layer Normalization · Byte Pair Encoding · Residual Connection · Dense Connections · Softmax · Position-Wise Feed-Forward Layer · Absolute Position Encodings · Label Smoothing
