Cascaded Head-colliding Attention
arXiv:2105.14850
Abstract
Transformers have advanced the field of natural language processing (NLP) on a variety of important tasks. At the cornerstone of the Transformer architecture is the multi-head attention (MHA) mechanism which models pairwise interactions between the elements of the sequence. Despite its massive success, the current framework ignores interactions among different heads, leading to the problem that many of the heads are redundant in practice, which greatly wastes the capacity of the model. To improve parameter efficiency, we re-formulate the MHA as a latent variable model from a probabilistic perspective. We present cascaded head-colliding attention (CODA) which explicitly models the interactions between attention heads through a hierarchical variational distribution. We conduct extensive experiments and demonstrate that CODA outperforms the transformer baseline, by perplexity on \texttt{Wikitext-103} in language modeling, and by BLEU on \texttt{WMT14 EN-DE} in machine translation, due to its improvements on the parameter efficiency.\footnote{Our implementation is publicly available at \url{https://github.com/LZhengisme/CODA}.}
arXiv commentACL 2021 Camera-ready version
References in corpus (9)
- Adam: A Method for Stochastic Optimization
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Stochastic Backpropagation and Approximate Inference in Deep Generative Models
- Pointer Sentinel Mixture Models
- Latent Alignment and Variational Attention
- Very Deep Transformers for Neural Machine Translation
- RealFormer: Transformer Likes Residual Attention
- Hard-Coded Gaussian Attention for Neural Machine Translation
- Repulsive Attention: Rethinking Multi-head Attention as Bayesian Inference