Foundations

Query-key-value attention (QKV)

stable definition

Definition

The attention formulation in which queries are matched against keys to calculate weights applied to corresponding values.

Distinguish it from nearby terms

Queries, keys, and values are learned projections used by the attention calculation. They are not database queries, identifiers, or stored records, even though the analogy helps explain their roles.

Check your understanding

The query represents what a position is looking for, keys determine how strongly positions match, and values carry the information combined into the result.

Also called

QKV, query-key-value attention

Related terms

Public evidence