Understanding Transformer from the Perspective of Associative Memory

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zhong, Shu, Xu, Mingyu, Ao, Tenglong, Shi, Guang
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866916759010803712
author Zhong, Shu
Xu, Mingyu
Ao, Tenglong
Shi, Guang
author_facet Zhong, Shu
Xu, Mingyu
Ao, Tenglong
Shi, Guang
contents 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 provocative questions: 1. Are Transformers fundamentally limited in what they can express, and can we break these barriers? 2. If a Transformer had infinite context, would it become infinitely intelligent? We want to demystify Transformer architecture, offering a clearer understanding of existing designs. This exploration aims to provide fresh insights and spark new avenues for Transformer innovation.
format Preprint
id arxiv_https___arxiv_org_abs_2505_19488
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Understanding Transformer from the Perspective of Associative Memory
Zhong, Shu
Xu, Mingyu
Ao, Tenglong
Shi, Guang
Machine Learning
Artificial Intelligence
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 provocative questions: 1. Are Transformers fundamentally limited in what they can express, and can we break these barriers? 2. If a Transformer had infinite context, would it become infinitely intelligent? We want to demystify Transformer architecture, offering a clearer understanding of existing designs. This exploration aims to provide fresh insights and spark new avenues for Transformer innovation.
title Understanding Transformer from the Perspective of Associative Memory
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2505.19488