English

Generalized Attention Mechanism and Relative Position for Transformer

Computation and Language 2022-08-23 v1 Machine Learning

Abstract

In this paper, we propose generalized attention mechanism (GAM) by first suggesting a new interpretation for self-attention mechanism of Vaswani et al. . Following the interpretation, we provide description for different variants of attention mechanism which together form GAM. Further, we propose a new relative position representation within the framework of GAM. This representation can be easily utilized for cases in which elements next to each other in input sequence can be at random locations in actual dataset/corpus.

Keywords

Cite

@article{arxiv.2208.10247,
  title  = {Generalized Attention Mechanism and Relative Position for Transformer},
  author = {R. V. R. Pandya},
  journal= {arXiv preprint arXiv:2208.10247},
  year   = {2022}
}

Comments

6 pages