paper-with-me

홈 › Papers

SparseBERT: Rethinking the Importance Analysis in Self-attention

2021-02-25 · Han Shi, Jiahui Gao, Xiaozhe Ren, Hang Xu, Xiaodan Liang, Zhenguo Li, James T. Kwok

Transformer-based models are popularly used in natural language processing (NLP). Its core component, self-attention, has aroused widespread interest. To understand the self-attention mechanism, a direct method is to visualize the attention map of a pre-trained model. Based on the patterns observed, a series of efficient Transformers with different sparse attention masks have been proposed. From a theoretical perspective, universal approximability of Transformer-based models is also recently proved. However, the above understanding and analysis of self-attention is based on a pre-trained model. To rethink the importance analysis in self-attention, we study the significance of different positions in attention matrix during pre-training. A surprising result is that diagonal elements in the attention map are the least important compared with other attention positions. We provide a proof showing that these diagonal elements can indeed be removed without deteriorating model performance. Furthermore, we propose a Differentiable Attention Mask (DAM) algorithm, which further guides the design of the SparseBERT. Extensive experiments verify our interesting findings and illustrate the effect of the proposed algorithm.

📄 PDF Abstract BibTeX arXiv:2102.12871

Code (1)

han-shi/SparseBERT pytorch

Similar Papers 제목 키워드 기반

Rethinking Item Importance in Session-based Recommendation

2020-05-09 · Zhiqiang Pan, Fei Cai, Yanxiang Ling, Maarten de Rijke

Session-based recommendation aims to predict users' based on anonymous sessions. Previous work mainly focuses on the transition relationship between items during an ongoing session. They generally fail to pay enough atte…

Session-Based Recommendations

Synthesizer: Rethinking Self-Attention in Transformer Models

2020-05-02 · Yi Tay, Dara Bahri, Donald Metzler, Da-Cheng Juan 외

The dot product self-attention is known to be central and indispensable to state-of-the-art Transformer models. But is it really required? This paper investigates the true importance and contribution of the dot product-b…

Abstractive Text SummarizationDialogue GenerationDocument SummarizationLanguage Modeling+6

Synthesizer: Rethinking Self-Attention for Transformer Models

2021-01-01 · Yi Tay, Dara Bahri, Donald Metzler, Da-Cheng Juan 외

The dot product self-attention is known to be central and indispensable to state-of-the-art Transformer models. But is it really required? This paper investigates the true importance and contribution of the dot product-b…

Language ModelingLanguage ModellingMachine TranslationText Generation+1

Importance of Self-Attention for Sentiment Analysis

2018-11-01 · WS 2018 11 · Ga{\"e}l Letarte, Fr{\'e}d{\'e}rik Paradis, Philippe Gigu{\`e}re, Fran{\c{c}}ois Laviolette

Despite their superior performance, deep learning models often lack interpretability. In this paper, we explore the modeling of insightful relations between words, in order to understand and enhance predictions. To this …

ClassificationDecision MakingGeneral ClassificationImage Captioning+8

SparseOptimizer: Sparsify Language Models through Moreau-Yosida Regularization and Accelerate via Compiler Co-design

2023-06-27 · Fu-Ming Guo

This paper introduces SparseOptimizer, a novel deep learning optimizer that exploits Moreau-Yosida regularization to naturally induce sparsity in large language models such as BERT, ALBERT and GPT. Key to the design of S…