Methods › General › Attention Modules › Multi-Head Attention

Multi-Head Attention

24,855 papers tagged archive 2025-07-28

archive 2025-07-28 Description, source and code snippet are the archive's method entry.

Multi-head Attention is a module for attention mechanisms which runs through an attention mechanism several times in parallel. The independent attention outputs are then concatenated and linearly transformed into the expected dimension. Intuitively, multiple attention heads allows for attending to parts of the sequence differently (e.g. longer-term dependencies versus shorter-term dependencies).

MultiHead(Q, K, V) = [head₁,…,headₕ]W₀

where headᵢ = Attention (QWᵢ^Q, KWᵢᴷ, VWᵢⱽ )

Above W are all learnable parameter matrices.

Note that scaled dot-product attention is most commonly used in this module, although in principle it can be swapped out for other types of attention mechanism.

Source: Lilian Weng

Source: Attention Is All You NeedSee Code · jadore801120/attention-is-all-you-need-pytorch

Papers archive 2025-07-28

30 shown of 24,855, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.

Tasks archive 2025-07-28

20 shown of 2,604 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.

TaskPapers
Language Modelling3,000
Language Modeling2,346
Retrieval1,792
Question Answering1,481
Decoder1,392
Sentence1,337
RAG1,320
Retrieval-augmented Generation1,149
Translation1,035
Machine Translation929
Semantic Segmentation859
Large Language Model836
Text Generation762
Transfer Learning713
Image Classification709
Object Detection665
Representation Learning630
Sentiment Analysis614
Classification607
Segmentation596

Usage over time archive 2025-07-28

Papers per year tagged with Multi-Head Attention: 2017 to 2025, peak 7,098 7,098 0 2017: 22 papers 2017 2018: 126 papers 2018 2019: 1081 papers 2019 2020: 2162 papers 2020 2021: 3154 papers 2021 2022: 3332 papers 2022 2023: 5274 papers 2023 2024: 7098 papers 2024 2025: 2606 papers 2025
Papers per year the archive tags with this method, by the paper's archive date (24,855 dated). Bars are counts, not a trend claim.

Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).

Categories archive 2025-07-28

Attention Modules

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections