Efficient Attention via Control Variates

要約

ランダム機能ベースのアテンション (RFA) は、線形のランタイムと空間の複雑さを備えたソフトマックス アテンションの効率的な近似値です。
ただし、RFA と従来のソフトマックス注意の間の近似ギャップは十分に研究されていません。
RFA の以前の進歩に基づいて、制御変量のレンズを通してこのギャップを特徴付け、RFA をシーケンス内の各要素の複数の制御変量推定量の合計に分解できることを示します。
この新しいフレームワークは、各制御変数を操作することで、RFA から正確なソフトマックスの注意を回復できることを明らかにしています。
さらに、より柔軟な形式の制御変数を開発できるようになり、線形の複雑さを維持しながら近似ギャップを大幅に削減する新しい注意メカニズムが得られます。
広範な実験により、私たちのモデルが視覚と言語タスクの両方で最先端の効率的な注意メカニズムよりも優れていることが実証されています。

要約(オリジナル)

Random-feature-based attention (RFA) is an efficient approximation of softmax attention with linear runtime and space complexity. However, the approximation gap between RFA and conventional softmax attention is not well studied. Built upon previous progress of RFA, we characterize this gap through the lens of control variates and show that RFA can be decomposed into a sum of multiple control variate estimators for each element in the sequence. This new framework reveals that exact softmax attention can be recovered from RFA by manipulating each control variate. Besides, it allows us to develop a more flexible form of control variates, resulting in a novel attention mechanism that significantly reduces the approximation gap while maintaining linear complexity. Extensive experiments demonstrate that our model outperforms state-of-the-art efficient attention mechanisms on both vision and language tasks.

arxiv情報

著者 Lin Zheng,Jianbo Yuan,Chong Wang,Lingpeng Kong
発行日 2023-02-09 10:16:20+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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