Attention

Attention is a neural network mechanism that lets a model decide which parts of an input are most relevant when producing a representation or output.
Also known as
attention mechanism

Intuition

Instead of compressing everything into one fixed summary, attention lets the model look back at useful pieces of context when it needs them.

Technical definition

Attention computes weights over values, usually from query-key similarity scores, then forms a weighted combination of those values.

Example

In translation, attention can connect a generated word to the source words that explain it.

Common misunderstandings

  • Attention weights are not always faithful explanations.
  • Attention is a mechanism, not a complete model architecture by itself.

Need this inside a product?

The studio builds the systems these terms describe. Tell us what you are working on.