AI Foundationspredict · compress · act

concepts → Mechanism

Mechanism

Attention

also called self-attention · multi-head attention

decade9 connections

let each token weigh every other token, instead of only the last one

the formal statement
softmax(QKᵀ/√dₖ) V
Attention(Q,K,V) = softmax(QKᵀ/√dₖ)V

Where it sits

The prism has six jobs across and eight layers down. Its primary cell isrepresent × L1, with a noted second cell. Hatched cells cannot exist — a GPU does not learn, an institution does not infer.

represent×L5 — at serving time attention is what grows the KV cache

What must come first — and what it unlocks

Left to right is reading order, derived from the prerequisite_of edges. Nothing here is hand-ordered: the diagram is the graph.

Word embeddingDot productAttentionTransformer

Before it: Word embedding · Dot product

Unlocks: Transformer

What kind of thing it is — and what it is made of

It is part of: Transformer.

It is made of: KV cache, Query, key, value, Positional encoding, Multi-head latent attention.

Where to read it

The chapter that introduces it, and any chapter that uses it again.

24Attention Is All You Needact 6 · The Attention Revolution

Where it comes from

paperAttention Is All You NeedAshish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan Gomez, Łukasz Kaiser, Illia Polosukhin · 2017

Every connection

All 9 edges touching this node, grouped by relation family — the sections above are highlights from this list. Colours match the relation families inthe atlas.

Structure · 5
is part ofTransformerArchitecture
has as a partKV cacheMechanism
has as a partQuery, key, valueMechanism
has as a partPositional encodingMechanism
has as a partMulti-head latent attentionMechanism
Order · 3
requiresWord embeddingMechanism
must come beforeTransformerArchitecture
requiresDot productQuantity
Contrast · 1
trades off withRecurrent neural networkArchitecture

This page is a projection of one node in src/data/concepts.ts. It has no prose file of its own — 230 declared edges produce all 236 of these pages. Edit an edge and both endpoints change.