paper-with-me

홈 › Papers

Multi-Head Self-Attention with Role-Guided Masks

2020-12-22 · Dongsheng Wang, Casper Hansen, Lucas Chaves Lima, Christian Hansen, Maria Maistro, Jakob Grue Simonsen, Christina Lioma

The state of the art in learning meaningful semantic representations of words is the Transformer model and its attention mechanisms. Simply put, the attention mechanisms learn to attend to specific parts of the input dispensing recurrence and convolutions. While some of the learned attention heads have been found to play linguistically interpretable roles, they can be redundant or prone to errors. We propose a method to guide the attention heads towards roles identified in prior work as important. We do this by defining role-specific masks to constrain the heads to attend to specific parts of the input, such that different heads are designed to play different roles. Experiments on text classification and machine translation using 7 different datasets show that our method outperforms competitive attention-based, CNN, and RNN baselines.

📄 PDF Abstract BibTeX arXiv:2012.12366

Code (1)

dswang2011/guided-attention-transformer 공식 구현

Tasks

Machine Translationtext-classificationText ClassificationTranslation

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Residual Connection 설명 없음
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
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$…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…

Similar Papers 제목 키워드 기반

Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Pruned

2019-05-23 · ACL 2019 7 · Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich 외

Multi-head self-attention is a key component of the Transformer, a state-of-the-art architecture for neural machine translation. In this work we evaluate the contribution made by individual attention heads in the encoder…

Machine TranslationTranslation

Multihead self-attention in cortico-thalamic circuits

2025-04-08 · Arno Granier, Walter Senn

Both biological cortico-thalamic networks and artificial transformer networks use canonical computations to perform a wide range of cognitive tasks. In this work, we propose that the structure of cortico-thalamic circuit…

Enlivening Redundant Heads in Multi-head Self-attention for Machine Translation

2021-11-01 · EMNLP 2021 11 · Tianfu Zhang, Heyan Huang, Chong Feng, Longbing Cao

Multi-head self-attention recently attracts enormous interest owing to its specialized functions, significant parallelizable computation, and flexible extensibility. However, very recent empirical studies show that some …

Machine TranslationTranslation

Copy Suppression: Comprehensively Understanding an Attention Head

2023-10-06 · Callum McDougall, Arthur Conmy, Cody Rushing, Thomas McGrath 외

We present a single attention head in GPT-2 Small that has one main role across the entire training distribution. If components in earlier layers predict a certain token, and this token appears earlier in the context, th…

Language Modelling

Multiple Structural Priors Guided Self Attention Network for Language Understanding

2020-12-29 · Le Qi, Yu Zhang, Qingyu Yin, Ting Liu

Self attention networks (SANs) have been widely utilized in recent NLP studies. Unlike CNNs or RNNs, standard SANs are usually position-independent, and thus are incapable of capturing the structural priors between seque…

Position