Artificial Intelligence

Attention

Definition

The mechanism by which each position in a sequence decides how much of every other position to mix into its own representation.

For each token the model computes a weight over the other tokens and takes a weighted average of their representations. The weights are learned, not specified — which is why a model resolves a pronoun to its referent without anyone writing a rule for pronouns.

Where this comes up

Articles that define attention in context.

Hi! Need help? Chat with NSTC ✨