Oriel — AI & technology worth noticing, every day.

You could have invented transformers from memory

Web page · https://alexwang.ai/posts/associative-memory

First seen by Oriel on .

AI summary

This post explains linear layers, MLPs, and self-attention as associative memory stores, deriving how selective recall and interference determine capacities from about 64 to over a million memories.

  • A linear outer-product store recalls values by weighting every stored value according to key similarity, but interference limits capacity to approximately the key dimension, d_k.
  • Least-squares storage whitens key covariance, recalls all memories exactly through M = d_k, and doubles capacity to approximately 2d_k for random keys and values.
  • Applying a nonlinearity to similarities creates an MLP memory store that suppresses weak matches; squared ReLU reduces interference more strongly than ReLU.
  • With 64-dimensional keys, the post compares capacities of about 64 memories for outer products, 2,700 for MLPs, and over a million for self-attention.
  • Transformer MLPs can store facts in superposition, sharing weights across many memories while activating as few as 1% of hidden units for a given input.

#associative memory #transformers #mlps #self-attention

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Points

Score reported by the source.

  • Lobsters: 3, latest observation ; +2 over observed period since

Comments

Comment count reported by the source.

  • Lobsters: 0, latest observation ; 0 over observed period since

Aliases

SourceExternal IDURL
Hacker News50122878https://alexwang.ai/posts/associative-memory/ Read discussion
Lobstersu2h9ashttps://alexwang.ai/posts/associative-memory/ Read discussion