AI Terminology
/Advanced
Attention Mechanism
Definition
The core mathematical concept inside a Transformer that allows the model to dynamically focus on different parts of an input sequence when processing data, assigning different 'weights' of importance to different words.
Explain Like I'm New
When you read the sentence 'The bank of the river', you pay special 'attention' to the word 'river' to understand that 'bank' means dirt, not money. The Attention mechanism mathematically teaches the AI to do exactly that.
Real World Example
Translating French to English. When the AI is generating an English verb, the Attention mechanism forces it to look backward and focus heavily on the specific French noun that came 5 words earlier to ensure the grammar matches.
Common Use Cases
- •Transformers
- •Contextual understanding
Interview Questions
basic
- What problem did the Attention mechanism solve in early AI language models?
intermediate
- What is the difference between 'Attention' and 'Self-Attention'?