An attention mechanism is a model technique that helps an AI system weigh different parts of its input when producing an output.
Attention is central to transformer architectures because it helps models represent relationships among words, tokens, image regions, or other input elements.