Macformer: Transformer with Random Maclaurin Feature Attention

要約

ランダム特徴アテンション (RFA) は、ランダム フーリエ特徴 (RFF) 手法を採用してソフトマックス関数を近似し、その結果、効率的なトランスフォーマーの構築を可能にする線形時間および空間アテンション メカニズムが実現します。
RFA からインスピレーションを得て、ランダム マクローリン特徴 (RMF) を使用してさまざまなドット積カーネルを近似し、それによって長いシーケンスのアテンション計算を高速化する Transformer アーキテクチャである Macformer を提案します。
Macformer は、ランダム マクローリン特徴アテンション (RMFA) とプレポスト スケーリング バッチ正規化 (ppSBN) で構成されます。前者はドット積カーネル化アテンションの不偏近似であり、後者は RMFA の誤差を保証する 2 段階の正則化メカニズムです。
私たちは、RMFA と ppSBN の効率を実証するためにおもちゃの実験を行い、さまざまなドット積カーネルで Macformer の加速と精度を検証するためにロングレンジ アリーナ (LRA) ベンチマークの実験を行いました。
マックフォーマーの実験結果は、我々の理論分析と一致しています。

要約(オリジナル)

Random feature attention (RFA) adopts random fourier feature (RFF) methods to approximate the softmax function, resulting in a linear time and space attention mechanism that enables the construction of an efficient Transformer. Inspired by RFA, we propose Macformer, a Transformer architecture that employs random Maclaurin features (RMF) to approximate various dot-product kernels, thereby accelerating attention computations for long sequence. Macformer consists of Random Maclaurin Feature Attention (RMFA) and pre-post Scaling Batch Normalization (ppSBN), the former is an unbiased approximation for dot-product kernelized attention and the later is a two-stage regularization mechanism guaranteeing the error of RMFA. We conducted toy experiments to demonstrate the efficiency of RMFA and ppSBN, and experiments on long range arena (LRA) benchmark to validate the acceleration and accuracy of Macformer with different dot-product kernels. Experiment results of Macformer are consistent with our theoretical analysis.

arxiv情報

著者 Yuhan Guo,Lizhong Ding,Ye Yuan,Guoren Wang
発行日 2024-08-21 14:27:36+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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