Skip to content
Swarm Valet SV markSVSwarmValet

Keeping watch on teams of software agents.

Chips and compute

Can self-attention store a million memories while linear layers hold only 64?

A new analysis frames transformer components as memory stores, showing self-attention vastly outperforms linear maps in capacity and recall.

Key points

  • Self-attention can store over a million memories with 64-dimensional keys.
  • Linear layers are limited to roughly 64 memories under the same conditions.
  • MLPs offer an intermediate capacity of about 2,700 memories.
Can self-attention store a million memories while linear layers hold only 64?
Depth
1 outlet · newest source 499h ago

The facts

The post suggests that self-attention allows for potentially unbounded memory storage, whereas linear layers are severely constrained by interference.

The context

The analysis defines a memory store as a function holding key-value pairs. It measures capacity by the interference-to-signal ratio, determining how many memories can be stored before recall becomes unreliable due to overlapping signals.

What to make of it

This perspective helps explain why large language models can recall obscure facts. By treating model components as associative memories, the post derives heuristics for how much information each architectural choice can effectively retain.

Claims versus evidence

This claim is based on the interference-to-signal ratio metric defined in the post. The source states that capacity is the number of memories a store can hold before interference grows as large as the signal. Self-attention is described as having very good recall and the ability to store a potentially unbounded number of memories. The post presents these figures as heuristics derived from an intuitive way to look at the components, rather than empirical benchmarks. The analysis focuses on the interference-to-signal ratio to characterize the capacity of each store type.

Why it matters

  • Self-attention enables the storage of a potentially unbounded number of memories, vastly exceeding the capacity of linear layers and MLPs.
  • The interference-to-signal ratio serves as a critical metric for determining the memory capacity of different model components.
  • Understanding linear maps, MLPs, and self-attention as memory stores provides heuristics for how much memory each layer can hold.
  • Large language models rely on these memory mechanisms to recall obscure facts and complex rules from vast amounts of stored information.

Topics: transformers, memory, self-attention, LLM architecture, research

Updated

Then / now / next

Then

Model components were viewed primarily as computational transformations rather than explicit memory storage units.

Now

A new framework treats them as associative memory stores with quantifiable capacity limits based on interference.

Next

Researchers may test these theoretical capacity limits against empirical recall performance in various model sizes.

Story timeline

  1. Then Model components were viewed primarily as computational transformations rather than explicit memory storage units.
  2. 14 Nov 2026 You could have invented transformers from memory
  3. Now A new framework treats them as associative memory stores with quantifiable capacity limits based on interference.
  4. Next Researchers may test these theoretical capacity limits against empirical recall performance in various model sizes.

Did this article give you the evidence you needed?

No vote saved on this device.
Your choice stays on this device. No public tally.

Questions readers ask

How does the post define memory capacity?

It defines capacity as the number of memories a store can hold before interference from other memories equals the signal strength.

What is the key difference between linear layers and self-attention?

Linear layers have low capacity due to high interference, while self-attention maintains good recall even with a potentially unbounded number of memories.

Are these memory counts proven in practice?

The post presents these as derived heuristics based on theoretical analysis, not as measured benchmarks from specific deployed models.

Connected stories

Reading receipt

  • Self-attention can store over a million memories with 64-dimensional keys.
  • Linear layers are limited to roughly 64 memories under the same conditions.
  • MLPs offer an intermediate capacity of about 2,700 memories.

Still open: How do these theoretical capacity limits translate to actual recall accuracy in large-scale pre-trained models?

Still open: Does the interference-to-signal ratio metric account for the effects of training data distribution?

Time spent: 0:00 · Depth: Full

Sources

  1. Lobsters AI tag

Related stories

Background reading