Differentiable Subset Pruning of Transformer Heads

要約

マルチヘッド アテンションは、入力のさまざまな部分に独立して対応するいくつかのアテンション メカニズムの集合であり、Transformer の重要な要素です。
しかし、最近の研究では、Transformer のマルチヘッド アテンション メカニズムのヘッドの大部分は、モデルのパフォーマンスに大きな悪影響を与えることなく安全に削除できることが示されています。
このような枝刈りにより、実際には著しく小型で高速なモデルが得られます。
私たちの研究では、微分可能なサブセット枝刈りと呼ばれる新しいヘッド枝刈り手法を導入しています。
直感的に、私たちの方法はヘッドごとの重要度変数を学習し、枝刈りされていないヘッドの数にユーザー指定の厳しい制約を適用します。
重要度変数は確率的勾配降下法によって学習されます。
私たちは自然言語推論と機械翻訳の実験を行っています。
微分可能サブセット枝刈りは、スパース性レベルを正確に制御しながら、以前の研究と同等かそれ以上に実行されることを示します。

要約(オリジナル)

Multi-head attention, a collection of several attention mechanisms that independently attend to different parts of the input, is the key ingredient in the Transformer. Recent work has shown, however, that a large proportion of the heads in a Transformer’s multi-head attention mechanism can be safely pruned away without significantly harming the performance of the model; such pruning leads to models that are noticeably smaller and faster in practice. Our work introduces a new head pruning technique that we term differentiable subset pruning. Intuitively, our method learns per-head importance variables and then enforces a user-specified hard constraint on the number of unpruned heads. The importance variables are learned via stochastic gradient descent. We conduct experiments on natural language inference and machine translation; we show that differentiable subset pruning performs comparably or better than previous works while offering precise control of the sparsity level.

arxiv情報

著者 Jiaoda Li,Ryan Cotterell,Mrinmaya Sachan
発行日 2023-07-27 07:14:18+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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