Improving Transformers with Dynamically Composable Multi-Head Attention
Not on the map. Why?
Abstract (arXiv)
Multi-Head Attention (MHA) is a key component of Transformer. In MHA, attention heads work independently, causing problems such as low-rank bottleneck of attention score matrices and head redundancy. We propose Dynamically Composable Multi-Head Attention (DCMHA), a parameter and computation efficient attention architecture that tackles the shortcomings of MHA and increases the expressive power of the model by dynamically composing attention heads. At the core of DCMHA is a itCompose function that transforms the attention score and weight matrices in an input-dependent way. DCMHA can be used as a drop-in replacement of MHA in any transformer architecture to obtain the corresponding DCFormer. DCFormer significantly outperforms Transformer on different architectures and model scales in language modeling, matching the performance of models with ~1.7x-2.0x compute. For example, DCPythia-6.9B outperforms open source Pythia-12B on both pretraining perplexity and downstream task evaluation. The code and models are available at https://github.com/Caiyun-AI/DCFormer.
Key facts. Cited by 8 papers in the map (data through 13 Oct 2026). Builds on 52 of its 64 references that are in the map. First posted on arXiv 14 May 2024.
Builds on
52 of 64 references.
References · 52
- 2017Attention Is All You Needcited by 60,106
- 2020Language Models are Few-Shot Learnerscited by 32,320
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,043
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,549
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,072
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,317
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,798
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,658
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,628
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,213
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,053
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,637
38 more
- 2020Longformer: The Long-Document Transformercited by 3,393
- 2017Axiomatic Attribution for Deep Networkscited by 3,368
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,044
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,843
- 2022Emergent Abilities of Large Language Modelscited by 2,499
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,440
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,379
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,163
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,994
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,835
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,761
- 2020GLU Variants Improve Transformercited by 1,759
- 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,618
- 2020Rethinking Attention with Performerscited by 1,594
- 2021GLM: General Language Model Pretraining with Autoregressive Blank Infillingcited by 1,029
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 973
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 854
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 849
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 820
- 2019Are Sixteen Heads Really Better than One?cited by 807
- 2022Simplified State Space Layers for Sequence Modelingcited by 781
- 2017Crowdsourcing Multiple Choice Science Questionscited by 751
- 2023The Flan Collection: Designing Data and Methods for Effective Instruction Tuningcited by 736
- 2023Scaling Vision Transformers to 22 Billion Parameterscited by 693
- 2021Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layerscited by 607
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 603
- 2021Random Feature Attentioncited by 351
- 2020Retrieve, Program, Repeat: Complex Knowledge Base Question Answering via Alternate Meta-learningcited by 216
- 2022Transformer Quality in Linear Timecited by 189
- 2022Analyzing Transformers in Embedding Spacecited by 132
- 2022The Devil in Linear Transformercited by 98
- 2021Finetuning Pretrained Transformers into RNNscited by 94
- 2020Low-Rank Bottleneck in Multi-head Attention Modelscited by 88
- 2021Do Transformer Modifications Transfer Across Implementations and Applications?cited by 87
- 2022Mixture of Attention Heads: Selecting Attention Heads Per Tokencited by 59
- 2020Talking-Heads Attentioncited by 58
- 2020Multi-Head Attention: Collaborate Instead of Concatenatecited by 57
- 2017Weighted Transformer Network for Machine Translationcited by 16
50 most cited of 52 All 52 (JSON)
Built on by
Citing papers per year: 2024: 2; 2025: 5; 2026: 1.
8 papers.
- 2025Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Freecited by 270
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
- 2025Efficient Degradation-agnostic Image Restoration via Channel-Wise Functional Decomposition and Manifold Regularizationcited by 8
- 2025GRAPHMOE: Amplifying Cognitive Depth of Mixture-of-Experts Network via Introducing Self-Rethinking Mechanismcited by 7
- 2025Devil is in the Uniformity: Exploring Diverse Learners within Transformer for Image Restorationcited by 4
- 2025DeepSeek: Paradigm Shifts and Technical Evolution in Large AI Modelscited by 3
- 2024ResidualDroppath: Enhancing Feature Reuse over Residual Connectionscited by 0
- 2026Let the Heads Talk: Beyond Diagonal Graph Attentioncited by 0
- 2026Let the Heads Talk: Beyond Diagonal Graph Attention1 Oct 2026
- 2025DeepSeek: Paradigm Shifts and Technical Evolution in Large AI Models14 Jul 2025
- 2025Efficient Degradation-agnostic Image Restoration via Channel-Wise Functional Decomposition and Manifold Regularization24 May 2025
- 2025Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free10 May 2025
- 2025Devil is in the Uniformity: Exploring Diverse Learners within Transformer for Image Restoration26 Mar 2025
- 2025GRAPHMOE: Amplifying Cognitive Depth of Mixture-of-Experts Network via Introducing Self-Rethinking Mechanism14 Jan 2025
- 2024ResidualDroppath: Enhancing Feature Reuse over Residual Connections14 Nov 2024
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolation7 Oct 2024