AI Glossary/Attention Mechanism
Deep Learning

Attention Mechanism

A technique that allows models to focus on relevant parts of the input when producing output.

In-depth explanation

Attention computes weighted combinations of input elements based on their relevance to the current task. Self-attention relates different positions within a single sequence. Cross-attention relates positions across different sequences (like source and target in translation). Attention enables dynamic, context-dependent processing of information.

Examples

Translation focusing on relevant words
Image captioning attending to regions

Related terms

Master Attention Mechanism.

Learn how to apply this concept with hands-on projects in our comprehensive AI programs.