Repulsive Attention: Rethinking Multi-head Attention as Bayesian Inference
Bang An, Jie Lyu, Zhenyi Wang, Chunyuan Li, Changwei Hu, Fei Tan, Ruiyi Zhang, Yifan Hu, Changyou Chen
Abstract
The neural attention mechanism plays an important role in many natural language processing applications. In particular, multi-head attention extends single-head attention by allowing a model to jointly attend information from different perspectives. However, without explicit constraining, 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 particleoptimization 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 multiple tasks.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Few-Shot Named Entity Recognition: An Empirical Baseline Study cites ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
- An In-depth Investigation of Sparse Rate Reduction in Transformer-like Models cites Unraveling Attention via Convex Duality: Analysis and Interpretations of Vision Transformers
Cited by top-tier papers5
- Few-Shot Named Entity Recognition: An Empirical Baseline StudyJiaxin Huang, Chunyuan Li, Krishan Subudhi, Damien Jose et al.EMNLP 2021 · 97 citations
- Unraveling Attention via Convex Duality: Analysis and Interpretations of Vision TransformersArda Sahiner, Tolga Ergen, Batu Ozturkler, John M. Pauly et al.ICML 2022 · 36 citations
- Dynamic Inference with Neural InterpretersNasim Rahaman, Muhammad Waleed Gondal, Shruti Joshi, Peter V. Gehler et al.NeurIPS 2021 · 35 citations
- An In-depth Investigation of Sparse Rate Reduction in Transformer-like ModelsYunzhe Hu, Difan Zou, Dong XuNeurIPS 2024 · 4 citations
- Cascaded Head-colliding AttentionLin Zheng, Zhiyong Wu, Lingpeng KongACL 2021
Builds on1
Related papers
- Alignment Attention by Matching Key and Query DistributionsShujian Zhang, Xinjie Fan, Huangjie Zheng, Korawat Tanwisuth et al.NeurIPS 2021 · 20 citations
- Loss function based second-order Jensen inequality and its application to particle variational inferenceFutoshi Futami, Tomoharu Iwata, Naonori Ueda, Issei Sato et al.NeurIPS 2021 · 5 citations
- Repulsive Deep Ensembles are BayesianFrancesco D'Angelo, Vincent FortuinNeurIPS 2021 · 141 citations
- Dissecting the Interplay of Attention Paths in a Statistical Mechanics Theory of TransformersLorenzo Tiberi, Francesca Mignacco, Kazuki Irie, Haim SompolinskyNeurIPS 2024 · 12 citations
- Evade the Trap of Mediocrity: Promoting Diversity and Novelty in Text Generation via Concentrating AttentionWenhao Li, Xiaoyuan Yi, Jinyi Hu, Maosong Sun et al.EMNLP 2022 · 1 citation
