Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Mixture of Attention Heads: Selecting Attention Heads Per Token (2210.05144v1)

Published 11 Oct 2022 in cs.CL

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 LLMing. Experiments have shown promising results on several tasks against strong baselines that involve large and very deep models.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (6)
  1. Xiaofeng Zhang (62 papers)
  2. Yikang Shen (62 papers)
  3. Zeyu Huang (31 papers)
  4. Jie Zhou (687 papers)
  5. Wenge Rong (27 papers)
  6. Zhang Xiong (17 papers)
Citations (28)