paper-with-me

홈 › Papers

Are Sixteen Heads Really Better than One?

2019-05-25 · NeurIPS 2019 12 · Paul Michel, Omer Levy, Graham Neubig

Attention is a powerful and ubiquitous mechanism for allowing neural models to focus on particular salient pieces of information by taking their weighted average when making predictions. In particular, multi-headed attention is a driving force behind many recent state-of-the-art NLP models such as Transformer-based MT models and BERT. These models apply multiple attention mechanisms in parallel, with each attention "head" potentially focusing on different parts of the input, which makes it possible to express sophisticated functions beyond the simple weighted average. In this paper we make the surprising observation that even if models have been trained using multiple heads, in practice, a large percentage of attention heads can be removed at test time without significantly impacting performance. In fact, some layers can even be reduced to a single head. We further examine greedy algorithms for pruning down models, and the potential speed, memory efficiency, and accuracy improvements obtainable therefrom. Finally, we analyze the results with respect to which parts of the model are more reliant on having multiple heads, and provide precursory evidence that training dynamics play a role in the gains provided by multi-head attention.

📄 PDF Abstract BibTeX arXiv:1905.10650

Code (4)

pmichel31415/are-16-heads-really-better-than-1 공식 구현 pytorch
alibaba/thinking_bias pytorch
rycolab/differentiable-subset-pruning pytorch
rycolab/differential-subset-pruning pytorch

Methods 이 논문이 사용한 방법론

Pruning 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Weight Decay 설명 없음
Residual Connection 설명 없음
Adam 설명 없음
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

Gradient-Based Speech-to-Text Alignment for Any ASR Model: From CTC to Speech LLMs

2026-07-07 · Albert Zeyer, Ralf Schlüter, Hermann Ney arxiv

Speech-to-text alignment means finding the temporal boundaries of each word in the audio. Some models provide such an alignment directly and others do not. Connectionist temporal classification (CTC) and transducer model…

Betti numbers of attention graphs is all you really need

2020-10-10 · Anonymous

We apply methods of topological analysis to the attention graphs, calculated on the attention heads of the BERT model (Devlin et al. (2019)). Our research shows that the classifier built upon basic persistent topological…

AllClassificationtext-classificationText Classification

Betti numbers of attention graphs is all you really need

2022-07-05 · Laida Kushnareva, Dmitri Piontkovski, Irina Piontkovskaya

We apply methods of topological analysis to the attention graphs, calculated on the attention heads of the BERT model ( arXiv:1810.04805v2 ). Our research shows that the classifier built upon basic persistent topological…

AllClassificationtext-classificationText Classification

Structure-based Drug Design Benchmark: Do 3D Methods Really Dominate?

2024-06-04 · Kangyu Zheng, Yingzhou Lu, Zaixi Zhang, Zhongwei Wan 외

Currently, the field of structure-based drug design is dominated by three main types of algorithms: search-based algorithms, deep generative models, and reinforcement learning. While existing works have typically focused…

Drug Design

Are Two Heads Better than One? Crowdsourced Translation via a Two-Step Collaboration of Non-Professional Translators and Editors

2014-06-01 · ACL 2014 6 · Rui Yan, Mingkun Gao, Ellie Pavlick, Chris Callison-Burch
Machine TranslationVocal Bursts Valence Prediction