Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Pruned

By Elena Voita, David Talbot, F. Moiseev, Rico Sennrich, Ivan Titov. 2019

1,560 citations recorded by the source corpus.

Multi-head self-attention is a key component of the Transformer, a state-of-the-art architecture for neural machine translation. In this work we evaluate the contribution made by individual attention heads to the overall performance of the model and analyze the roles played by them in the encoder. We find that the most important and confident heads play consistent and often linguistically-interpretable roles. When pruning heads using a method based on stochastic gates and a differentiable relaxation of the L0 penalty, we observe that specialized heads are last to be pruned. Our novel pruning method removes the vast majority of heads without seriously affecting performance. For example, on the English-Russian WMT dataset, pruning 38 out of 48 encoder heads results in a drop of only 0.15 BLEU.

Subfields: Artificial Intelligence, Information Systems, Model Architectures

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Mohit Bansal
  2. Luke S. Zettlemoyer
  3. Yonatan Belinkov
  4. Jianfeng Gao
  5. Graham Neubig
  6. Yejin Choi
  7. Percy Liang
  8. Noah A. Smith

In Information Systems

  1. Jamie Callan
  2. Zhuyun Dai
  3. Luyu Gao
  4. Jimmy J. Lin
  5. Sebastian Hofstätter
  6. Allan Hanbury
  7. Wayne Xin Zhao
  8. Zhiyuan Liu

In Model Architectures

  1. Yonatan Belinkov
  2. Noah A. Smith
  3. Alexander M. Rush
  4. Yi Tay
  5. Graham Neubig
  6. Derya Soydaner
  7. Mostafa Dehghani
  8. Anna Rogers

Citations in the corpus