LiveFR

Self-attention

Definition: Self-attention is a form of attention where each element of a sequence compares itself to all the other elements of the same sequence, to enrich its representation with context.

It is the heart of the Transformer: it captures dependencies between words, even distant ones, in a single step. Models stack several attention 'heads' to capture different kinds of relations.

See also

← Full AI glossary · AI news