Home Glossary Multi-Head Attention

Multi-Head Attention

Multi-head attention divides a model’s query, key, and value representations into multiple attention heads. Each head can learn to emphasize different positions or types of relationships, such as local syntax, long-range dependencies, object associations, or alignment between modalities. The head outputs are combined and projected into the next representation. This structure is a central component of transformer models and provides more expressive interactions than a single attention calculation with the same representation. Individual heads are not guaranteed to have a simple human-readable role, and some may be redundant. Head count, dimension, masking, memory use, and optimized kernels affect both model quality and computational efficiency.

Related News