Input-length-shortening and text generation via attention values

要約

タスクのパフォーマンスに他の単語よりも大きな影響を与える単語を特定することは、自然言語処理における課題です。
Transformers モデルは最近、他の単語よりも大きな注意 (つまり、関連性) スコアをいくつかの単語に割り当てる注意メカニズムを組み込むことで、この問題に対処しました。
注意メカニズムの計算コストが高いため、変換モデルには通常、ハードウェアの制約による入力長の制限があります。
この制限は、変圧器 (BERT) モデルのよく知られた双方向エンコーダ表現を含む、多くの変圧器に適用されます。
この論文では、2 つの質問に焦点を当てて、BERT のアテンション割り当てメカニズムを調べました。
(2) 条件付きテキスト生成の制御メカニズムとしてどのように注意を使用できますか?
テキスト分類タスクのコンテキストでこれらの質問を調査しました。
BERT の初期のレイヤーは、後のレイヤーと比較して、テキスト分類タスクにより重要な注意スコアを割り当てることがわかりました。
第 1 層のアテンション サムを使用して、特定のシーケンスでトークンをフィルター処理し、入力の長さを大幅に短縮しながら、優れたテスト精度を維持できることを実証しました。
また、計算効率の高いセマンティック類似度アルゴリズムを使用するフィルタリングを適用し、元のシーケンスの約 6\% を保持するだけで 86.5\% の精度を得ることができることを発見しました。
最後に、BERT の最初のレイヤーによると、注目スコアが高いトークンのわずかな割合 (10\%) を使用するだけで、元のデータと区別できない安定した方法でデータを生成できることを示しました。

要約(オリジナル)

Identifying words that impact a task’s performance more than others is a challenge in natural language processing. Transformers models have recently addressed this issue by incorporating an attention mechanism that assigns greater attention (i.e., relevance) scores to some words than others. Because of the attention mechanism’s high computational cost, transformer models usually have an input-length limitation caused by hardware constraints. This limitation applies to many transformers, including the well-known bidirectional encoder representations of the transformer (BERT) model. In this paper, we examined BERT’s attention assignment mechanism, focusing on two questions: (1) How can attention be employed to reduce input length? (2) How can attention be used as a control mechanism for conditional text generation? We investigated these questions in the context of a text classification task. We discovered that BERT’s early layers assign more critical attention scores for text classification tasks compared to later layers. We demonstrated that the first layer’s attention sums could be used to filter tokens in a given sequence, considerably decreasing the input length while maintaining good test accuracy. We also applied filtering, which uses a compute-efficient semantic similarities algorithm, and discovered that retaining approximately 6\% of the original sequence is sufficient to obtain 86.5\% accuracy. Finally, we showed that we could generate data in a stable manner and indistinguishable from the original one by only using a small percentage (10\%) of the tokens with high attention scores according to BERT’s first layer.

arxiv情報

著者 Neşet Özkan Tan,Alex Yuxuan Peng,Joshua Bensemann,Qiming Bao,Tim Hartill,Mark Gahegan,Michael Witbrock
発行日 2023-03-14 02:11:24+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク