[Paper Review] Repulsive Attention: Rethinking Multi-head Attention as Bayesian Inference
This paper proposes Repulsive Attention, a Bayesian interpretation of multi-head attention that uses particle-optimization sampling to enforce diversity among attention heads, preventing attention collapse. By modeling heads as particles approximating a posterior distribution, the method improves feature diversity and model expressiveness without additional parameters, achieving consistent performance gains across NLP tasks.
The neural attention mechanism plays an important role in many natural language processing applications. In particular, the use of multi-head attention extends single-head attention by allowing a model to jointly attend information from different perspectives. Without explicit constraining, however, multi-head attention may suffer from attention collapse, an issue that makes different heads extract similar attentive features, thus limiting the model's representation power. In this paper, for the first time, we provide a novel understanding of multi-head attention from a Bayesian perspective. Based on the recently developed particle-optimization sampling techniques, we propose a non-parametric approach that explicitly improves the repulsiveness in multi-head attention and consequently strengthens model's expressiveness. Remarkably, our Bayesian interpretation provides theoretical inspirations on the not-well-understood questions: why and how one uses multi-head attention. Extensive experiments on various attention models and applications demonstrate that the proposed repulsive attention can improve the learned feature diversity, leading to more informative representations with consistent performance improvement on various tasks.
Motivation & Objective
- To address the problem of attention collapse in multi-head attention, where heads learn redundant features, limiting model expressiveness.
- To provide a principled, theoretically grounded explanation for why multi-head attention improves over single-head attention.
- To develop a method that enhances attention head diversity without introducing extra trainable parameters or explicit regularizers.
- To demonstrate the effectiveness of the Bayesian interpretation across diverse attention-based models and NLP tasks.
Proposed method
- The paper frames multi-head attention as a Bayesian inference problem, where each attention head is treated as a particle sampling from a posterior distribution over attention parameters.
- It employs particle-optimization sampling techniques (Liu & Wang, 2016) to enforce repulsiveness among heads by minimizing their proximity in parameter space.
- The method avoids explicit regularization by relying on the inherent divergence of particles during optimization, promoting exploration of distinct modes in the parameter space.
- The framework is implemented via an end-to-end training scheme that integrates particle optimization into standard attention modules.
- The approach generalizes to various attention models, including Transformers, BERT, and sequence-to-sequence architectures.
Experimental results
Research questions
- RQ1Why does multi-head attention improve model performance compared to single-head attention?
- RQ2How can attention head diversity be explicitly encouraged without introducing additional trainable parameters?
- RQ3What is the theoretical basis for the effectiveness of multi-head attention in capturing diverse representations?
- RQ4Does enforcing repulsiveness among attention heads lead to consistent performance gains across different NLP tasks?
Key findings
- Repulsive Attention significantly improves feature diversity in multi-head attention, reducing redundancy among heads.
- The method achieves consistent performance gains across multiple NLP tasks, including text classification, machine translation, and abstractive summarization.
- On the IWSLT14 De-En translation task, the Transformer-small model with repulsive attention achieved a lower negative log-likelihood loss compared to standard multi-head attention.
- In abstractive summarization, the GraphWriter model with repulsive attention showed a 10% improvement in knowledge graph coverage and reduced repetitive clauses.
- Human evaluation confirmed that generated text with repulsive attention was more structurally coherent and informative than baseline models.
- Experiments revealed an optimal number of attention heads (around 20 for Yelp sentiment classification and 4 for Transformer-small), supporting the theoretical analysis of a trade-off between diversity and overfitting.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.