mlsanityData to 7 Oct 2026

RCMHA: Relative Convolutional Multi-Head Attention for Natural Language Modelling

arXiv 2308.03429 ↗First posted 7 Aug 2023cs.CL cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

The Attention module finds common usage in language modeling, presenting distinct challenges within the broader scope of Natural Language Processing. Multi-Head Attention (MHA) employs an absolute positional encoding, which imposes limitations on token length and entails substantial memory consumption during the processing of embedded inputs. The current remedy proposed by researchers involves the utilization of relative positional encoding, similar to the approach adopted in Transformer-XL or Relative Multi-Head Attention (RMHA), albeit the employed architecture consumes considerable memory resources. To address these challenges, this study endeavors to refine MHA, leveraging relative positional encoding in conjunction with the Depth-Wise Convolutional Layer architecture, which promises heightened accuracy coupled with minimized memory usage. The proposed RCMHA framework entails the modification of two integral components: firstly, the application of the Depth-Wise Convolutional Layer to the input embedding, encompassing Query, Key, and Value parameters; secondly, the incorporation of Relative Positional Encoding into the attention scoring phase, harmoniously integrated with Scaled Dot-Product Attention. Empirical experiments underscore the advantages of RCMHA, wherein it exhibits superior accuracy, boasting a score of 0.572 in comparison to alternative attention modules such as MHA, Multi-DConv-Head Attention (MDHA), and RMHA. Concerning memory utilization, RMHA emerges as the most frugal, demonstrating an average consumption of 2.98 GB, surpassing RMHA which necessitates 3.5 GB.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 20 of its 25 references that are in the map. First posted on arXiv 7 Aug 2023.

Builds on

20 of 25 references.

References · 20

  1. 2017Squeeze-and-Excitation Networkscited by 4,763
  2. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  3. 2018CBAM: Convolutional Block Attention Modulecited by 2,463
  4. 2017Non-local Neural Networkscited by 2,290
  5. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
  6. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
  7. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
  8. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
  9. 2020Object-Centric Learning with Slot Attentioncited by 865
  10. 2021CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classificationcited by 806
  11. 2021Primer: Searching for Efficient Transformers for Language Modelingcited by 162
  12. 2021An Attention Free Transformercited by 111
8 more
  1. 2017Structured Attention Networkscited by 95
  2. 2019Calibration of Encoder Decoder Models for Neural Machine Translationcited by 67
  3. 2019BP-Transformer: Modelling Long-Range Context via Binary Partitioningcited by 38
  4. 2016Attention-over-Attention Neural Networks for Reading Comprehensioncited by 31
  5. 2016Neural Machine Translation with Supervised Attentioncited by 31
  6. 2019Single Headed Attention RNN: Stop Thinking With Your Headcited by 25
  7. 2014Deep Networks with Internal Selective Attention through Feedback Connectionscited by 17
  8. 2016Supervised Attentions for Neural Machine Translationcited by 8

Built on by

Not cited yet.