liveBook · Manning

Key

As explained in Sutskever's List

An attention projection representing the information a sequence position offers for comparison with queries.

A key is an attention projection representing what a sequence position offers for comparison with queries. Attention uses query–key comparisons to estimate relevance, then combines the associated values. section 5.1

Cross-attention alignment

In a Transformer decoder, each query interacts with encoder keys and values. The resulting attention scores identify relevant encoded representations, producing a context vector that guides token generation. section 5.1

Figure 5.1 A simplified schematic of the Transformer architecture. The model consists of an encoder (left) and a decoder (right), each comprising repeated stacks of sublayers, including multihead attention mechanisms, feed-forward neural networks, and postprocessing steps such as residual connections and layer normalization. Positional encodings (depicted as circled crosses) are added to the input embeddings to explicitly represent token order. The diagram emphasizes the cross-attention operation (dashed box labeled “Cross-attention”), in which the decoder’s queries (Q) interact with the encoder’s keys (K) and values (V). During cross-attention, each decoding step computes attention scores to determine the relevance of encoded input representations, producing a context vector that guides token generation. This selective alignment enables the decoder to integrate contextual information from the encoder, improving the accuracy and coherence of the output sequence.
figure

Use the Transformer schematic to trace how decoder queries meet encoder keys and values during cross-attention. section 5.1

How Sutskever's List covers it

How deep it goes
Defines keys through their attention role and illustrates their interaction with queries, without deriving projection internals.
Examples
Uses a Transformer architecture schematic showing decoder queries interacting with encoder keys and values.
What you can do after
Understand how keys support relevance scoring and context construction during Transformer cross-attention.
How it connects
Connects keys to attention, queries, values, cross-attention, and the Transformer architecture.

Also explained in

Compare how 8 books explain key →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Sutskever's List. The section links point to the parts of the book it draws on.