News ·
You could have invented transformers from memory
{"summary": "A technical blog post reframes linear layers, MLPs, and self-attention as associative memory stores, deriving capacity limits via an interference-to-signal ratio.", "description": ["A new post, 'You could have invented transformers from memory,' argues that every lay

{"summary": "A technical blog post reframes linear layers, MLPs, and self-attention as associative memory stores, deriving capacity limits via an interference-to-signal ratio.", "description": ["A new post, 'You could have invented transformers from memory,' argues that every layer of a transformer can be understood as a memory store holding key-value pairs, recalled by similarity between a query and stored keys. The author starts with the simplest case: a linear layer built from accumulated outer products, where storing a memory means adding vk^T to the weights, and recall returns a similarity-weighted sum of stored values.", ["The core quantity is the interference-to-signal ratio: when you recall a memory, every other stored memory whose key resembles the query contributes noise. For a linear outer-product store, random keys produce interference that grows like a random walk, so capacity is roughly the key dimension d_k — about 64 memories for 64-dimensional keys. Beyond that, interference drowns out the signal.", ["From there the post builds up: careful storage of outer-product memories yields an optimal linear store with about double the capacity, MLPs improve both capacity and recall, and self-attention achieves very good recall with potentially unbounded storage — jumping from roughly 64 memories to about 2,700 to over a million at 64-dimensional keys.", ["For builders, this gives an intuitive mental model of what capacity means mechanistically inside a network, and a q

References
- Hacker News · alexwang.ai
Read the full story at Hacker News ↗Like, save or discuss on Buzz


