要約
アテンション モジュールは言語モデリングで一般的に使用されており、自然言語処理のより広い範囲内で明確な課題を提示しています。
マルチヘッド アテンション (MHA) は、絶対位置エンコーディングを採用しています。これにより、トークンの長さに制限が課され、埋め込み入力の処理中に大量のメモリ消費が発生します。
研究者によって提案されている現在の解決策には、Transformer-XL または相対マルチヘッド アテンション (RMHA) で採用されているアプローチと同様の、相対位置エンコーディングの利用が含まれていますが、採用されているアーキテクチャはかなりのメモリ リソースを消費します。
これらの課題に対処するために、この研究では、深さ方向畳み込み層アーキテクチャと組み合わせて相対位置エンコーディングを活用して、MHA を改良することに努めています。これにより、メモリ使用量の最小化と相まって精度の向上が約束されます。
提案された RCMHA フレームワークには、2 つの統合コンポーネントの変更が必要です。1 つは、クエリ、キー、および値のパラメーターを含む入力埋め込みへの深さ方向畳み込み層の適用です。
2 番目に、相対位置エンコーディングを注意スコアリング段階に組み込み、スケーリングされたドット積注意と調和して統合します。
実証実験では、RCMHA が優れた精度を示し、MHA、Multi-DConv-Head Attendance (MDHA)、RMHA などの代替アテンション モジュールと比較して 0.572 のスコアを誇るという利点が強調されています。
メモリ使用量に関しては、RMHA が最も節約的なものとして浮上し、平均消費量は 2.98 GB で、3.5 GB を必要とする RMHA を上回っています。
要約(オリジナル)
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.
arxiv情報
| 著者 | Herman Sugiharto,Aradea,Husni Mubarok |
| 発行日 | 2023-08-07 09:24:24+00:00 |
| arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google