What is the role of multi-head attention?

Asked 02 Dec 2026 · 1 views · About: Transformers: Powering Modern Language Models

Multi-head attention allows transformers to capture different aspects of relationships between words. It's a key component for improved performance.

3 Answers

Multi-head attention runs self-attention multiple times with different learned linear projections of the queries, keys, and values. Each "head" learns a different representation of the input sequence.
Answered 02 Dec 2026 ·
By using multiple attention heads, the model can attend to different parts of the input sequence in different ways, capturing richer dependencies than a single attention mechanism would allow.
Answered 02 Dec 2026 ·
It's like having multiple experts analyzing the same text, each focusing on a different aspect – one might focus on grammatical relationships, another on semantic ones.
Answered 02 Dec 2026 ·

Your answer

Answers are reviewed before they appear.