Are Neighbors Enough? Multi-Head Neural n-gram can be Alternative to Self-attention
Loem, Mengsay, Takase, Sho, Kaneko, Masahiro, Okazaki, Naoaki
–arXiv.org Artificial Intelligence
Impressive performance of Transformer has been attributed to self-attention, where dependencies between entire input in a sequence are considered at every position. In this work, we reform the neural $n$-gram model, which focuses on only several surrounding representations of each position, with the multi-head mechanism as in Vaswani et al.(2017). Through experiments on sequence-to-sequence tasks, we show that replacing self-attention in Transformer with multi-head neural $n$-gram can achieve comparable or better performance than Transformer. From various analyses on our proposed method, we find that multi-head neural $n$-gram is complementary to self-attention, and their combinations can further improve performance of vanilla Transformer.
arXiv.org Artificial Intelligence
Jul-27-2022
- Genre:
- Research Report (1.00)
- Technology:
- Information Technology > Artificial Intelligence
- Machine Learning (1.00)
- Natural Language > Machine Translation (0.33)
- Speech > Speech Recognition (0.30)
- Information Technology > Artificial Intelligence