Multi-Head Self-Attention with Role-Guided Masks

arXiv:2012.12366 First posted 2020-12-22 v1 Accepted at ECIR@2021
Cite this paper ×
BibTeX
@misc{wang2020multihead,
  title = {Multi-Head Self-Attention with Role-Guided Masks},
  author = {Dongsheng Wang and Casper Hansen and Lucas Chaves Lima and Christian Hansen and Maria Maistro and Jakob Grue Simonsen and Christina Lioma},
  year = {2020},
  eprint = {2012.12366},
  archivePrefix = {arXiv},
  primaryClass = {cs.CL},
  url = {https://arxiv.org/abs/2012.12366}
}
APA 7
Wang, D., Hansen, C., Lima, L. C., Hansen, C., Maistro, M., Simonsen, J. G., & Lioma, C. (2020). Multi-Head Self-Attention with Role-Guided Masks [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2012.12366
GB/T 7714
WANG D, HANSEN C, LIMA LC, et al. Multi-Head Self-Attention with Role-Guided Masks[EB/OL]. (2020-12-22)[2026-11-30]. https://arxiv.org/abs/2012.12366.

Abstract

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.

Post #1 · the paper

Discussion

No comments yet. Start the discussion!