Lune

EMNLP2022Top-tier venue

Mixture of Attention Heads: Selecting Attention Heads Per Token

Xiaofeng Zhang, Yikang Shen, Zeyu Huang, Jie Zhou, Wenge Rong, Zhang Xiong

Abstract

Mixture-of-Experts (MoE) networks have been proposed as an efficient way to scale up model capacity and implement conditional computing. However, the study of MoE components mostly focused on the feedforward layer in Transformer architecture. This paper proposes the Mixture of Attention Heads (MoA), a new architecture that combines multi-head attention with the MoE mechanism. MoA includes a set of attention heads that each has its own set of parameters. Given an input, a router dynamically selects a subset of k attention heads per token. This conditional computation schema allows MoA to achieve stronger performance than the standard multi-head attention layer. Furthermore, the sparsely gated MoA can easily scale up the number of attention heads and the number of parameters while preserving computational efficiency. In addition to the performance improvements, MoA also automatically differentiates heads' utilities, providing a new perspective to discuss the model's interpretability. We conducted experiments on several important tasks, including Machine Translation and Masked Language Modeling. Experiments have shown promising results on several tasks against strong baselines that involve large and very deep models 1 .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

27 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • On the Representation Collapse of Sparse Mixture of Experts cites GLaM: Efficient Scaling of Language Models with Mixture-of-Experts
  • On the Representation Collapse of Sparse Mixture of Experts cites BASE Layers: Simplifying Training of Large, Sparse Models
  • On the Representation Collapse of Sparse Mixture of Experts cites GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
  • Spiking Transformer with Experts Mixture cites GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
  • MoEUT: Mixture-of-Experts Universal Transformers cites SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention
  • MoEUT: Mixture-of-Experts Universal Transformers cites GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
  • SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention cites On the Representation Collapse of Sparse Mixture of Experts
  • SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention cites BASE Layers: Simplifying Training of Large, Sparse Models
  • SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention cites GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
  • BAM! Just Like That: Simple and Efficient Parameter Upcycling for Mixture of Experts cites SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention
  • GLaM: Efficient Scaling of Language Models with Mixture-of-Experts cites GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers27

  1. Boosting Continual Learning of Vision-Language Models via Mixture-of-Experts AdaptersJiazuo Yu, Yunzhi Zhuge, Lu Zhang, Ping Hu et al.CVPR 2024 · 80 citations
  2. MoEUT: Mixture-of-Experts Universal TransformersRóbert Csordás, Kazuki Irie, Jürgen Schmidhuber, Christopher Potts et al.NeurIPS 2024 · 65 citations
  3. SwitchHead: Accelerating Transformers with Mixture-of-Experts AttentionRóbert Csordás, Piotr Piekos, Kazuki Irie, Jürgen SchmidhuberNeurIPS 2024 · 46 citations
  4. BAM! Just Like That: Simple and Efficient Parameter Upcycling for Mixture of ExpertsQizhen (Irene) Zhang, Nikolas Gritsch, Dwaraknath Gnaneshwar, Simon Guo et al.NeurIPS 2024 · 18 citations
  5. Spiking Transformer with Experts MixtureZhaokun Zhou, Yijie Lu, Yanhao Jia, Kaiwei Che et al.NeurIPS 2024 · 15 citations

Builds on7

  1. GShard: Scaling Giant Models with Conditional Computation and Automatic ShardingDmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen et al.ICLR 2021 · 1,954 citations
  2. GLaM: Efficient Scaling of Language Models with Mixture-of-ExpertsNan Du, Yanping Huang, Andrew M. Dai, Simon Tong et al.ICML 2022 · 1,173 citations
  3. BASE Layers: Simplifying Training of Large, Sparse ModelsMike Lewis, Shruti Bhosale, Tim Dettmers, Naman Goyal et al.ICML 2021 · 382 citations
  4. On the Representation Collapse of Sparse Mixture of ExpertsZewen Chi, Li Dong, Shaohan Huang, Damai Dai et al.NeurIPS 2022 · 223 citations
  5. Understanding the Difficulty of Training TransformersLiyuan Liu, Xiaodong Liu, Jianfeng Gao, Weizhu Chen et al.EMNLP 2020 · 158 citations

Related papers

  1. MoH: Multi-Head Attention as Mixture-of-Head AttentionPeng Jin, Bo Zhu, Li Yuan, Shuicheng YanICML 2025 · 2 citations
  2. XMoE: Sparse Models with Fine-grained and Adaptive Expert SelectionYuanhang Yang, Shiyi Qi, Wenchao Gu, Chaozheng Wang et al.ACL Findings 2024 · 10 citations
  3. UMoE: Unifying Attention and FFN with Shared ExpertsYuanhang Yang, Chaozheng Wang, Jing LiNeurIPS 2025 · 4 citations
  4. Exploiting Activation Sparsity with Dense to Dynamic-k Mixture-of-Experts ConversionFilip Szatkowski, Bartosz Wójcik, Mikolaj Piórczynski, Simone ScardapaneNeurIPS 2024 · 19 citations
  5. HyperMoE: Towards Better Mixture of Experts via Transferring Among ExpertsHao Zhao, Zihan Qiu, Huijia Wu, Zili Wang et al.ACL 2024
Dusk over the sea between two cliffs drawn in fine vertical lines